/* ========================================
   DOCHÁZKOVNA — Premium Dark UI
   ======================================== */

:root {
    /* Surface */
    --bg: #0a0a0f;
    --surface-1: rgba(255,255,255,0.04);
    --surface-2: rgba(255,255,255,0.07);
    --surface-3: rgba(255,255,255,0.10);
    --surface-card: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.15);

    /* Text */
    --text-1: #f0f0f5;
    --text-2: rgba(255,255,255,0.6);
    --text-3: rgba(255,255,255,0.35);

    /* Brand */
    --accent: #6366f1;
    --accent-soft: rgba(99,102,241,0.15);
    --green: #22c55e;
    --green-soft: rgba(34,197,94,0.15);
    --red: #ef4444;
    --red-soft: rgba(239,68,68,0.15);
    --amber: #f59e0b;
    --amber-soft: rgba(245,158,11,0.15);
    --blue: #3b82f6;
    --blue-soft: rgba(59,130,246,0.15);
    --slate: #64748b;
    --slate-soft: rgba(100,116,139,0.15);

    /* Radius */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 999px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ===== ANIMATED BACKGROUND ===== */
.bg-mesh {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34,197,94,0.08), transparent),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(239,68,68,0.06), transparent);
}

.bg-glow {
    position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.4; z-index: 0;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}
.bg-glow--1 { width: 600px; height: 600px; top: -200px; left: -100px; background: rgba(99,102,241,0.2); }
.bg-glow--2 { width: 500px; height: 500px; bottom: -150px; right: -100px; background: rgba(34,197,94,0.12); animation-delay: -7s; }
.bg-glow--3 { width: 400px; height: 400px; top: 40%; left: 60%; background: rgba(239,68,68,0.08); animation-delay: -14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ===== NAV ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
}
.nav__inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; gap: 16px;
    position: relative;
}
.nav__brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 18px; color: var(--text-1);
}
.nav__logo-img {
    height: 38px; width: auto;
    filter: brightness(0) invert(1);
}

/* Auth logo */
.auth-logo {
    width: 180px; height: auto;
    filter: brightness(0) invert(1);
    margin: 0 auto 28px;
    display: block;
    opacity: 0.9;
}
.nav__user {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px;
}
.nav__avatar {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--border);
}
.nav__name { font-size: 14px; font-weight: 600; color: var(--text-2); }
.nav__actions { display: flex; align-items: center; gap: 8px; }

/* Chips (nav buttons) */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 600; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text-2);
    cursor: pointer; transition: all 0.2s;
}
.chip:hover { background: var(--surface-3); color: var(--text-1); border-color: var(--border-hover); }
.chip svg { width: 14px; height: 14px; }
.chip--logout { border-color: rgba(239,68,68,0.3); color: var(--red); }
.chip--logout:hover { background: var(--red-soft); border-color: var(--red); }
.chip--admin { border-color: rgba(99,102,241,0.3); color: var(--accent); }
.chip--admin:hover { background: var(--accent-soft); }
.chip--my { border-color: rgba(34,197,94,0.3); color: var(--green); }
.chip--my:hover { background: var(--green-soft); }

/* ===== SCREENS ===== */
.screen {
    position: relative; z-index: 1;
    display: none;
    min-height: calc(100vh - 64px);
    padding: 40px 20px 80px;
    justify-content: center; align-items: flex-start;
}
.screen.active { display: flex; }

/* ===== AUTH SCREEN ===== */
.screen--auth { align-items: center; }
.auth-card {
    text-align: center;
    max-width: 420px; width: 100%;
    padding: 60px 40px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    backdrop-filter: blur(40px);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-card__icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 28px;
    color: var(--accent);
    position: relative;
}
.auth-card__icon svg { width: 36px; height: 36px; }
.pulse-ring::after {
    content: ''; position: absolute; inset: -8px;
    border-radius: 50%; border: 2px solid var(--accent);
    animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}
.auth-card__title { font-size: 32px; font-weight: 900; margin-bottom: 8px; letter-spacing: -0.03em; }
.auth-card__sub { color: var(--text-2); font-size: 16px; margin-bottom: 36px; line-height: 1.5; }

.btn-login {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 16px 32px;
    background: var(--accent);
    color: white; font-size: 16px; font-weight: 700;
    border: none; border-radius: var(--r-full);
    cursor: pointer;
    box-shadow: 0 0 30px rgba(99,102,241,0.3);
    transition: all 0.3s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(99,102,241,0.5); }
.btn-login:active { transform: scale(0.97); }

