/* =====================================================================
   AWCS — Design tokens
   Palette: Ink (deep navy) + Paper (soft white) + Teal accent + Amber
   Type: Sora (display) / Inter (body/UI) / IBM Plex Mono (time & data)
   Signature motif: the "shift strip" — a segmented bar representing a
   working day, echoed throughout the product wherever time is shown.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --ink: #12172B;
    --ink-soft: #1B2140;
    --ink-line: #2B3155;
    --paper: #F6F7FB;
    --card: #FFFFFF;
    --line: #E4E7F0;
    --slate: #5B6478;
    --slate-light: #8A93A8;
    --teal: #17B897;
    --teal-dark: #0E9C7F;
    --teal-tint: #E4FAF4;
    --amber: #F5A623;
    --amber-tint: #FEF3E0;
    --red: #E5484D;
    --red-tint: #FBE7E7;

    --radius: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(18, 23, 43, 0.06);
    --shadow-md: 0 8px 24px rgba(18, 23, 43, 0.08);
    --shadow-lg: 0 20px 48px rgba(18, 23, 43, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

.mono, time, .time-val, .stat-value, .badge-time {
    font-family: 'IBM Plex Mono', monospace;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--teal); color: #fff; }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =====================================================================
   Signature motif — the Shift Strip
   A segmented horizontal bar: filled teal blocks are worked task time,
   striped amber blocks are breaks, faint blocks are the remaining day.
   ===================================================================== */
.shift-strip {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 10px;
    width: 100%;
    border-radius: 999px;
    overflow: hidden;
    background: var(--ink-line);
}
.shift-strip span {
    height: 100%;
    display: block;
    border-radius: 2px;
}
.shift-strip .seg-work { background: var(--teal); }
.shift-strip .seg-break {
    background: repeating-linear-gradient(45deg, var(--amber), var(--amber) 3px, #ffffff55 3px, #ffffff55 6px);
}
.shift-strip .seg-empty { background: rgba(255,255,255,0.08); }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--teal); color: #fff; }
.btn-accent:hover { background: var(--teal-dark); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* =====================================================================
   Forms
   ===================================================================== */
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 7px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input, select.input, textarea.input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-tint);
}
.input::placeholder { color: var(--slate-light); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--slate-light); width: 18px; height: 18px;
}
.input-icon-wrap .input { padding-left: 42px; }
.help-text { font-size: 12.5px; color: var(--slate-light); margin-top: 6px; }
.error-text { font-size: 12.5px; color: var(--red); margin-top: 6px; }

/* =====================================================================
   Alerts / flash messages
   ===================================================================== */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 10px;
}
.alert-success { background: var(--teal-tint); color: var(--teal-dark); }
.alert-error { background: var(--red-tint); color: var(--red); }
.alert-warn { background: var(--amber-tint); color: #9A6200; }

/* =====================================================================
   Badges
   ===================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-admin { background: #EDE9FE; color: #6D28D9; }
.badge-hr { background: var(--amber-tint); color: #9A6200; }
.badge-employee { background: var(--teal-tint); color: var(--teal-dark); }
.badge-active { background: var(--teal-tint); color: var(--teal-dark); }
.badge-inactive { background: #EEF0F5; color: var(--slate); }
.badge-pending { background: var(--amber-tint); color: #9A6200; }
.badge-completed { background: var(--teal-tint); color: var(--teal-dark); }
.badge-progress { background: #E6EEFE; color: #2563EB; }
.badge-stopped { background: #F1EEFB; color: #6D28D9; }
.badge-cancelled { background: var(--red-tint); color: var(--red); }

/* EpicStitch instance tabs + stat chips */
.instance-tabs {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 14px 24px; border-bottom: 1px solid var(--line);
}
.instance-tab {
    padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    color: var(--slate); border: 1px solid transparent; white-space: nowrap;
}
.instance-tab:hover { color: var(--ink); background: var(--paper); }
.instance-tab.active { background: var(--ink); color: #fff; }
.instance-tab-add {
    padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--teal-dark); border: 1px dashed var(--teal); white-space: nowrap;
}
.instance-tab-add:hover { background: var(--teal-tint); }
.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 24px 0; }
.stat-chip {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 8px 14px; font-size: 12.5px; color: var(--slate); display: flex; gap: 6px; align-items: center;
}
.stat-chip strong { color: var(--ink); font-family: 'IBM Plex Mono', monospace; }

/* =====================================================================
   App shell — sidebar + main
   ===================================================================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 252px;
    flex-shrink: 0;
    background: var(--ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 26px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden; /* keep the whole rail clipped to the viewport — nav scrolls internally instead */
}
.sidebar .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 0 8px 26px 8px;
    flex-shrink: 0;
}
.sidebar .brand .mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif; font-weight: 800; color: var(--ink); font-size: 16px;
}
.sidebar .brand .name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; }

.sidebar nav {
    flex: 1;
    min-height: 0; /* required for a flex child to actually scroll instead of overflowing */
    display: flex; flex-direction: column; gap: 3px; margin-top: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px; /* room for the scrollbar so it doesn't sit flush on the text */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); border-radius: 999px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }
.sidebar .nav-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35); padding: 16px 12px 6px;
}
.sidebar a.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.72);
    font-size: 14px; font-weight: 500;
    transition: background .12s ease, color .12s ease;
    flex-shrink: 0;
}
.sidebar a.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar a.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar a.nav-item.active { background: var(--teal); color: var(--ink); font-weight: 700; }

.sidebar .user-box {
    display: flex; align-items: center; gap: 10px;
    padding: 12px; border-radius: 12px;
    background: rgba(255,255,255,0.06);
    margin-top: 10px;
    flex-shrink: 0; /* always stays visible, pinned below the scrollable nav */
}
.sidebar .user-box .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--teal); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: 'Sora', sans-serif; font-size: 13px; flex-shrink: 0;
}
.sidebar .user-box .who { min-width: 0; }
.sidebar .user-box .who .n { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-box .who .r { font-size: 11.5px; color: rgba(255,255,255,0.5); }
.sidebar .user-box a.logout { margin-left: auto; color: rgba(255,255,255,0.5); }
.sidebar .user-box a.logout:hover { color: #fff; }

.main {
    flex: 1;
    min-width: 0;
    padding: 30px 38px 60px;
}

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; gap: 20px; flex-wrap: wrap;
}
.topbar .eyebrow { font-size: 12.5px; color: var(--slate); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.topbar h1 { font-size: 26px; }
.topbar .actions { display: flex; align-items: center; gap: 12px; }

.bell-btn {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.bell-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }

/* =====================================================================
   Cards / stat grid
   ===================================================================== */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15.5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-card { padding: 20px 22px; }
a.stat-card { display: block; color: inherit; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--teal); }
.stat-card .top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card .icon-wrap {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.stat-card .icon-wrap svg { width: 19px; height: 19px; }
.stat-card .stat-value { font-size: 27px; font-weight: 600; line-height: 1; }
.stat-card .stat-label { font-size: 12.5px; color: var(--slate); margin-top: 6px; }
.stat-card .stat-delta { font-size: 12px; font-weight: 600; }
.stat-card .stat-delta.up { color: var(--teal-dark); }
.stat-card .stat-delta.down { color: var(--red); }

.icon-teal { background: var(--teal-tint); color: var(--teal-dark); }
.icon-amber { background: var(--amber-tint); color: #9A6200; }
.icon-red { background: var(--red-tint); color: var(--red); }
.icon-ink { background: #EEF0F5; color: var(--ink); }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap { overflow-x: auto; }
table.tf-table { width: 100%; border-collapse: collapse; }
table.tf-table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--slate-light); font-weight: 600;
    padding: 12px 24px; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.tf-table td {
    padding: 15px 24px; border-bottom: 1px solid var(--line);
    font-size: 14px; vertical-align: middle;
}
table.tf-table tr:last-child td { border-bottom: none; }
table.tf-table tr:hover td { background: #FAFBFD; }
table.tf-table tr.row-highlight td { background: var(--teal-tint); animation: highlight-fade 2.5s ease-out 1; }
@keyframes highlight-fade {
    0% { background: #BEF0DF; }
    100% { background: var(--teal-tint); }
}

.date-breakdown-row td { padding: 0 24px 15px; border-bottom: 1px solid var(--line); }
.date-breakdown-row:last-child td { border-bottom: none; }
.date-breakdown > summary {
    cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--slate);
    list-style: none;
}
.date-breakdown > summary::-webkit-details-marker { display: none; }
.date-breakdown > summary::before { content: '▸ '; }
.date-breakdown[open] > summary::before { content: '▾ '; }
.date-breakdown-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.date-breakdown-table td { padding: 6px 10px; font-size: 13px; border-bottom: none; }
.date-breakdown-table tr.date-breakdown-head td { font-weight: 600; color: var(--ink); padding-top: 12px; }
.date-breakdown-table tr.date-breakdown-head:first-child td { padding-top: 0; }
.date-breakdown-table tr:not(.date-breakdown-head) td:first-child { width: 24px; }
.date-breakdown-table tr:not(.date-breakdown-head) td:nth-child(2) { color: var(--slate); }

/* =====================================================================
   Pagination
   ===================================================================== */
.paginator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}
.paginator-info { font-size: 13px; color: var(--slate); }
.paginator-info strong { color: var(--ink); font-weight: 600; }
.paginator-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.paginator-size {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--slate);
}
.paginator-size select {
    font-family: inherit; font-size: 13px; color: var(--ink);
    padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--card); cursor: pointer;
}
.paginator-nav { display: flex; align-items: center; gap: 4px; }
.page-btn {
    display: flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; color: var(--ink);
    border: 1px solid transparent;
    transition: background .12s ease, border-color .12s ease;
}
.page-btn:hover:not(.disabled):not(.active) { background: #EEF0F5; }
.page-btn.active { background: var(--ink); color: #fff; }
.page-btn.disabled { color: var(--slate-light); pointer-events: none; }
.page-ellipsis { color: var(--slate-light); padding: 0 4px; font-size: 13px; }

.person-cell { display: flex; align-items: center; gap: 11px; }
.person-cell .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: 'Sora', sans-serif; font-size: 12px; flex-shrink: 0;
}
.person-cell .nm { font-weight: 600; font-size: 13.8px; }
.person-cell .em { font-size: 12px; color: var(--slate-light); }

.notes-preview { font-size: 12.5px; color: var(--slate-light); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-import-hint { font-size: 12px; color: var(--slate-light); margin-top: 6px; line-height: 1.5; }
.bulk-import-hint code { background: #EEF0F5; padding: 1px 5px; border-radius: 4px; }

.row-actions { display: flex; gap: 8px; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); background: var(--card); color: var(--slate);
    transition: all .12s ease;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }

/* =====================================================================
   Modal
   ===================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(18,23,43,0.55);
    display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--card); border-radius: var(--radius);
    width: 100%; max-width: 460px; box-shadow: var(--shadow-lg);
    max-height: 90vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* =====================================================================
   Auth / Login page (split layout)
   ===================================================================== */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
    background: var(--ink);
    color: #fff;
    padding: 56px;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(23,184,151,0.18), transparent 45%),
                radial-gradient(circle at 80% 80%, rgba(23,184,151,0.10), transparent 40%);
}
.auth-brand .brand-mark { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.auth-brand .brand-mark .mark {
    width: 40px; height: 40px; border-radius: 11px; background: var(--teal);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Sora', sans-serif; font-weight: 800; color: var(--ink); font-size: 18px;
}
.auth-brand .brand-mark .name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 19px; }

.auth-brand .pitch { position: relative; z-index: 1; max-width: 440px; }
.auth-brand .pitch h1 { font-size: 38px; line-height: 1.15; color: #fff; margin-bottom: 16px; }
.auth-brand .pitch p { color: rgba(255,255,255,0.6); font-size: 15px; line-height: 1.6; }

.auth-brand .day-preview { position: relative; z-index: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px; }
.auth-brand .day-preview .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); margin-bottom: 12px; }
.auth-brand .day-preview .legend { display: flex; gap: 18px; margin-top: 12px; }
.auth-brand .day-preview .legend span { font-size: 12px; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 6px; }
.auth-brand .day-preview .legend .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--paper); }
.auth-form { width: 100%; max-width: 380px; }
.auth-form .head { margin-bottom: 32px; }
.auth-form .head h2 { font-size: 25px; margin-bottom: 6px; }
.auth-form .head p { color: var(--slate); font-size: 14px; }
.auth-form .foot-note { text-align: center; margin-top: 22px; font-size: 13px; color: var(--slate); }
.auth-form .divider-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.auth-form .divider-row a { font-size: 13px; color: var(--teal-dark); font-weight: 600; }
.remember-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--slate); }

