/* ==========================================================================
   TECSYS OPS PORTAL — Design System
   Light theme, vivid accents, modern dashboard aesthetic
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #f5f6fb;
  --bg-soft: #ecedf5;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --surface-3: #f0f2fa;

  /* Text */
  --ink: #0f1024;
  --ink-2: #2a2d4a;
  --ink-3: #5a5f82;
  --ink-4: #8a90b3;
  --ink-5: #c5cae0;

  /* Borders */
  --border: #e6e8f3;
  --border-2: #dde0ee;

  /* Vivid brand palette */
  --c-violet: #6d28ff;
  --c-violet-2: #8b5cff;
  --c-pink: #ff3d8b;
  --c-coral: #ff6b4a;
  --c-amber: #ffb020;
  --c-emerald: #00c896;
  --c-cyan: #00b8d4;
  --c-blue: #2563ff;
  --c-indigo: #4f46e5;
  --c-magenta: #d946ef;

  /* Semantic */
  --success: #00c896;
  --warning: #ffb020;
  --danger: #ff4566;
  --info: #2563ff;

  /* Gradients */
  --g-violet: linear-gradient(135deg, #6d28ff 0%, #d946ef 100%);
  --g-coral:  linear-gradient(135deg, #ff6b4a 0%, #ffb020 100%);
  --g-cyan:   linear-gradient(135deg, #00b8d4 0%, #00c896 100%);
  --g-pink:   linear-gradient(135deg, #ff3d8b 0%, #ff6b4a 100%);
  --g-blue:   linear-gradient(135deg, #2563ff 0%, #00b8d4 100%);
  --g-amber:  linear-gradient(135deg, #ffb020 0%, #ff6b4a 100%);

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(15,16,36,.06), 0 1px 1px rgba(15,16,36,.04);
  --sh-md: 0 4px 12px rgba(15,16,36,.06), 0 2px 4px rgba(15,16,36,.04);
  --sh-lg: 0 16px 40px rgba(15,16,36,.10), 0 4px 12px rgba(15,16,36,.05);
  --sh-glow-violet: 0 8px 24px rgba(109,40,255,.25);
  --sh-glow-pink:   0 8px 24px rgba(255,61,139,.25);
  --sh-glow-cyan:   0 8px 24px rgba(0,184,212,.25);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-2xl: 28px;

  /* Layout */
  --sb-w: 260px;
  --top-h: 68px;

  --font-display: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ===== Shell ===== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sb-w) 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
  border-right: 1px solid var(--border);
  padding: 22px 16px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px 22px;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--g-violet);
  color: white;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
  box-shadow: var(--sh-glow-violet);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { font-size: 11px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .12em; }

.nav-menu { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-4);
  padding: 0 10px 6px;
  font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .15s ease;
  position: relative;
}
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.active {
  background: var(--g-violet);
  color: white;
  box-shadow: var(--sh-glow-violet);
}
.nav-item.active .nav-icon { color: white; }
.nav-icon {
  width: 22px; text-align: center;
  font-size: 16px; color: var(--c-violet);
  font-weight: 700;
}

.sidebar-footer { padding-top: 12px; border-top: 1px dashed var(--border); }
.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 12px;
}
.user-pill strong { display: block; font-size: 13px; font-weight: 700; }
.user-pill span { font-size: 11px; color: var(--ink-4); }
.user-pill.compact { padding: 0; }

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 92px; height: 92px; font-size: 30px; }

/* ===== Topbar ===== */
.main {
  display: flex; flex-direction: column;
  min-width: 0;
}
.topbar {
  height: var(--top-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.menu-toggle { display: none; font-size: 22px; }
.search {
  flex: 1; max-width: 480px;
  display: flex; align-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  gap: 10px;
}
.search input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 13.5px;
}
.search input::placeholder { color: var(--ink-4); }
.search kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  background: white; border: 1px solid var(--border-2);
  padding: 2px 6px; border-radius: 5px; color: var(--ink-3);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 16px;
  position: relative;
  transition: all .15s;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-pink);
  box-shadow: 0 0 0 2px var(--surface-3);
}

/* ===== Content ===== */
.content {
  padding: 28px;
  flex: 1;
  animation: fadeIn .35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px; flex-wrap: wrap;
}
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.page-sub { color: var(--ink-3); font-size: 13.5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: all .15s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--g-violet); color: white; box-shadow: var(--sh-glow-violet); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(109,40,255,.32); }
.btn-secondary { background: white; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: var(--surface-3); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-success { background: var(--success); color: white; }
.btn-danger  { background: var(--danger); color: white; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--sh-sm);
  transition: box-shadow .2s, transform .2s;
}
.card-hover:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; margin: 0; }
.card-sub { font-size: 12px; color: var(--ink-4); }

