/* ============================================================
   Skill-ed Dehradun — Team Hub
   Warm editorial theme · saffron + emerald on cream
   ============================================================ */

:root {
  --canvas:      #F2F0F6;
  --canvas-2:    #E7E3EF;
  --surface:     #FFFFFF;
  --surface-2:   #FAF8FD;
  --ink:         #1C1A22;
  --ink-soft:    #615C6B;
  --ink-faint:   #948EA1;
  --line:        #E7E1F0;
  --line-soft:   #F1ECF8;

  /* प्रयास brand — magenta/orchid */
  --brand:       #C23AD4;
  --brand-2:     #9E25B0;
  --brand-tint:  #F6E3FB;
  /* legacy aliases (kept so existing rules pick up the brand colour) */
  --saffron:     #C23AD4;
  --saffron-2:   #9E25B0;
  --saffron-tint:#F6E3FB;

  /* work-location colours (kept distinct from the brand) */
  --wfo:         #2D6E9E;
  --wfo-2:       #245A82;
  --wfo-tint:    #DBEAF4;
  --emerald:     #1E7A5E;
  --emerald-tint:#D9EDE5;
  --rose:        #BB4163;
  --rose-tint:   #F6E0E7;
  --gold:        #B0863F;

  --radius:      14px;
  --radius-sm:   9px;
  --radius-lg:   22px;
  --shadow:      0 1px 2px rgba(30,20,45,.05), 0 8px 24px -12px rgba(30,20,45,.20);
  --shadow-lg:   0 24px 60px -24px rgba(30,20,45,.40);
  --ring:        0 0 0 3px rgba(194,58,212,.20);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-deva:    "Baloo 2", "Mukta", "Nirmala UI", "Fraunces", sans-serif;
  --font-body:    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(1100px 700px at 88% -8%, rgba(194,58,212,.12), transparent 60%),
    radial-gradient(900px 700px at -6% 108%, rgba(45,110,158,.10), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* subtle grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app { position: relative; z-index: 1; min-height: 100vh; }

h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.12; }
a { color: var(--saffron-2); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.brand-deva { font-family: var(--font-deva); }

/* splash / loading */
.splash { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.splash-t { font-family: var(--font-deva); font-size: 30px; font-weight: 700; color: var(--brand-2); letter-spacing: .01em; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--brand-tint); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #E5762B, var(--saffron-2));
  border-color: var(--saffron-2); color: #fff; box-shadow: 0 8px 18px -8px rgba(221,107,32,.6);
}
.btn-primary:hover { box-shadow: 0 12px 22px -8px rgba(221,107,32,.7); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(33,30,26,.05); box-shadow: none; }
.btn-danger { color: var(--rose); border-color: transparent; background: transparent; }
.btn-danger:hover { background: var(--rose-tint); box-shadow: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn > svg { width: 16px; height: 16px; flex: none; }
.btn-icon > svg { width: 18px; height: 18px; }
.nav-item .ico svg, .pill-link svg { display: block; }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .01em; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--saffron); box-shadow: var(--ring); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236B655B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.app-auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card {
  width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px 38px;
  animation: pop .5s cubic-bezier(.2,.8,.2,1);
}
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-logo img { max-width: 220px; max-height: 110px; width: auto; height: auto; object-fit: contain; display: block; }
.auth-tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 6px; }
.brand-badge {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 700; font-size: 24px; flex: none; line-height: 1; padding-bottom: 2px;
  color: var(--brand); background: #141019; box-shadow: 0 8px 18px -8px rgba(20,16,25,.7);
}
.auth-brand .name { font-size: 22px; font-weight: 700; color: var(--brand-2); }
.auth-brand .sub { font-size: 12px; color: var(--ink-faint); letter-spacing: .04em; text-transform: uppercase; }
.auth-title { font-size: 27px; margin: 22px 0 4px; }
.auth-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.auth-sub em { font-style: italic; font-family: var(--font-display); color: var(--saffron-2); }

.who-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-bottom: 20px; }
.who {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 9px 4px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
  transition: all .14s ease; text-align: center;
}
.who:hover { border-color: var(--saffron); transform: translateY(-2px); box-shadow: var(--shadow); }
.who.sel { border-color: var(--saffron); background: var(--saffron-tint); box-shadow: var(--ring); }
.who .who-name { font-size: 10.5px; font-weight: 600; line-height: 1.15; color: var(--ink-soft); }

