:root {
    --bg-base: #f0f4f8;
    --bg-surface: #ffffff;
    --bg-surface-hover: #e8edf2;
    --border-color: #d1d9e6;

    --text-primary: #1a2332;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #2563eb;
    --accent-primary-hover: #1d4ed8;
    --accent-secondary: #06b6d4;

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --info-bg: rgba(37, 99, 235, 0.12);

    --stage-procesos: #2563eb;
    --stage-manuales: #8b5cf6;
    --stage-mejora: #06b6d4;
    --stage-organizacional: #f59e0b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Base Layout */
.app-container { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.brand i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.brand h2 span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links li i { font-size: 1.15rem; flex-shrink: 0; }

.nav-links li:hover {
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--text-primary);
}

.nav-links li.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), transparent);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.5rem 0.875rem 0.25rem;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-role { font-size: 0.75rem; color: var(--text-muted); }

/* Main Content */
.content-area {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-base);
    position: relative;
}

.view {
    display: none;
    padding: 2rem 2.5rem;
    animation: fadeIn 0.3s ease-in-out;
}

.view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-header { margin-bottom: 2rem; }
.view-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.subtitle { color: var(--text-secondary); font-size: 1rem; }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-row { display: flex; gap: 0.75rem; align-items: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn i { font-size: 1.15rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: var(--radius-sm); }

.btn-icon {
    padding: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bg-surface-hover); }

