/* PixSlate — Admin Interface */

:root {
    --primary: #C2785C;
    --primary-dark: #A85D42;
    --primary-light: #E8A98E;
    --accent: #D4956B;
    --danger: #C44040;
    --danger-hover: #A33232;
    --success: #5B9A6B;
    --warning: #C99A3D;
    --bg: #F9F5F1;
    --card-bg: #FFFFFF;
    --text: #2D2A26;
    --text-light: #8B8580;
    --text-muted: #B0A99F;
    --border: #E8E0D8;
    --border-light: #F0EBE5;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.06);
    --shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 42, 38, 0.10);
    --shadow-lg: 0 8px 32px rgba(45, 42, 38, 0.12);
    --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #2D2A26 0%, #3D3832 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    gap: 2rem;
    box-shadow: 0 2px 12px rgba(45, 42, 38, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-brand {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; gap: 0.25rem; }

.nav-links a {
    color: #B0A99F;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-links a:hover { color: white; background: rgba(255,255,255,0.08); }
.nav-links a.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(194, 120, 92, 0.3);
}

.nav-logout-form { margin-left: auto; }

.nav-logout {
    color: #B0A99F;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.825rem;
    font-family: inherit;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-logout:hover { color: white; background: rgba(196, 64, 64, 0.25); }

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 {
    margin-bottom: 1.75rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* Flash messages */
.flash-messages { margin-bottom: 1.25rem; }

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.flash-success { background: #ECF5EE; color: #2D6B3F; border-color: #C8E6CE; }
.flash-error { background: #FAECEC; color: #8B2D2D; border-color: #F0CDCD; }
.flash-warning { background: #FDF3E0; color: #7A5C1A; border-color: #F0DDB3; }

/* Status grid (dashboard) */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.status-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}

.status-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.status-value { font-size: 1.2rem; font-weight: 700; }
.status-on { color: var(--success); }
.status-off { color: var(--text-muted); }

/* Now playing */
.now-playing {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filename { font-family: 'JetBrains Mono', monospace; font-size: 0.875rem; }
.duration { color: var(--text-light); font-size: 0.825rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-fourn { background: #E3ECF8; color: #2B5299; }
.badge-prod { background: #FDF3E0; color: #7A5C1A; }
.badge-rece { background: #ECF5EE; color: #2D6B3F; }
.badge-pub { background: #F8E8F0; color: #8B2D6B; }
.badge-video { background: #E8E4F8; color: #4A3D8F; }
.badge-image { background: #FDF3E0; color: #7A5C1A; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 0.7rem 1.25rem;
    text-decoration: none;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.tab:hover { color: var(--text); }
.tab-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-count {
    background: var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 0.4rem;
    font-weight: 600;
}

.tab-active .tab-count {
    background: rgba(194, 120, 92, 0.15);
    color: var(--primary);
}

/* Upload / drag & drop */
.upload-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.drop-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 1rem;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    background: var(--bg);
}

.drop-area:hover {
    border-color: var(--primary-light);
    background: rgba(194, 120, 92, 0.03);
}

.drop-area.drop-hover {
    border-color: var(--primary);
    background: rgba(194, 120, 92, 0.06);
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

.drop-area.uploading {
    opacity: 0.5;
    pointer-events: none;
}

.drop-icon {
    font-size: 2rem;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.drop-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.btn-file {
    cursor: pointer;
    display: inline-block;
}

.btn-file input[type="file"] {
    display: none;
}

.upload-hint {
    font-size: 0.775rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Upload progress */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.2s;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    min-width: 5ch;
}

/* File grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.file-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.file-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.file-thumb {
    width: 100%;
    height: 120px;
    background: var(--border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.file-card:hover .file-thumb img {
    transform: scale(1.03);
}

.thumb-video {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    background: #2D2A26;
}

.thumb-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-video .play-overlay {
    position: absolute;
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    transition: transform var(--transition);
}

.file-card:hover .play-overlay {
    transform: scale(1.15);
}

.badge-overlay {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 0.65rem;
}

.file-info {
    padding: 0.6rem 0.75rem;
    flex: 1;
}

.file-card .file-name {
    display: block;
    font-size: 0.775rem;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.725rem;
    color: var(--text-light);
}

.btn-delete {
    width: 100%;
    border-radius: 0;
    padding: 0.4rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.file-card:hover .btn-delete {
    opacity: 1;
}

@media (hover: none) {
    .btn-delete { opacity: 0.8; }
}

/* Preview modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(45, 42, 38, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: transparent;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-content img, .modal-content video {
    border-radius: var(--radius);
}

/* Converting / pending badges */
.badge-converting {
    background: #FDF3E0;
    color: #7A5C1A;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.badge-pending {
    background: #E8E4F8;
    color: #4A3D8F;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* File list table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td { padding: 0.75rem 1rem; text-align: left; }
th {
    background: var(--bg);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
}
td { border-top: 1px solid var(--border-light); }
.file-name { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.file-size { color: var(--text-light); font-size: 0.85rem; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(194, 120, 92, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #8F4E35 100%);
    box-shadow: 0 4px 12px rgba(194, 120, 92, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--border-light);
    color: var(--text);
}
.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-hover) 100%);
    color: white;
}
.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-hover) 0%, #8B2222 100%);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #A87E2E 100%);
    color: white;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.775rem; }

.inline-form { display: inline; }

/* Sync section */
.sync-section {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

#sync-status { font-size: 0.85rem; color: var(--text-light); }

/* Settings form */
.settings-form { }

.settings-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}
.form-hint {
    display: block;
    font-size: 0.725rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

input[type="number"],
input[type="time"],
input[type="text"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(194, 120, 92, 0.12);
}

input[type="number"] { max-width: 120px; }
input[type="time"] { max-width: 160px; }

textarea { resize: vertical; }

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.pub-slot {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

/* Control panel */
.control-panel { margin-bottom: 2rem; }

.control-group {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.control-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Status panel */
.status-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.status-line {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}

.status-line:last-child { border-bottom: none; }

.status-line .label {
    font-weight: 600;
    min-width: 100px;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Storage bars */
.storage-section { margin-top: 2rem; }
.storage-cards { display: flex; flex-direction: column; gap: 0.75rem; }

.storage-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.storage-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.storage-name { font-weight: 600; font-size: 0.9rem; }

.storage-header .storage-detail {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-light);
}

.storage-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s;
}

.storage-fill.storage-warn { background: linear-gradient(90deg, var(--warning), #D4A94D); }
.storage-fill.storage-danger { background: linear-gradient(90deg, var(--danger), #D45050); }

.storage-card > .storage-detail {
    font-size: 0.775rem;
    color: var(--text-light);
}

/* Slave discovery */
.discovered-slaves { margin-bottom: 1rem; }
.discovered-slaves > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.slave-list { display: flex; flex-direction: column; gap: 0.4rem; }

.slave-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.slave-item:hover { background: var(--border-light); }

.slave-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-online { background: var(--success); box-shadow: 0 0 6px rgba(91, 154, 107, 0.4); }
.dot-offline { background: var(--text-muted); }

.slave-name { font-weight: 600; }
.slave-ip { color: var(--text-light); font-family: 'JetBrains Mono', monospace; font-size: 0.775rem; }
.slave-status { margin-left: auto; color: var(--text-light); font-size: 0.775rem; }

.discovery-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Auth pages (login / setup) */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg) 0%, #F0E8E0 100%);
}

.auth-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-logo {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
}

.auth-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form .form-group { margin-bottom: 1rem; }

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.7rem;
    font-size: 1rem;
}

/* History */
.history-section { margin-top: 2rem; }

.history-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    transition: background var(--transition);
}

.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--bg); }

.history-time {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-light);
    min-width: 60px;
    font-size: 0.775rem;
}

.history-file {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.775rem;
}

.history-dur {
    color: var(--text-light);
    font-size: 0.775rem;
    min-width: 35px;
    text-align: right;
}

/* System page */
.system-section {
    margin-bottom: 1.5rem;
}

.system-section h2 {
    margin-bottom: 0.75rem;
}

/* Log page */
.log-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.log-controls select {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--card-bg);
    color: var(--text);
    transition: border-color var(--transition);
}

.log-controls select:focus {
    outline: none;
    border-color: var(--primary);
}

.log-auto-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.log-output {
    background: #1E1C1A;
    color: #D4CFC8;
    padding: 1.25rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.5;
    overflow: auto;
    max-height: 70vh;
    white-space: pre-wrap;
    word-break: break-all;
    box-shadow: var(--shadow-md);
}

/* Stats section */
.stats-section { margin-top: 2rem; }

/* Content stats section */
.content-stats { margin-bottom: 2rem; }

/* Badge fallback for dynamic categories */
.badge-autre { background: var(--border); color: var(--text-light); }

/* Category management */
.cat-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.cat-item:hover { background: var(--border-light); }

.cat-name { font-weight: 600; font-size: 0.9rem; }
.cat-slug {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.775rem;
    color: var(--text-light);
    background: var(--border-light);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* Modal card (delete category) */
.modal-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.modal-card h3 { font-size: 1.1rem; font-weight: 600; }

/* Widget toggles */
.widget-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.widget-toggle {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
}

/* Report table */
.table-wrap {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.report-table th,
.report-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.report-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg);
    position: sticky;
    top: 0;
}

.report-table tbody tr:hover {
    background: var(--border-light);
}

.badge-cat {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Daypart blocks */
.daypart-block {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .nav-links { flex-wrap: wrap; justify-content: center; }
    .nav-logout-form { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
    .upload-row { flex-direction: column; }
    .container { padding: 1.25rem 1rem; }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection color */
::selection {
    background: rgba(194, 120, 92, 0.2);
    color: var(--text);
}