.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: 13px; letter-spacing: .02em; }
.avatar.a-lg { width: 38px; height: 38px; font-size: 14px; }
.avatar.a-xl { width: 52px; height: 52px; font-size: 18px; }
.avatar.a-2xl { width: 72px; height: 72px; font-size: 24px; }
.avatar.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; }

.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-name { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }

.auth-hint { margin-top: 18px; font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.5; }
.auth-hint code { background: var(--canvas-2); padding: 2px 6px; border-radius: 5px; font-family: var(--font-mono); color: var(--saffron-2); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, #FCFAF5, #F6EFE3);
  border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.side-brand .badge-sm { width: 38px; height: 38px; border-radius: 11px; font-size: 21px; }
.side-brand .t-name { font-family: var(--font-deva); font-weight: 700; font-size: 17px; line-height: 1.05; color: var(--brand-2); }
.side-brand .t-sub { font-size: 10.5px; color: var(--ink-faint); letter-spacing: .05em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600; border: 1px solid transparent;
  background: transparent; width: 100%; text-align: left; transition: all .13s ease;
}
.nav-item:hover { background: rgba(33,30,26,.045); color: var(--ink); }
.nav-item.active { background: var(--saffron-tint); color: var(--saffron-2); border-color: #F1D6BC; }
.nav-item .ico { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-item.active .ico { opacity: 1; }

.side-foot { margin-top: auto; padding-top: 14px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.user-card .u-name { font-size: 13.5px; font-weight: 700; line-height: 1.1; }
.user-card .u-role { font-size: 11px; color: var(--ink-faint); }
.user-card .u-meta { min-width: 0; flex: 1; }
.user-card .u-name, .user-card .u-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.ucp { position: relative; flex: none; line-height: 0; }
.ucp-cam { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; border: 2px solid var(--surface); }
.ucp-cam svg { width: 10px; height: 10px; }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 20px 30px; border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; background: rgba(244,238,228,.82); backdrop-filter: blur(10px); z-index: 20;
}
.topbar .page-title { font-size: 23px; }
.topbar .page-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.view { padding: 26px 30px 60px; max-width: 1240px; width: 100%; animation: fadeUp .4s ease both; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h3 { font-size: 16px; }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 18px; }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ---------- Stat band ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .k { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.stat .v { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 4px; line-height: 1; }
.stat .v small { font-size: 15px; color: var(--ink-faint); font-family: var(--font-body); }
.stat .accent { position: absolute; right: -14px; top: -14px; width: 56px; height: 56px; border-radius: 50%; opacity: .14; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, #1A0F22 0%, #3E1450 60%, #5A1A6E 100%); color: #fff; border-radius: var(--radius-lg);
  padding: 26px 28px; margin-bottom: 22px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero::after { content:""; position:absolute; right:-60px; top:-60px; width:260px; height:260px; border-radius:50%; background: radial-gradient(circle, rgba(208,80,228,.6), transparent 65%); }
.hero .motto { color: #fff; }
.hero .eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.hero .motto { font-family: var(--font-display); font-style: italic; font-size: 25px; font-weight: 500; margin: 6px 0 2px; max-width: 620px; position: relative; }
.hero .today { opacity: .82; font-size: 13.5px; }
.hero .hero-actions { position: absolute; right: 26px; bottom: 22px; display: flex; gap: 10px; }
.hero .btn-light { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(4px); }
.hero .btn-light:hover { background: rgba(255,255,255,.26); }

/* ---------- Chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.wfo   { background: var(--wfo-tint); color: var(--wfo-2); }
.chip.wfo .dot { background: var(--wfo); }
.chip.wfh   { background: var(--emerald-tint); color: var(--emerald); }
.chip.wfh .dot { background: var(--emerald); }
.chip.leave { background: var(--rose-tint); color: var(--rose); }
.chip.leave .dot { background: var(--rose); }
.chip.off   { background: var(--canvas-2); color: var(--ink-faint); }
.chip.off .dot { background: var(--ink-faint); }
.badge-admin { background: #233; color: #cfe9df; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; }

/* ============================================================
   CALENDAR
   ============================================================ */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-month { font-family: var(--font-display); font-size: 21px; font-weight: 600; min-width: 200px; }
.legend { display: flex; gap: 14px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.legend .li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; }

.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.cal-dow span { padding: 10px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
  min-height: 116px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 8px; background: var(--surface); transition: background .12s; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 5px;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.empty { background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.012) 8px, rgba(0,0,0,.012) 16px); cursor: default; }
.cal-cell.today { background: linear-gradient(180deg, var(--saffron-tint), var(--surface)); }
.cal-cell .dn { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; }
.cal-cell.today .dn .num { background: var(--saffron); color: #fff; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.cal-cell .dn .cnt { font-size: 10px; color: var(--ink-faint); font-weight: 700; }
.cal-entries { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-mini {
  display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 7px; font-size: 11px;
  background: var(--surface-2); border: 1px solid var(--line-soft); line-height: 1.2;
}
.cal-mini .avatar { width: 17px; height: 17px; font-size: 8.5px; }
.cal-mini .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mini.l-wfo { border-left: 3px solid var(--wfo); }
.cal-mini.l-wfh { border-left: 3px solid var(--emerald); }
.cal-mini.l-leave { border-left: 3px solid var(--rose); }
.cal-more { font-size: 10.5px; color: var(--ink-faint); font-weight: 700; padding-left: 4px; }
.cal-cell .add-hint { position: absolute; right: 7px; bottom: 7px; font-size: 11px; color: var(--saffron-2); font-weight: 700; opacity: 0; transition: opacity .12s; }
.cal-cell:hover .add-hint { opacity: 1; }

/* ---------- Standup panel ---------- */
.standup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.standup .su { display: flex; align-items: center; gap: 9px; padding: 7px 4px; }
.standup .su .nm { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standup .su .status { font-size: 11.5px; font-weight: 700; }
.standup .su .yes { color: var(--emerald); }
.standup .su .no  { color: var(--ink-faint); }

/* ============================================================
   TABLES (Excel feel)
   ============================================================ */
.xl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.xl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
table.xl thead th {
  background: var(--surface-2); text-align: left; padding: 11px 13px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; white-space: nowrap;
}
table.xl tbody td { padding: 8px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.xl tbody tr:hover { background: var(--surface-2); }
table.xl tbody tr:last-child td { border-bottom: none; }
table.xl .c-date { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; color: var(--ink-soft); }
table.xl input, table.xl select, table.xl textarea { padding: 6px 8px; font-size: 13px; border-color: transparent; background: transparent; border-radius: 6px; }
table.xl input:hover, table.xl select:hover, table.xl textarea:hover { background: var(--surface); border-color: var(--line); }
table.xl input:focus, table.xl select:focus, table.xl textarea:focus { background: var(--surface); }
table.xl td.num { text-align: right; font-family: var(--font-mono); }
.cell-w-sm { width: 90px; }
.cell-w-md { width: 130px; }

/* ---------- Roster grid ---------- */
table.roster td.daycell { text-align: center; padding: 6px; }
table.roster select.loc { text-align: center; font-weight: 700; }
.who-name-cell { display: flex; align-items: center; gap: 10px; }
.who-name-cell .nm { font-weight: 600; }

/* ---------- Roles cards ---------- */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.role-card .rc-head { display: flex; align-items: center; gap: 11px; }
.role-card .rc-title { font-size: 12px; color: var(--saffron-2); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.role-card .rc-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.role-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.role-card ul li { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.role-card .rc-empty { font-size: 13px; color: var(--ink-faint); font-style: italic; }

/* ---------- Targets ---------- */
.seg { display: inline-flex; background: var(--canvas-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: none; background: transparent; padding: 7px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.target-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.target-card .tc-top { display: flex; align-items: flex-start; gap: 12px; }
.target-card .tc-title { font-size: 16px; font-weight: 700; }
.target-card .tc-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.progress { height: 9px; background: var(--canvas-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #E26DEC); border-radius: 999px; transition: width .4s ease; }
.progress.done > span { background: linear-gradient(90deg, var(--emerald), #34a07c); }
.tc-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-faint); flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(33,24,12,.42); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 22px; animation: fade .2s ease; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; animation: pop .32s cubic-bezier(.2,.8,.2,1); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 14px; position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line-soft); z-index: 2; }
.modal-head h3 { font-size: 19px; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.modal-body { padding: 20px 24px 24px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 22px; }

/* day modal entries */
.entry { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: var(--surface-2); }
.entry .e-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.entry .e-name { font-weight: 700; font-size: 14px; }
.entry .e-summary { font-weight: 600; font-size: 14px; margin: 2px 0 4px; }
.entry .e-details { font-size: 13px; color: var(--ink-soft); line-height: 1.55; white-space: pre-wrap; }
.entry .e-foot { display: flex; gap: 12px; align-items: center; margin-top: 9px; font-size: 11.5px; color: var(--ink-faint); }

.task-rows { display: flex; flex-direction: column; gap: 8px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-faint); }
.empty-state .big { font-family: var(--font-display); font-size: 19px; color: var(--ink-soft); margin-bottom: 6px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #23211C; color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .28s cubic-bezier(.2,.8,.2,1); z-index: 100;
  display: flex; align-items: center; gap: 9px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .tk { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }
.toast.err .tk { background: var(--rose); }

/* ---------- Misc ---------- */
.row { display: flex; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 26px 0 12px; }
.help-list { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.help-list code { background: var(--canvas-2); padding: 2px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: 12px; color: var(--saffron-2); }
.pill-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--saffron-2); text-decoration: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

.stagger > * { animation: fadeUp .45s ease both; }
.stagger > *:nth-child(1){animation-delay:.02s}.stagger > *:nth-child(2){animation-delay:.06s}
.stagger > *:nth-child(3){animation-delay:.10s}.stagger > *:nth-child(4){animation-delay:.14s}
.stagger > *:nth-child(5){animation-delay:.18s}.stagger > *:nth-child(6){animation-delay:.22s}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: column; gap: 8px; padding: 10px 12px; }
  .side-brand { padding: 2px 4px 6px; }
  .nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; margin-top: 0; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-item { width: auto; flex: none; white-space: nowrap; padding: 8px 13px; }
  .nav-label { display: none; }
  .side-foot { margin-top: 4px; padding-top: 0; }
  .user-card { padding: 8px 10px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .hero .motto { font-size: 20px; }
  .hero .hero-actions { position: static; margin-top: 14px; }
}
@media (max-width: 620px) {
  .who-grid { grid-template-columns: repeat(4, 1fr); }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { gap: 10px; }
  .topbar .page-title { font-size: 19px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .cal-cell { min-height: 84px; padding: 5px; }
  .cal-mini .nm { display: none; }
  .cal-dow span { padding: 8px 4px; font-size: 10px; }
  .legend { width: 100%; margin-left: 0; }
  .standup { grid-template-columns: 1fr; }
  .auth-card { padding: 30px 22px; }
}