/* Forms */
input[type="text"], input[type="number"], input[type="date"],
input[type="password"], select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.primary { background-color: var(--info-bg); color: var(--accent-primary); }
.stat-icon.success { background-color: var(--success-bg); color: var(--success); }
.stat-icon.warning { background-color: var(--warning-bg); color: var(--warning); }
.stat-icon.error { background-color: var(--error-bg); color: var(--error); }
.stat-icon.purple { background-color: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.stat-icon.cyan { background-color: rgba(6, 182, 212, 0.12); color: #06b6d4; }

.stat-info h3 { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.15rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

/* Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.25rem;
}

.widget {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.widget-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h2 { font-size: 1.1rem; font-weight: 600; }
.widget-content { padding: 1.25rem 1.5rem; flex: 1; }

.widget-full {
    grid-column: 1 / -1;
}

/* Tables */
.table-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.data-table { width: 100%; border-collapse: collapse; text-align: left; }

.data-table th, .data-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bg-surface-hover);
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background-color: rgba(37, 99, 235, 0.03); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-excelente { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-bueno { background: rgba(6,182,212,0.12); color: #06b6d4; border: 1px solid rgba(6,182,212,0.3); }
.badge-aceptable { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-riesgo { background: rgba(249,115,22,0.12); color: #f97316; border: 1px solid rgba(249,115,22,0.3); }
.badge-critico { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,0.3); }
.badge-cumple { background: var(--success-bg); color: var(--success); }
.badge-no-cumple { background: var(--error-bg); color: var(--error); }
.badge-alerta { background: var(--warning-bg); color: var(--warning); }

/* Progress bars */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-base);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.progress-bar.excellent { background: linear-gradient(90deg, var(--success), #34d399); }
.progress-bar.good { background: linear-gradient(90deg, var(--accent-secondary), #22d3ee); }
.progress-bar.acceptable { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-bar.risk { background: linear-gradient(90deg, #f97316, #fb923c); }
.progress-bar.critical { background: linear-gradient(90deg, var(--error), #f87171); }

/* Rubro Cards */
.rubro-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.rubro-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.rubro-header:hover { filter: brightness(0.95); }

.rubro-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rubro-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.rubro-header.procesos { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.rubro-header.manuales { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.rubro-header.mejora { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.rubro-header.organizacional { background: linear-gradient(135deg, #d97706, #f59e0b); }

.rubro-body { padding: 1.25rem 1.5rem; }

.rubro-body.collapsed { display: none; }

/* Checklist items */
.check-row {
    display: grid;
    grid-template-columns: 1fr repeat(6, 48px);
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.check-row:last-child { border-bottom: none; }

.check-row .activity-name {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.check-row .day-header {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.day-check {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-base);
    margin: 0 auto;
    font-size: 0.9rem;
}

.day-check:hover { border-color: var(--accent-primary); background: rgba(37,99,235,0.05); }

.day-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.day-check.partial {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.day-check.na {
    background: var(--bg-surface-hover);
    border-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Simple check items (manuales, mejora, org) */
.simple-check-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.simple-check-row:last-child { border-bottom: none; }

.simple-check {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-base);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.simple-check:hover { border-color: var(--accent-primary); }
.simple-check.checked { background: var(--success); border-color: var(--success); color: white; }

.simple-check-row .activity-name { font-size: 0.88rem; flex: 1; }
.simple-check-row .obs-input {
    width: 200px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Semaforo */
.semaforo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.semaforo-item {
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.semaforo-item .range { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; }
.semaforo-item .label { font-size: 0.72rem; text-transform: uppercase; font-weight: 600; }

.semaforo-item.s-excelente { background: var(--success-bg); color: var(--success); border-color: rgba(16,185,129,0.3); }
.semaforo-item.s-bueno { background: rgba(6,182,212,0.12); color: #06b6d4; border-color: rgba(6,182,212,0.3); }
.semaforo-item.s-aceptable { background: var(--warning-bg); color: var(--warning); border-color: rgba(245,158,11,0.3); }
.semaforo-item.s-riesgo { background: rgba(249,115,22,0.12); color: #f97316; border-color: rgba(249,115,22,0.3); }
.semaforo-item.s-critico { background: var(--error-bg); color: var(--error); border-color: rgba(239,68,68,0.3); }

/* Observaciones */
.obs-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.obs-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.obs-card textarea {
    min-height: 70px;
    resize: vertical;
}

/* KPI donut placeholder */
.kpi-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
}

.kpi-ring::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--bg-surface);
}

.kpi-ring span { position: relative; z-index: 1; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideUp 0.3s ease;
    font-weight: 500;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar {
        width: 100%;
        padding: 0.75rem 1rem;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }
    .brand { margin-bottom: 0; margin-right: 1rem; }
    .nav-links { flex-direction: row; }
    .nav-links li span { display: none; }
    .sidebar-footer { display: none; }
    .view { padding: 1.25rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-widgets { grid-template-columns: 1fr; }
    .check-row { grid-template-columns: 1fr repeat(6, 36px); }
    .semaforo-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-divider, .nav-section-title { display: none; }
}

/* Login Screen */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 30%, #f0f4f8 100%);
    z-index: 9999;
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.45s ease-out;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
}

.login-brand h1 span { color: var(--accent-primary); font-weight: 400; }
.login-brand p { color: var(--text-secondary); font-size: 0.9rem; }

.login-error {
    color: var(--error);
    background-color: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Section panels */
.section-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.section-header {
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.section-header:hover { filter: brightness(0.97); }

.section-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header .section-badge {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-sm);
}

.section-header.h-blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.section-header.h-purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.section-header.h-cyan { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.section-header.h-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.section-header.h-green { background: linear-gradient(135deg, #059669, #10b981); }
.section-header.h-red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.section-header.h-slate { background: linear-gradient(135deg, #475569, #64748b); }

.section-body { padding: 1rem 1.25rem; }
.section-body.collapsed { display: none; }

/* Reminder items */
.reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.reminder-item:last-child { border-bottom: none; }

.reminder-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-base);
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.7rem;
}

.reminder-check:hover { border-color: var(--accent-primary); }
.reminder-check.done { background: var(--success); border-color: var(--success); color: white; }

.reminder-info h4 { font-size: 0.85rem; font-weight: 600; }
.reminder-info p { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.reminder-info .r-time { font-size: 0.7rem; color: var(--accent-primary); font-weight: 600; }

/* Lunch tracker */
.lunch-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.lunch-row label { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); min-width: 60px; }
.lunch-row input[type="time"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
}

/* Activity item */
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.activity-item:last-child { border-bottom: none; }
.activity-item .a-time {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 600;
    min-width: 90px;
}
.activity-item .a-desc { font-size: 0.85rem; flex: 1; }
.activity-item .a-done {
    width: 22px; height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: var(--transition);
}
.activity-item .a-done.checked { background: var(--success); border-color: var(--success); color: white; }

/* Employee card in coordinator view */
.emp-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: var(--transition);
    cursor: pointer;
}

.emp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.emp-card .emp-name { font-weight: 600; font-size: 0.95rem; }
.emp-card .emp-dept { font-size: 0.78rem; color: var(--text-muted); }
.emp-card .emp-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Config panel */
.config-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.config-card h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.2s ease;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

.modal-body { padding: 1.25rem; }

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
}
.btn-close:hover { color: var(--error); }

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.tab {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab:hover { color: var(--text-primary); }
.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* Inline add row */
.add-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.add-row input, .add-row select {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
}

@media print {
    .sidebar { display: none; }
    .view { padding: 1rem; }
    .btn { display: none; }
}