/* ===== LOADER ===== */
.screen--loader { align-items: center; }
.loader { text-align: center; color: var(--text-2); font-size: 14px; font-weight: 600; }
.loader__ring {
    width: 48px; height: 48px; margin: 0 auto 16px;
    border: 3px solid var(--surface-3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MAIN CARD ===== */
.screen--main { justify-content: center; align-items: flex-start; }
.card {
    width: 100%; max-width: 520px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    backdrop-filter: blur(40px);
    padding: 32px;
    animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card Header (month nav) */
.card__header {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 8px;
}
.card__month span {
    font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
    min-width: 200px; text-align: center; display: block;
}
.month-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text-2);
    cursor: pointer; transition: all 0.2s;
}
.month-btn:hover { background: var(--surface-3); color: var(--text-1); border-color: var(--border-hover); }
.month-btn svg { width: 18px; height: 18px; }

/* Year bar */
.year-bar {
    display: flex; justify-content: center; gap: 6px;
    margin-bottom: 28px; flex-wrap: wrap;
}
.ypill {
    padding: 5px 14px; border-radius: var(--r-full);
    font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
    background: var(--surface-2); color: var(--text-3);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.ypill.submitted { background: var(--green-soft); color: var(--green); border-color: rgba(34,197,94,0.2); }
.ypill.current { border-color: var(--accent); color: var(--accent); }

/* ---- Views inside card ---- */
.view { display: none; flex-direction: column; animation: viewIn 0.35s ease; }
.view.active { display: flex; }
@keyframes viewIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Question */
.q-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--accent-soft);
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 24px; color: var(--accent);
}
.q-icon svg { width: 32px; height: 32px; }
.q-title {
    text-align: center; font-size: 24px; font-weight: 800;
    line-height: 1.3; margin-bottom: 32px; letter-spacing: -0.02em;
}
.q-actions { display: flex; flex-direction: column; gap: 14px; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 28px; border-radius: var(--r-md);
    font-size: 16px; font-weight: 700; border: none;
    cursor: pointer; transition: all 0.25s;
    position: relative; overflow: hidden;
}
.btn svg { width: 20px; height: 20px; }
.btn--xl { padding: 20px 32px; font-size: 17px; border-radius: var(--r-lg); }
.btn--full { width: 100%; }

.btn--green {
    background: var(--green); color: #fff;
    box-shadow: 0 4px 20px rgba(34,197,94,0.25);
}
.btn--green:hover { box-shadow: 0 8px 30px rgba(34,197,94,0.4); transform: translateY(-2px); }

.btn--red {
    background: var(--surface-2); color: var(--text-1);
    border: 1px solid var(--border);
}
.btn--red:hover { background: var(--red-soft); border-color: rgba(239,68,68,0.3); color: var(--red); }

.btn--outline {
    background: transparent; color: var(--text-2);
    border: 1px solid var(--border); border-radius: var(--r-full);
    padding: 12px 24px;
}
.btn--outline:hover { background: var(--surface-2); color: var(--text-1); }

.btn.disabled { opacity: 0.35; pointer-events: none; filter: grayscale(1); }

.link-back {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; color: var(--text-3);
    font-size: 13px; font-weight: 600; cursor: pointer;
    margin-bottom: 20px; padding: 0; transition: color 0.2s;
}
.link-back:hover { color: var(--text-1); }
.link-back svg { width: 16px; height: 16px; }

/* ---- Calendar ---- */
.cal-instruction {
    font-size: 14px; color: var(--text-2); margin-bottom: 16px; text-align: center;
}

/* Palette */
.palette {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
    margin-bottom: 24px;
}
.pal {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px; border-radius: var(--r-full);
    font-size: 13px; font-weight: 700;
    background: var(--surface-2); color: var(--text-2);
    border: 2px solid transparent;
    cursor: pointer; transition: all 0.2s;
}
.pal svg { width: 16px; height: 16px; }
.pal span { display: inline; }
.pal:hover { background: var(--surface-3); }

