/* Black Bear Physician Portal — design system */
:root {
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #e4e8f1;
  --border-2: #d5dbe8;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #8391a7;
  --primary: #2952e3;
  --primary-2: #1d3fc0;
  --primary-soft: #e8eeff;
  --accent: #f2a93b;
  --accent-soft: #fff4e2;
  --success: #0f9d6b;
  --success-soft: #e3f7ef;
  --info: #0b84c6;
  --info-soft: #e2f3fc;
  --warning: #c77a06;
  --warning-soft: #fff3dc;
  --danger: #d93a4a;
  --danger-soft: #fde8ea;
  --ink: #0b1220;
  --ink-2: #131c30;
  --ink-text: #c9d3e6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -8px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .28);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 264px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg-2: #0e1526;
  --surface: #111a2d;
  --surface-2: #0e1628;
  --border: #1f2a42;
  --border-2: #2a3754;
  --text: #e8edf7;
  --text-2: #a8b3c9;
  --text-3: #6f7c96;
  --primary: #5b7cff;
  --primary-2: #7b95ff;
  --primary-soft: #1a2550;
  --accent: #f5b454;
  --accent-soft: #2f2412;
  --success: #2fc58f;
  --success-soft: #0f2e25;
  --info: #3db5f0;
  --info-soft: #0e2838;
  --warning: #f0a92e;
  --warning-soft: #33250d;
  --danger: #f06573;
  --danger-soft: #3a151b;
  --ink: #070b15;
  --ink-2: #0d1426;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.55;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; }
small, .muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.2rem 0; }
code { font-size: .88em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: radial-gradient(120% 60% at 0% 0%, #1b2a55 0%, transparent 60%), linear-gradient(180deg, var(--ink-2), var(--ink));
  color: var(--ink-text); display: flex; flex-direction: column; padding: 18px 14px;
  transition: none;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #e0782b); color: #1a1206; box-shadow: 0 8px 20px -6px rgba(242, 169, 59, .55);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.02rem; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: #8ea0c2; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -4px; padding: 0 4px; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #5f7093; margin: 16px 12px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--ink-text);
  font-weight: 500; position: relative; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, rgba(91, 124, 255, .28), rgba(91, 124, 255, .06)); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav .count { margin-left: auto; background: rgba(255, 255, 255, .1); color: #fff; font-size: .7rem; padding: 1px 8px; border-radius: 99px; font-weight: 700; }
.nav .count.hot { background: var(--accent); color: #1a1206; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; margin-top: 10px; }
.freshness { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: #8ea0c2; padding: 8px 10px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fc58f; box-shadow: 0 0 0 0 rgba(47, 197, 143, .6); animation: pulse 2s infinite; }
.pulse-dot.stale { background: var(--accent); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 197, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 197, 143, 0); } }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 66px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.icon-btn.menu-btn { display: none; }
.search { flex: 1; max-width: 460px; position: relative; }
.search input { padding-left: 40px; background: var(--surface); height: 40px; border-radius: 12px; }
.search [data-lucide] { position: absolute; left: 13px; top: 11px; color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; position: relative; transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.user-btn:hover { box-shadow: var(--shadow); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff;
  background: linear-gradient(135deg, #5b7cff, #8b5cf6); flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.1rem; }
.user-meta { text-align: left; line-height: 1.2; }
.user-meta b { display: block; font-size: .85rem; }
.user-meta span { font-size: .72rem; color: var(--text-3); text-transform: capitalize; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transform-origin: top right; transition: all .2s var(--ease); z-index: 50;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--text-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-2); color: var(--text); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.notif-list { max-height: 360px; overflow-y: auto; width: 340px; }
.notif { display: block !important; padding: 10px 12px !important; border-radius: 10px; }
.notif b { display: block; color: var(--text); font-size: .86rem; }
.notif span { font-size: .78rem; }

.content { padding: 28px; max-width: 1360px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin: 0; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.footer { padding: 18px 28px; color: var(--text-3); font-size: .78rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Components ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 22px; position: relative;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card.hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.card.flush { padding: 0; overflow: hidden; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; } .mt-s { margin-top: 8px; }
.center { text-align: center; }
.hide { display: none !important; }

.stat { display: flex; gap: 16px; align-items: center; overflow: hidden; }
.stat .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.stat .ic [data-lucide] { width: 22px; height: 22px; }
.stat .num { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.stat .lbl { color: var(--text-2); font-size: .82rem; font-weight: 500; }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; opacity: .04; }
.tone-primary { color: var(--primary); } .tone-primary .ic { background: var(--primary-soft); color: var(--primary); }
.tone-success { color: var(--success); } .tone-success .ic { background: var(--success-soft); color: var(--success); }
.tone-accent { color: var(--warning); } .tone-accent .ic { background: var(--accent-soft); color: var(--warning); }
.tone-danger { color: var(--danger); } .tone-danger .ic { background: var(--danger-soft); color: var(--danger); }
.tone-info { color: var(--info); } .tone-info .ic { background: var(--info-soft); color: var(--info); }
.stat .num, .stat .lbl { color: var(--text); }
.stat .lbl { color: var(--text-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; line-height: 1.2;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s; position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--primary) 70%, transparent); transform: translateY(-1px); }
.btn-accent { background: linear-gradient(135deg, var(--accent), #e0782b); color: #1a1206; }
.btn-accent:hover { color: #1a1206; transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(224, 120, 43, .6); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-2); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { color: var(--primary-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 11px; font-size: .8rem; border-radius: 9px; }
.btn-lg { padding: 13px 22px; font-size: .95rem; border-radius: 13px; }
.btn-block { width: 100%; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.btn[disabled], .btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600;
  background: var(--bg-2); color: var(--text-2); white-space: nowrap; line-height: 1.5;
}
.badge [data-lucide] { width: 13px; height: 13px; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.accent { background: var(--accent-soft); color: var(--warning); }
.badge.new { background: linear-gradient(135deg, var(--accent), #e0782b); color: #1a1206; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .8rem; font-weight: 500; cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Forms */
label { display: block; font-weight: 600; font-size: .82rem; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .76rem; color: var(--text-3); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; transition: border-color .2s, box-shadow .2s; outline: none;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238391a7' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; }
.check span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); font-weight: 500; font-size: .84rem; color: var(--text-2); cursor: pointer; transition: all .18s var(--ease); }
.check input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.check input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: var(--border-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(18px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

.dropzone { border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 30px; text-align: center; cursor: pointer; transition: all .2s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone [data-lucide] { width: 34px; height: 34px; color: var(--primary); margin-bottom: 6px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }

/* Alerts & flash */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 13px; border: 1px solid transparent; font-size: .88rem; }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.success { background: var(--success-soft); color: var(--success); }
.alert.warning { background: var(--warning-soft); color: var(--warning); }
.alert.danger { background: var(--danger-soft); color: var(--danger); }
.alert b { color: inherit; }
.alert p { color: var(--text-2); margin: 2px 0 0; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink-2); color: #fff; padding: 12px 16px; border-radius: 13px; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease) both; min-width: 260px; font-size: .88rem; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
.toast .t-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast.success .t-ic { background: var(--success); } .toast.danger .t-ic { background: var(--danger); } .toast.info .t-ic, .toast.warning .t-ic { background: var(--primary); }
.toast .t-ic [data-lucide] { width: 15px; height: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* Job cards */
.job-list { display: grid; gap: 14px; }
.job {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; color: var(--text);
}
.job:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); color: var(--text); }
.job-prov { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: #fff; }
.job h3 { margin: 0 0 4px; font-size: 1rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: .82rem; }
.job-meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-meta [data-lucide] { width: 14px; height: 14px; color: var(--text-3); }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.prov-NS { background: linear-gradient(135deg, #1e6fd9, #0b3d8c); } .prov-BC { background: linear-gradient(135deg, #0ea5a4, #0b6b7a); }
.prov-AB { background: linear-gradient(135deg, #2952e3, #1a2f8f); } .prov-PE { background: linear-gradient(135deg, #d9485f, #8f1d33); }
.prov-SK { background: linear-gradient(135deg, #16a34a, #0b5e2c); } .prov-ON { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.prov-NL { background: linear-gradient(135deg, #0284c7, #164e63); } .prov-NB { background: linear-gradient(135deg, #f59e0b, #b45309); }
.prov-MB { background: linear-gradient(135deg, #db2777, #831843); } .prov-QC { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.prov-XX, .prov-YT, .prov-NT, .prov-NU { background: linear-gradient(135deg, #64748b, #334155); }

/* Score ring */
.ring { --v: 0; --c: var(--primary); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--p, 0) * 1%), var(--bg-2) 0); transition: --p 1s; }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-family: var(--font-head); font-size: .92rem; }
.ring.lg { width: 96px; height: 96px; } .ring.lg::before { inset: 8px; } .ring.lg b { font-size: 1.5rem; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }

.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8b5cf6); width: 0; transition: width 1.2s var(--ease); }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: .86rem; }
.checklist li .ck { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.checklist li .ck [data-lucide] { width: 14px; height: 14px; }
.ck.ok { background: var(--success-soft); color: var(--success); } .ck.no { background: var(--danger-soft); color: var(--danger); } .ck.dot { background: var(--primary-soft); color: var(--primary); }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 13px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a, .tabs button { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .84rem; border: 0; background: none; cursor: pointer; white-space: nowrap; font-family: inherit; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.on, .tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; } .tab-panel.on { display: block; animation: fadeUp .4s var(--ease); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.lane { background: var(--bg-2); border-radius: var(--radius); padding: 12px; min-height: 300px; display: flex; flex-direction: column; gap: 10px; transition: background .2s, box-shadow .2s; }
.lane.over { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.lane-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .82rem; padding: 2px 4px 6px; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: grab; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kcard.dragging { opacity: .5; transform: rotate(2deg); }
.kcard b { display: block; font-size: .88rem; margin-bottom: 4px; color: var(--text); }

/* Wizard */
.steps { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 4px; }
.step { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 8px; color: var(--text-3); font-size: .78rem; font-weight: 600; }
.step i { height: 5px; border-radius: 99px; background: var(--border); position: relative; overflow: hidden; }
.step.done i, .step.on i { background: var(--primary); }
.step.on { color: var(--primary); } .step.done { color: var(--text-2); }

/* Timeline / roadmap */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 22px 52px; }
.timeline .tdot { position: absolute; left: 4px; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-2); color: var(--text-3); font-weight: 700; font-size: .75rem; }
.timeline li.done .tdot { background: var(--success); border-color: var(--success); color: #fff; }
.timeline li.now .tdot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 6px var(--primary-soft); }

/* Hero */
.hero {
  border-radius: 22px; padding: 28px 30px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(90% 140% at 100% 0%, rgba(242, 169, 59, .35), transparent 55%), radial-gradient(80% 120% at 0% 100%, rgba(91, 124, 255, .55), transparent 60%), linear-gradient(135deg, #0f1a38, #16244d);
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: #fff; font-size: 1.75rem; }
.hero p { color: #c3cde3; max-width: 640px; }
.hero .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; animation: float 12s ease-in-out infinite; }
.hero .blob.b1 { width: 220px; height: 220px; background: #5b7cff; right: 8%; top: -60px; }
.hero .blob.b2 { width: 160px; height: 160px; background: #f2a93b; right: 30%; bottom: -80px; animation-delay: -4s; }
.hero > *:not(.blob) { position: relative; }
.hero .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .18); }
@keyframes float { 50% { transform: translate(-30px, 20px) scale(1.08); } }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .e-ic { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty .e-ic [data-lucide] { width: 28px; height: 28px; }

/* Bars (insights) */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 50px; gap: 12px; align-items: center; font-size: .84rem; }
.bar-row .track { display: block; height: 12px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8b5cf6); width: 0; transition: width 1.2s var(--ease); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 12, 24, .55); backdrop-filter: blur(4px); }
.modal.open { display: flex; animation: fade .25s ease; }
.modal-box { background: var(--surface); border-radius: 20px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); padding: 24px; animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

/* Auth screens */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(60% 50% at 80% 10%, rgba(242, 169, 59, .45), transparent 60%), radial-gradient(70% 60% at 10% 90%, rgba(91, 124, 255, .6), transparent 60%), linear-gradient(160deg, #0b1330, #121f47 60%, #0b1330); }
.auth-art h1 { color: #fff; font-size: 2.4rem; line-height: 1.1; max-width: 520px; }
.auth-art p { color: #c3cde3; max-width: 460px; font-size: 1rem; }
.auth-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); }
.auth-art > * { position: relative; }
.auth-feats { display: grid; gap: 12px; }
.auth-feat { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); padding: 12px 14px; border-radius: 14px; backdrop-filter: blur(8px); animation: fadeUp .7s var(--ease) both; }
.auth-feat .f-ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 410px; animation: fadeUp .6s var(--ease) both; }
.auth-card h2 { font-size: 1.6rem; }
.orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; animation: spin 60s linear infinite; }
.orbit::after { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent); }

/* Animations */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.fade-up { animation: fadeUp .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 37%, var(--bg-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.page-loader { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--primary)); z-index: 200; width: 0; transition: width .4s var(--ease), opacity .3s; }

.overlay { display: none; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .84rem; }
.pager .on { background: var(--primary); color: #fff; border-color: var(--primary); }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: .87rem; }
.kv dt { color: var(--text-3); font-weight: 500; } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; font-size: .88rem; line-height: 1.65; color: var(--text-2); }
.sticky { position: sticky; top: 86px; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.filters .field { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); transition: transform .35s var(--ease); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(8, 12, 24, .5); z-index: 35; animation: fade .2s; }
  .main { margin-left: 0; }
  .icon-btn.menu-btn { display: grid; }
  .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .user-meta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .content { padding: 18px 16px; }
  .topbar { padding: 0 16px; gap: 8px; }
  .search { display: none; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat .ic { width: 40px; height: 40px; border-radius: 12px; }
  .stat .num { font-size: 1.45rem; }
  .form-grid, .filters { grid-template-columns: minmax(0, 1fr); }
  .job { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .job-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .job-prov { width: 44px; height: 44px; font-size: .85rem; }
  .hero { padding: 22px 20px; } .hero h1 { font-size: 1.4rem; }
  .card { padding: 18px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .notif-list { width: calc(100vw - 32px); }
  .dropdown-menu { position: fixed; left: 16px; right: 16px; top: 72px; min-width: 0; }
  .footer { padding: 16px; }
  h1 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