/* ===== Summary KPI cards ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  position: relative;
  border-radius: var(--r-xl);
  padding: 20px;
  color: white;
  overflow: hidden;
  min-height: 130px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.kpi::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}
.kpi-violet { background: var(--g-violet); box-shadow: var(--sh-glow-violet); }
.kpi-pink   { background: var(--g-pink);   box-shadow: var(--sh-glow-pink); }
.kpi-cyan   { background: var(--g-cyan);   box-shadow: var(--sh-glow-cyan); }
.kpi-amber  { background: var(--g-amber);  box-shadow: 0 8px 24px rgba(255,176,32,.25); }
.kpi-blue   { background: var(--g-blue);   box-shadow: 0 8px 24px rgba(37,99,255,.25); }
.kpi-coral  { background: var(--g-coral);  box-shadow: 0 8px 24px rgba(255,107,74,.25); }

.kpi-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
}
.kpi-label { font-size: 12.5px; opacity: .92; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpi-value { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.02em; margin-top: 6px; }
.kpi-delta {
  font-size: 11.5px; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.2);
  padding: 3px 8px; border-radius: 20px;
  font-weight: 600;
  width: fit-content;
}
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }

/* ===== Grid layouts ===== */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* ===== Tables ===== */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-2);
}
.badge-success { background: rgba(0,200,150,.12); color: #008f6a; }
.badge-warning { background: rgba(255,176,32,.15); color: #b07700; }
.badge-danger  { background: rgba(255,69,102,.12); color: #c4253f; }
.badge-info    { background: rgba(37,99,255,.10);  color: #1d4cc8; }
.badge-violet  { background: rgba(109,40,255,.10); color: #5118d9; }
.badge-pink    { background: rgba(255,61,139,.10); color: #d6266f; }
.badge-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  margin-right: 1px;
}

/* ===== Forms ===== */
.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.field input, .field select, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-size: 13.5px;
  transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-violet);
  box-shadow: 0 0 0 3px rgba(109,40,255,.12);
}
.field textarea { min-height: 90px; resize: vertical; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,16,36,.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .2s; }
.modal {
  background: white;
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-lg);
  animation: scaleIn .25s cubic-bezier(.2,.8,.3,1);
}
@keyframes scaleIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-3);
  font-size: 14px;
}
.modal-close:hover { background: var(--bg-soft); }
.modal-body { padding: 22px 24px; overflow-y: auto; }

/* ===== Misc ===== */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { gap: 12px; }
.flex-col { display: flex; flex-direction: column; }
.text-ink-3 { color: var(--ink-3); }
.text-ink-4 { color: var(--ink-4); }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

.tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 12px; width: fit-content; }
.tab {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-3);
  transition: all .15s;
}
.tab.active { background: white; color: var(--ink); box-shadow: var(--sh-sm); }
.tab:hover:not(.active) { color: var(--ink-2); }

.progress {
  height: 8px; background: var(--surface-3);
  border-radius: 20px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--g-violet);
  border-radius: 20px;
  transition: width .4s;
}

/* ===== Specific components ===== */
.activity-list { display: flex; flex-direction: column; gap: 14px; }
.activity-item {
  display: flex; gap: 12px; align-items: flex-start;
}
.activity-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; flex-shrink: 0;
}
.activity-content strong { font-size: 13px; font-weight: 600; display: block; }
.activity-content span { font-size: 12px; color: var(--ink-4); }