/* Palette active states */
.pal.active[data-color="blue"]   { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.pal.active[data-color="amber"]  { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.pal.active[data-color="rose"]   { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.pal.active[data-color="slate"]  { background: var(--slate-soft); color: var(--slate); border-color: var(--slate); }
.pal.active[data-color="neutral"]{ background: var(--surface-3); color: var(--text-1); border-color: var(--text-3); }

/* Calendar Grid */
.cal {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.cal__head {
    display: grid; grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-3);
    margin-bottom: 10px;
}
.cal__body {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.day {
    aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600;
    border-radius: var(--r-sm);
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text-2);
    transition: all 0.15s;
    user-select: none;
    border: 2px solid transparent;
}
.day:not(.empty):hover { background: var(--surface-3); transform: scale(1.08); color: var(--text-1); }
.day.empty { background: transparent; pointer-events: none; }
.day.weekend { color: rgba(239,68,68,0.5); }

/* Painted day states — must override :hover */
.day[data-type="dovolena"], .day[data-type="dovolena"]:hover { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,0.35); border-color: transparent; transform: scale(1); }
.day[data-type="nemoc"],    .day[data-type="nemoc"]:hover    { background: var(--amber); color: #fff; box-shadow: 0 4px 12px rgba(245,158,11,0.35); border-color: transparent; transform: scale(1); }
.day[data-type="lekar"],    .day[data-type="lekar"]:hover    { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(239,68,68,0.35); border-color: transparent; transform: scale(1); }
.day[data-type="ocr"],      .day[data-type="ocr"]:hover      { background: var(--slate); color: #fff; box-shadow: 0 4px 12px rgba(100,116,139,0.35); border-color: transparent; transform: scale(1); }

/* Success */
.success-ring {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--green-soft);
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 24px; color: var(--green);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.success-ring svg { width: 40px; height: 40px; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

.success-title {
    text-align: center; font-size: 28px; font-weight: 800;
    color: var(--green); margin-bottom: 8px;
}
.success-sub { text-align: center; color: var(--text-2); font-size: 15px; line-height: 1.5; margin-bottom: 12px; }
.countdown-text { text-align: center; font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 16px; }

/* ===== ADMIN ===== */
.screen--admin { align-items: flex-start; justify-content: center; padding-bottom: 20px; }
.admin {
    width: 100%; max-width: 900px;
    display: flex; flex-direction: column;
    height: calc(100vh - 104px);
    animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin__header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.admin__title-row {
    display: flex; align-items: center; gap: 14px;
}
.admin__icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--accent-soft); color: var(--accent);
    display: flex; justify-content: center; align-items: center;
}
.admin__icon svg { width: 24px; height: 24px; }
.admin__header h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.admin__month-nav {
    display: flex; align-items: center; gap: 8px;
}
.admin__month-nav span { font-size: 16px; font-weight: 700; min-width: 150px; text-align: center; }

.admin__list {
    display: flex; flex-direction: column; gap: 10px;
    flex: 1; overflow-y: auto; min-height: 0;
    padding-right: 4px;
}
/* Scrollbar styling */
.admin__list::-webkit-scrollbar { width: 6px; }
.admin__list::-webkit-scrollbar-track { background: transparent; }
.admin__list::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.admin__list::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

.admin__empty {
    text-align: center; padding: 60px 20px;
    color: var(--text-3); font-size: 15px;
}

/* Employee Row */
.emp-row {
    display: flex; align-items: center; gap: 20px;
    padding: 20px 24px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(20px);
    transition: all 0.2s;
}
.emp-row:hover { border-color: var(--border-hover); background: var(--surface-2); }

.emp-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    display: flex; justify-content: center; align-items: center;
    font-size: 18px; font-weight: 800; flex-shrink: 0;
}
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.emp-email { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.emp-status { flex-shrink: 0; }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--r-full);
    font-size: 12px; font-weight: 700;
}
.badge svg { width: 14px; height: 14px; }
.badge--ok { background: var(--green-soft); color: var(--green); }
.badge--partial { background: var(--amber-soft); color: var(--amber); }

.emp-details {
    display: flex; flex-wrap: wrap; gap: 6px;
    flex-shrink: 0;
}
.dtag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: var(--r-full);
    font-size: 11px; font-weight: 700; color: #fff;
}
.dtag svg { width: 12px; height: 12px; }
.dtag--dovolena { background: var(--blue); }
.dtag--nemoc { background: var(--amber); }
.dtag--lekar { background: var(--red); }
.dtag--ocr { background: var(--slate); }

/* ===== STATS BAR ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    flex-shrink: 0;
}
.stat-box {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px 12px;
    text-align: center;
}
.stat-num {
    font-size: 28px; font-weight: 900; letter-spacing: -0.03em;
    color: var(--text-1); line-height: 1;
}
.stat-label {
    font-size: 11px; font-weight: 700; color: var(--text-3);
    text-transform: uppercase; letter-spacing: 0.04em; margin-top: 6px;
}
.stat-box--green .stat-num { color: var(--green); }
.stat-box--amber .stat-num { color: var(--amber); }
.stat-box--red .stat-num { color: var(--red); }

.stat-progress {
    grid-column: 1 / -1;
    height: 6px; border-radius: 3px;
    background: var(--surface-2);
    overflow: hidden;
}
.stat-progress__bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--green), var(--accent));
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin__toolbar {
    display: flex; gap: 8px; margin-bottom: 12px;
    flex-shrink: 0;
}
.chip--csv { border-color: rgba(34,197,94,0.3); color: var(--green); }
.chip--csv:hover { background: var(--green-soft); }
.chip--csv:disabled { opacity: 0.35; pointer-events: none; }

/* ===== MAIL PANEL ===== */
.mail-panel {
    margin-top: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.mail-panel__header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px;
}
.mail-panel__icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mail-panel__icon svg { width: 22px; height: 22px; }
.mail-panel__header h2 { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.mail-panel__header p { font-size: 13px; color: var(--text-3); }

.mail-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 20px; }
.tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--r-full);
    background: var(--accent-soft); color: var(--accent);
    font-size: 13px; font-weight: 600;
}
.tag__remove {
    background: none; border: none; color: var(--accent);
    cursor: pointer; padding: 0; display: flex; opacity: 0.6;
    transition: opacity 0.2s;
}
.tag__remove:hover { opacity: 1; }
.tag__remove svg { width: 14px; height: 14px; }

