/* VersityEdge Staff — shared design tokens, lifted from the same scale
   used across the product's approved designs (--blue/--surface/--ink). */
:root {
  --blue: #2274FF;
  --blue-dk: #1A56C5;
  --blue-lt: #EBF2FF;
  --bg: #F2F4F9;
  --surface: #FFFFFF;
  --surface-2: #F7F9FE;
  --border: #E2E8F5;
  --border-str: #C8D4EC;
  --ink: #0B0F1A;
  --text-2: #3A4E70;
  --text-3: #7A90BA;
  --green: #10B981;
  --green-lt: #D1FAE5;
  --amber: #F59E0B;
  --amber-lt: #FEF3C7;
  --red: #EF4444;
  --red-lt: #FEE2E2;
  --purple: #7C3AED;
  --purple-lt: #EDE9FE;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --bottomnav-h: 62px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -0.01em; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------------- app shell ---------------- */
.shell { min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: none; flex-direction: column; z-index: 30;
}
.sidebar-logo { display: flex; justify-content: center; padding: 22px; border-bottom: 1px solid var(--border); }
.sidebar-logo img { height: 32px; width: auto; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--text-2); transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-link i { font-size: 16px; width: 18px; text-align: center; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--blue-lt); color: var(--blue-dk); font-weight: 700; }

.shell-main { min-height: 100dvh; padding-bottom: var(--bottomnav-h); }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 18px; background: rgba(242,244,249,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 17px; font-weight: 700; }
.content { max-width: 1100px; margin: 0 auto; padding: 20px 18px 40px; }

.bottom-nav {
  position: fixed; inset: auto 0 0 0; height: var(--bottomnav-h); z-index: 30;
  display: flex; align-items: stretch; justify-content: space-around;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
}
.bottom-nav .nav-link { flex: 1; flex-direction: column; gap: 2px; justify-content: center; border-radius: 0; font-size: 11px; }
.bottom-nav .nav-link i { font-size: 18px; }

@media (min-width: 900px) {
  .sidebar { display: flex; }
  .shell-main { margin-left: var(--sidebar-w); padding-bottom: 0; }
  .topbar { padding: 0 28px; }
  .content { padding: 28px 28px 48px; }
  .bottom-nav { display: none; }
}

/* ---------------- components ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.card + .card { margin-top: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.card-title i { color: var(--blue); }

.grid { display: grid; gap: 12px; }
.grid-stats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-stats { grid-template-columns: repeat(4, 1fr); } }

.stat-tile { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; }
.stat-tile .icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--blue-lt); color: var(--blue-dk); flex-shrink: 0; }
.stat-tile .value { font-size: 19px; font-weight: 800; line-height: 1.1; }
.stat-tile .label { font-size: 12px; font-weight: 600; color: var(--text-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; border: 1px solid transparent; transition: all .15s var(--ease); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dk); }
.btn-ghost { background: transparent; border-color: var(--border-str); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dk); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-str); border-radius: var(--r-sm);
  font-size: 14px; background: var(--surface); color: var(--ink);
}
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34,116,255,.15); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); }

table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-blue { background: var(--blue-lt); color: var(--blue-dk); }
.badge-green { background: var(--green-lt); color: #067a5b; }
.badge-amber { background: var(--amber-lt); color: #92620a; }
.badge-red { background: var(--red-lt); color: #b91c1c; }
.badge-purple { background: var(--purple-lt); color: #5b21b6; }
.badge-muted { background: var(--surface-2); color: var(--text-3); }

.checklist-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done .item-text { text-decoration: line-through; color: var(--text-3); }
.checklist-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }

.empty-state { text-align: center; padding: 28px 12px; color: var(--text-3); font-size: 13px; }
.muted { color: var(--text-3); }
.error-banner { background: var(--red-lt); color: #b91c1c; border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }

.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 6px; }
.bar-row .bar-label { width: 78px; flex-shrink: 0; color: var(--text-3); }
.bar-track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 999px; }
.bar-row .bar-value { width: 64px; text-align: right; font-weight: 700; flex-shrink: 0; }

.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: skel-shine 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes skel-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- auth pages (login/root) ---------------- */
.auth-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px 28px; box-shadow: 0 18px 46px rgba(15,23,42,.08); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo img { height: 32px; width: auto; }
.auth-heading { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.auth-subheading { text-align: center; font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