/* Hierarchy / Org chart */
.org-chart {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  overflow-x: auto;
}
.org-level { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; position: relative; }
.org-level + .org-level { margin-top: 60px; }
.org-level + .org-level::before {
  content: '';
  position: absolute;
  top: -42px; left: 50%;
  width: 2px; height: 30px;
  background: linear-gradient(180deg, var(--c-violet), var(--c-pink));
  border-radius: 2px;
}
.org-node {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 180px;
  text-align: center;
  box-shadow: var(--sh-sm);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.org-node:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.org-node.ceo { border-color: var(--c-violet); box-shadow: var(--sh-glow-violet); }
.org-node .avatar { margin: 0 auto 8px; }
.org-node strong { display: block; font-size: 13px; font-weight: 700; }
.org-node span { font-size: 11px; color: var(--ink-4); }

/* Attendance matrix */
.matrix {
  display: grid;
  grid-template-columns: 180px repeat(31, 1fr);
  gap: 2px;
  font-size: 11px;
  overflow-x: auto;
}
.matrix-cell {
  padding: 8px 4px;
  text-align: center;
  background: var(--surface-3);
  border-radius: 4px;
  font-weight: 600;
}
.matrix-name {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.matrix-header { background: var(--surface-2); color: var(--ink-4); font-size: 10.5px; }
.matrix-cell.present { background: rgba(0,200,150,.18); color: #007a5b; }
.matrix-cell.absent  { background: rgba(255,69,102,.18); color: #a31a35; }
.matrix-cell.leave   { background: rgba(255,176,32,.22); color: #8a5a00; }
.matrix-cell.weekoff { background: var(--surface-3); color: var(--ink-4); }
.matrix-cell.half    { background: rgba(37,99,255,.18); color: #1a3fb3; }

/* Calendar / Shift roster */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  min-height: 88px;
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.cal-cell .day-num { font-weight: 700; font-size: 14px; }
.cal-cell .shift {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
  display: inline-block;
}
.shift-morning { background: rgba(255,176,32,.20); color: #8a5a00; }
.shift-evening { background: rgba(109,40,255,.14); color: #5118d9; }
.shift-night   { background: rgba(15,16,36,.10); color: var(--ink); }

/* Employee profile */
.profile-header {
  display: flex; gap: 22px; align-items: center;
  background: var(--g-violet);
  color: white;
  border-radius: var(--r-2xl);
  padding: 28px;
  position: relative; overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  border-radius: 50%;
}
.profile-header .avatar-xl {
  background: rgba(255,255,255,.25);
  border: 3px solid rgba(255,255,255,.4);
}
.profile-info h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.profile-info .role { opacity: .9; font-size: 13.5px; }
.profile-meta { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.profile-meta-item { font-size: 12px; opacity: .92; }
.profile-meta-item strong { display: block; opacity: 1; font-weight: 700; font-size: 13px; }

/* File upload area */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  background: var(--surface-2);
  transition: all .2s;
  cursor: pointer;
}
.upload-zone:hover { border-color: var(--c-violet); background: rgba(109,40,255,.04); }
.upload-zone .icon { font-size: 32px; color: var(--c-violet); margin-bottom: 6px; }

/* Asset / Inventory tile */
.asset-tile {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex; gap: 14px; align-items: center;
  transition: all .15s;
}
.asset-tile:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.asset-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px; color: white;
  flex-shrink: 0;
}

/* Wizard steps */
.wizard-steps {
  display: flex; gap: 0;
  margin-bottom: 24px;
  position: relative;
}
.wizard-step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  position: relative;
}
.wizard-step .step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-4);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--border);
  z-index: 2;
}
.wizard-step.active .step-num { background: var(--g-violet); color: white; border-color: transparent; box-shadow: var(--sh-glow-violet); }
.wizard-step.done .step-num { background: var(--success); color: white; border-color: transparent; }
.wizard-step .step-label { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.wizard-step.active .step-label { color: var(--ink); }
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 17px; left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.wizard-step.done:not(:last-child)::after { background: var(--success); }

/* Responsive */
@media (max-width: 1024px) {
  :root { --sb-w: 0; }
  .sidebar {
    position: fixed; left: -280px; width: 260px;
    transition: left .25s;
    z-index: 100;
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: block; }
  .app-shell { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* Charts container */
.chart-box { position: relative; height: 280px; }
.chart-box-sm { position: relative; height: 200px; }

/* Birthday widget */
.birthday-card {
  background: var(--g-pink);
  color: white;
  border-radius: var(--r-xl);
  padding: 18px;
  box-shadow: var(--sh-glow-pink);
}
.birthday-card .b-icon { font-size: 28px; margin-bottom: 4px; }

/* Quick action card */
.quick-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  transition: all .15s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--c-violet); }
.quick-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 20px; color: white;
}
.quick-card strong { font-size: 14px; }
.quick-card span { font-size: 12px; color: var(--ink-4); }

/* Document chips */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; }
.doc-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: all .15s;
}
.doc-chip:hover { border-color: var(--c-violet); background: white; }
.doc-chip .doc-icon { font-size: 24px; color: var(--c-coral); }
.doc-chip strong { font-size: 12.5px; font-weight: 600; }
.doc-chip span { font-size: 11px; color: var(--ink-4); }

/* Toast */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--sh-lg);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 300;
  opacity: 0;
  transform: translateY(20px);
  transition: all .25s;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* Mobile preview frame */
.mobile-preview {
  background: var(--ink);
  border-radius: 36px;
  padding: 12px;
  width: 280px;
  margin: 0 auto;
  box-shadow: var(--sh-lg);
}
.mobile-screen {
  background: white;
  border-radius: 26px;
  height: 520px;
  overflow: hidden;
  position: relative;
}

/* Mobile app link in topbar */
.mobile-link{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 14px;
  background:var(--g-violet);
  color:white;
  border-radius:10px;
  font-size:13px;font-weight:600;
  text-decoration:none;
  box-shadow:0 4px 14px rgba(109,40,255,.25);
  transition:transform .2s, box-shadow .2s;
}
.mobile-link:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(109,40,255,.35);
}
@media (max-width:640px){
  .mobile-link{padding:6px 10px;font-size:11px}
}