.mail-input-row { display: flex; gap: 8px; }
.mail-input {
    flex: 1; padding: 12px 16px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-md); color: var(--text-1);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color 0.2s;
}
.mail-input::placeholder { color: var(--text-3); }
.mail-input:focus { border-color: var(--accent); }

.btn--accent {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 20px rgba(99,102,241,0.25);
}
.btn--accent:hover { box-shadow: 0 8px 30px rgba(99,102,241,0.4); transform: translateY(-1px); }
.btn--accent:disabled { opacity: 0.4; pointer-events: none; }
.btn--sm { padding: 10px 18px; font-size: 13px; border-radius: var(--r-md); }

.mail-panel__recipients { margin-bottom: 20px; }
.mail-panel__actions { margin-top: 8px; }
.mail-status {
    text-align: center; font-size: 13px; font-weight: 600;
    margin-top: 12px; min-height: 20px;
}

/* Search */
.search-wrap {
    flex: 1; position: relative;
}
.search-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-3); pointer-events: none;
}
.search-input {
    width: 100%; padding: 10px 16px 10px 40px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--r-full); color: var(--text-1);
    font-size: 14px; font-family: inherit; outline: none;
    transition: border-color 0.2s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav__inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 8px; }
    .nav__brand { order: 1; }
    .nav__user { position: static; transform: none; order: 2; margin-left: auto; }
    .nav__actions { order: 3; width: 100%; justify-content: flex-end; gap: 6px; }
    .nav__logo-img { height: 28px; }
    
    .screen { padding: 24px 16px 80px; }
    .card { padding: 24px 20px; border-radius: var(--r-lg); }
    .card__month span { font-size: 18px; min-width: 160px; }
    
    .auth-card { padding: 40px 24px; }
    .auth-card__title { font-size: 26px; }
    .auth-logo { width: 140px; }

    .q-title { font-size: 20px; }
    .btn--xl { padding: 16px 24px; font-size: 15px; }

    .pal span { display: none; }
    .pal { padding: 10px 12px; }

    .day { font-size: 13px; border-radius: 8px; }
    .cal { padding: 14px; }
    .cal__body { gap: 4px; }

    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-box { padding: 12px 8px; }
    .stat-num { font-size: 22px; }

    .emp-row { padding: 12px 16px; gap: 10px; }
    .emp-avatar { width: 36px; height: 36px; font-size: 14px; }
    .emp-name { font-size: 14px; }
    .emp-details { width: 100%; }
    
    .admin__header { flex-direction: column; align-items: flex-start; }
    .admin__toolbar { flex-direction: column; }

    .mail-panel__header { flex-direction: column; gap: 10px; }
    .mail-input-row { flex-direction: column; }

    .footer-pill { padding: 8px 16px; }
    .footer-logo { height: 22px; }
}

@media (max-width: 400px) {
    .nav { padding: 0 12px; }
    .chip { padding: 6px 10px; font-size: 11px; }
    .card { padding: 20px 16px; }
    .btn { padding: 14px 20px; font-size: 14px; }
    .pal { padding: 8px 10px; font-size: 12px; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ===== FOOTER ===== */
.site-footer {
    position: fixed; bottom: 20px; left: 0; right: 0;
    z-index: 90;
    display: flex; justify-content: center;
    pointer-events: none;
}
.footer-pill {
    display: inline-flex; align-items: center; gap: 14px;
    padding: 10px 22px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    pointer-events: auto;
}
.footer-logo { height: 28px; width: auto; filter: brightness(0) invert(1); opacity: 0.7; }
.footer-divider { width: 1px; height: 20px; background: var(--border); }
.footer-text { font-size: 13px; color: var(--text-3); font-weight: 500; margin: 0; }
.footer-link { color: var(--green); font-weight: 700; text-decoration: none; transition: opacity 0.2s; }
.footer-link:hover { text-decoration: underline; opacity: 0.8; }