/* =====================================================================
   Page header / section utilities
   ===================================================================== */
.section-title { font-size: 18px; margin-bottom: 4px; }
.section-sub { color: var(--slate); font-size: 13.5px; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--slate); }
.empty-state svg { width: 44px; height: 44px; color: var(--slate-light); margin-bottom: 14px; }
.empty-state h4 { font-size: 15.5px; margin-bottom: 6px; color: var(--ink); }
.empty-state p { font-size: 13.5px; }

.chip-toggle { display: inline-flex; background: #EEF0F5; border-radius: 10px; padding: 3px; }
.chip-toggle a { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 8px; color: var(--slate); }
.chip-toggle a.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Role permission checklist grid (roles page) */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.perm-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; }
.perm-item input { width: 16px; height: 16px; accent-color: var(--teal); }

/* =====================================================================
   Dashboard calendar
   ===================================================================== */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-weekday { text-align: center; font-size: 11px; font-weight: 600; color: var(--slate-light); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 6px; }
.calendar-day {
    aspect-ratio: 1;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--card);
    cursor: pointer;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.calendar-day:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.calendar-day.is-empty { visibility: hidden; pointer-events: none; }
.calendar-day.is-future { opacity: .45; cursor: default; pointer-events: none; }
.calendar-day.is-today { border-color: var(--teal); border-width: 2px; }
.calendar-day .day-num { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 13px; color: var(--ink); }
.calendar-day .day-stat { font-size: 10.5px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.calendar-day .day-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.calendar-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.calendar-legend span { font-size: 12px; color: var(--slate); display: flex; align-items: center; gap: 6px; }
.calendar-legend .day-dot { width: 8px; height: 8px; border-radius: 50%; }

@media (max-width: 720px) {
    .calendar-day .day-stat span:last-child { display: none; }
}

/* Responsive */
@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}
@media (max-width: 720px) {
    .sidebar { position: fixed; left: -260px; z-index: 90; transition: left .2s ease; }
    .sidebar.open { left: 0; }
    .main { padding: 20px; }
    .stat-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
}
