:root {
    /* Color Palette - Premium & Modern */
    --primary-color: #1e293b;
    /* Slate 800 */
    --primary-light: #334155;
    /* Slate 700 */
    --primary-dark: #0f172a;
    /* Slate 900 */

    --accent-color: #3b82f6;
    /* Blue 500 */
    --accent-hover: #2563eb;
    /* Blue 600 */
    --accent-light: #eff6ff;
    /* Blue 50 */

    --success-color: #10b981;
    /* Emerald 500 */
    --warning-color: #f59e0b;
    /* Amber 500 */
    --danger-color: #ef4444;
    /* Red 500 */

    --text-color: #334155;
    /* Slate 700 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #f8fafc;
    /* Slate 50 */

    --bg-color: #f1f5f9;
    /* Slate 100 */
    --card-bg: #ffffff;

    --border-color: #e2e8f0;
    /* Slate 200 */
    --input-border: #cbd5e1;
    /* Slate 300 */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --border-radius: 0.5rem;
    /* 8px */
    --border-radius-lg: 0.75rem;
    /* 12px */

    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-dark);
    margin-top: 0;
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 1.875rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Header & Nav */
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a:hover {
    color: var(--accent-color);
}

nav a.active {
    color: #3b82f6; /* Blue color for active menu */
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6; /* Blue color for active indicator */
    border-radius: 2px;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 1.5rem;
    /* Increased padding slightly for cleaner look */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    background: var(--accent-color);
    color: white;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--accent-hover);
    color: white;
    /* Ensure text stays white */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-color);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    border-color: var(--input-border);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    /* Darker red */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--primary-dark);
    background-color: #fff;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder {
    color: #94a3b8;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    width: 100%;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}

th:first-child {
    border-top-left-radius: var(--border-radius);
}

th:last-child {
    border-top-right-radius: var(--border-radius);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--accent-light);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Login Page Specifics */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.login-icon {
    display: block;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: var(--accent-color);
    text-align: center;
}


/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--input-border);
    padding: 3rem;
    text-align: center;
    border-radius: var(--border-radius);
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-color);
    background: var(--accent-light);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}

.upload-zone:hover i {
    color: var(--accent-color);
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 140px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.photo-item:hover {
    box-shadow: var(--shadow);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
}

.photo-item:hover .remove-btn {
    opacity: 1;
}

.photo-item .remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Footer */
footer {
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}