@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=DM+Mono:wght@300;400;500&display=swap');

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

:root {
    --bg:         #0A0A0F;
    --surface:    rgba(255,255,255,0.025);
    --border:     rgba(255,255,255,0.07);
    --text:       #E8E0D0;
    --muted:      rgba(232,224,208,0.35);
    --gold:       #E8C547;
    --teal:       #4ECDC4;
    --amber:      #FFB347;
    --red:        #FF6B6B;
    --lavender:   #A8A8D8;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-mono:  'DM Mono', 'Courier New', monospace;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-serif);
    min-height: 100vh;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

/* ── NAV ── */
.nav {
    position: sticky; top: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 44px;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(14px);
}
.nav-brand { font-size: 24px; font-weight: 700; color: var(--gold); letter-spacing: .08em; }
.nav-sub   { font-family: var(--font-mono); font-size: 9px; color: rgba(232,224,208,.28); letter-spacing: .2em; margin-top: 2px; }
.nav-right { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; }

/* ── PAGE WRAPPER ── */
.page { padding: 44px; }

/* ── HERO HEADING ── */
.hero-title { font-size: 58px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; margin-bottom: 10px; }
.hero-title em { color: var(--gold); }
.hero-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-bottom: 36px; }

/* ── CONTROLS ── */
.controls {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px; margin-bottom: 36px;
}
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px; padding: 6px 16px; font-size: 11px; cursor: pointer;
    transition: all .2s; font-family: var(--font-mono); letter-spacing: .05em;
    color: rgba(232,224,208,.6);
}
.chip:hover  { background: rgba(255,255,255,.08); }
.chip.active { background: rgba(232,197,71,.12); border-color: rgba(232,197,71,.5); color: var(--gold); }

.search-input {
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px; padding: 10px 18px; color: var(--text); font-size: 13px;
    outline: none; width: 260px; font-family: var(--font-mono);
    transition: border .2s;
}
.search-input:focus    { border-color: rgba(232,197,71,.35); }
.search-input::placeholder { color: rgba(232,224,208,.25); }

/* ── STAFF GRID ── */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.staff-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 30px 22px; text-align: center;
    cursor: pointer; transition: all .3s ease; text-decoration: none; color: inherit;
    display: block;
}
.staff-card:hover {
    background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.14);
    transform: translateY(-5px); box-shadow: 0 24px 48px rgba(0,0,0,.5);
}

.avatar {
    width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; font-size: 20px; font-weight: 700; letter-spacing: .04em;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.staff-name { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.staff-role { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); letter-spacing: .07em; margin-bottom: 10px; }

.dept-badge {
    display: inline-block; border-radius: 20px; padding: 3px 12px;
    font-family: var(--font-mono); font-size: 9.5px; margin-bottom: 22px;
}

.rate-label { display: flex; justify-content: space-between; margin-bottom: 6px; }
.rate-label span { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.rate-bar-track { height: 3px; background: rgba(255,255,255,.05); border-radius: 2px; }
.rate-bar-fill  { height: 100%; border-radius: 2px; transition: width .5s; }
.rate-days { font-family: var(--font-mono); font-size: 8.5px; color: rgba(232,224,208,.2); margin-top: 6px; }

/* ── EMPTY STATE ── */
.empty-state {
    grid-column: 1/-1; text-align: center; padding: 80px 20px;
    color: var(--muted); font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em;
}

/* ── BACK BUTTON ── */
.back-btn {
    background: none; border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; padding: 9px 20px; color: rgba(232,224,208,.6);
    cursor: pointer; font-size: 12px; font-family: var(--font-mono);
    transition: all .2s; letter-spacing: .05em; text-decoration: none;
    display: inline-block;
}
.back-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── PROFILE HEADER ── */
.profile-header { display: flex; align-items: flex-start; gap: 28px; margin-bottom: 44px; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex-shrink: 0; }
.profile-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-name { font-size: 46px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; }
.profile-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; margin-top: 6px; }
.profile-rate { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.profile-rate .rate-num { font-family: var(--font-mono); font-size: 28px; font-weight: 500; }
.profile-rate .rate-txt { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ── STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 44px; }
.stat-box {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; padding: 22px 20px; text-align: center;
}
.stat-num   { font-size: 44px; font-weight: 600; line-height: 1; margin-bottom: 8px; }
.stat-label { font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); letter-spacing: .12em; }

/* ── LEGEND ── */
.legend { display: flex; gap: 20px; margin-bottom: 28px; align-items: center; flex-wrap: wrap; }
.legend-label { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); letter-spacing: .1em; }
.legend-item  { display: flex; align-items: center; gap: 6px; }
.legend-dot   { width: 11px; height: 11px; border-radius: 3px; }
.legend-text  { font-family: var(--font-mono); font-size: 9.5px; color: rgba(232,224,208,.45); }

/* ── CALENDAR GRID ── */
.calendar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 36px; }

.month-card {
    background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px; padding: 18px 16px;
}
.month-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.month-name   { font-size: 18px; font-weight: 600; }
.month-year   { font-family: var(--font-mono); font-size: 8.5px; color: rgba(232,224,208,.28); }
.month-rate   { font-family: var(--font-mono); font-size: 15px; font-weight: 500; }

.day-headers { display: grid; grid-template-columns: repeat(7, 26px); gap: 2px; margin-bottom: 4px; }
.day-hdr     { height: 18px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 8px; color: rgba(232,224,208,.2); }

.days-grid { display: grid; grid-template-columns: repeat(7, 26px); gap: 2px; }
.day-cell  {
    width: 26px; height: 26px; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 8.5px;
    transition: transform .15s; position: relative; cursor: default;
}
.day-cell:hover { transform: scale(1.4); z-index: 10; }
.day-cell.weekend { color: rgba(232,224,208,.08); }

.month-footer { display: flex; justify-content: space-around; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.05); }
.mf-num  { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.mf-lbl  { font-family: var(--font-mono); font-size: 7.5px; color: rgba(232,224,208,.25); }

/* ── TREND BAR ── */
.trend-section {
    background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06);
    border-radius: 16px; padding: 30px 32px;
}
.trend-title { font-size: 24px; font-weight: 300; margin-bottom: 6px; }
.trend-title em { color: var(--gold); }
.trend-sub  { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-bottom: 24px; }
.trend-bars { display: flex; gap: 10px; align-items: flex-end; height: 110px; }
.trend-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.trend-pct  { font-family: var(--font-mono); font-size: 9px; }
.trend-bar  { width: 100%; border-radius: 4px 4px 0 0; border: 1px solid; }
.trend-mon  { font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); }

/* ── TOOLTIP ── */
.tooltip {
    position: fixed; background: rgba(20,20,28,.95); border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px; padding: 8px 12px; font-family: var(--font-mono); font-size: 10px;
    color: var(--text); pointer-events: none; z-index: 999; display: none; max-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

/* ── LOADING ── */
.loading { text-align: center; padding: 80px 20px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.loading::after { content: ''; animation: dots 1.2s infinite; }
@keyframes dots { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .page { padding: 24px; }
    .nav  { padding: 14px 24px; }
    .hero-title { font-size: 38px; }
    .stats-grid  { grid-template-columns: repeat(3, 1fr); }
    .calendar-grid { grid-template-columns: repeat(2, 1fr); }
    .trend-bars  { height: 80px; }
}
@media (max-width: 560px) {
    .stats-grid  { grid-template-columns: repeat(2, 1fr); }
    .calendar-grid { grid-template-columns: 1fr; }
}