/* OpenTrip dashboards — styling derived from the "Car Rental Company Dashboard UI" Figma:
   Inter, dark sidebar #1A1919, primary #006AFF, 8px cards with soft shadow, status dots. */
:root {
  --side: #1a1919; --primary: #006aff; --primary-dark: #0055d1; --success: #52c93f; --danger: #ff2727; --warn: #f5a524;
  --ink: #1a1919; --metric: #01150c; --muted: #656575; --sec: #525256; --ph: #a3a3a3; --border: #dedede; --row: rgba(163, 163, 163, .25);
  --rail: #f8f7f1; --card: #fff; --stat: #fdfdfd; --chip: rgba(153, 153, 153, .1);
  --shadow: 0 8px 12px rgba(69, 69, 80, .1); --shadow-sm: 0 2.7px 13.5px rgba(69, 69, 80, .1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Inter", system-ui, sans-serif; font-size: 16px; line-height: 1.5; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid rgba(0, 106, 255, .55); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* shell */
.d-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.d-side { background: var(--side); color: #fff; padding: 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.d-logo { background: #fff; border-radius: 8px; padding: 6px 12px; margin: 0 8px 28px; display: inline-flex; align-self: flex-start; }
.d-logo img { height: 34px; width: auto; }
.d-role { font-size: 12px; color: rgba(255, 255, 255, .5); padding: 0 16px 8px; text-transform: uppercase; letter-spacing: .06em; }
.d-nav { display: grid; gap: 8px; }
.d-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 4px; color: #fff; opacity: .75; position: relative; text-transform: capitalize; }
.d-nav a:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.d-nav a[aria-current="page"] { background: var(--primary); opacity: 1; }
.d-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -24px; top: 6px; bottom: 6px; width: 4px; background: rgba(255, 255, 255, .85); border-radius: 0 3px 3px 0; }
.d-nav svg, .d-ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.d-nav .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 9px; padding: 0 7px; line-height: 18px; }
.d-sec { font-size: 16px; color: rgba(255, 255, 255, .5); padding: 12px 16px 4px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .2); }
.d-logout { margin-top: auto; background: rgba(255, 255, 255, .2); color: #fff; border: 0; border-radius: 8px; padding: 12px; display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 18px; font-weight: 500; }
.d-logout:hover { background: rgba(255, 255, 255, .3); }
.d-main { min-width: 0; padding: 0 28px 60px; }
.d-top { display: flex; align-items: center; justify-content: flex-end; gap: 24px; padding: 28px 0 20px; position: sticky; top: 0; background: #fff; z-index: 20; }
.d-top .burger { display: none; margin-right: auto; background: none; border: 0; width: 40px; height: 40px; }
.d-bell { position: relative; background: none; border: 0; padding: 4px; }
.d-bell i { position: absolute; top: 2px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.d-search { background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); display: flex; align-items: center; padding: 0 24px 0 32px; width: 366px; max-width: 40vw; height: 48px; gap: 8px; }
.d-search input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; }
.d-search input::placeholder { color: var(--ph); }
.d-me { display: flex; align-items: center; gap: 10px; }
.d-av { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 600; }
.d-me small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.d-me b { font-weight: 600; line-height: 1.2; display: block; }

/* page header */
.d-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.d-head h1 { font-size: 20px; font-weight: 500; color: var(--sec); }
.d-head .sub { font-size: 12px; color: var(--muted); }
.d-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* cards */
.d-card { background: var(--card); border-radius: 8px; box-shadow: var(--shadow); padding: 28px 28px 24px; margin-bottom: 20px; min-width: 0; }
.d-card > h2, .d-card .h { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.d-grid { display: grid; gap: 20px; }
.d-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.d-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.d-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.d-grid > .d-card { margin-bottom: 0; }
.d-home { display: grid; grid-template-columns: 344px minmax(0, 1fr); gap: 28px; align-items: start; }
.d-rail { background: var(--rail); padding: 32px 28px; border-radius: 8px; display: grid; gap: 16px; }
.d-rail > h2 { font-size: 20px; font-weight: 500; color: var(--sec); }
.d-rail > h2 small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.d-stat { background: var(--stat); border-radius: 8px; box-shadow: var(--shadow); padding: 24px 24px 20px; }
.d-stat header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(163, 163, 163, .2); }
.d-stat header span { font-size: 18px; font-weight: 500; color: var(--muted); }
.d-stat header em { font-style: normal; background: #f4f5f7; padding: 4px 8px; border-radius: 2px; font-size: 12px; color: var(--muted); }
.d-stat .kpi { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; gap: 8px; }
.d-stat .kpi b { font-size: 28px; font-weight: 700; color: var(--metric); line-height: 1.3; }
.d-stat .delta { font-weight: 500; font-size: 15px; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); }
.d-stat p { margin: 6px 0 0; font-size: 14px; font-weight: 300; color: var(--muted); }
.d-stat .row2 { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; margin-top: 8px; }
.d-mini { background: var(--stat); border-radius: 8px; box-shadow: var(--shadow); padding: 20px 24px; }
.d-mini span { display: block; color: var(--muted); font-size: 14px; } .d-mini b { font-size: 26px; font-weight: 700; color: var(--metric); }

/* chips, dots */
.dot { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 300; text-transform: capitalize; white-space: nowrap; }
.dot::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--ph)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--ph)) 22%, transparent); flex: none; }
.dot.green { --c: var(--success); } .dot.blue { --c: var(--primary); } .dot.red { --c: var(--danger); } .dot.amber { --c: var(--warn); } .dot.grey { --c: var(--ph); }
.code { background: var(--chip); padding: 3px 10px; border-radius: 4px; font-size: 13px; white-space: nowrap; }
.badge-s { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: rgba(0, 106, 255, .1); color: var(--primary); font-weight: 500; }

/* buttons */
.db { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 4px; padding: 11px 28px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.db:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.db[disabled] { opacity: .45; cursor: not-allowed; }
.db.sm { padding: 4px 16px; font-size: 14px; }
.db.ghost { background: transparent; border-color: transparent; color: var(--sec); font-weight: 500; padding-inline: 12px; }
.db.ghost:hover { background: #f4f5f7; }
.db.alt { background: #fff; border-color: var(--border); color: var(--ink); }
.db.alt:hover { background: #f4f5f7; }
.db.danger { background: var(--danger); border-color: var(--danger); }
.db.green { background: var(--success); border-color: var(--success); }

/* forms */
.df { display: grid; gap: 18px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.df .full { grid-column: 1 / -1; }
.df label, .dl { display: block; font-size: 13px; font-weight: 500; color: var(--sec); margin-bottom: 6px; }
.di, .ds, .dt { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; background: #fff; line-height: 1.5; color: var(--muted); }
.di:focus, .ds:focus, .dt:focus { border-color: var(--primary); outline: 2px solid rgba(0, 106, 255, .2); color: var(--ink); }
.di[readonly], .di:disabled { background: #f8f8f8; }
.dt { min-height: 110px; resize: vertical; }
.d-hint { font-size: 12px; color: var(--ph); margin-top: 4px; }
.d-err { color: var(--danger); font-size: 13px; margin-top: 6px; }
.d-ok { color: #1a8a4f; font-size: 13px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters .di, .filters .ds { width: auto; min-width: 180px; padding: 10px 14px; }
.d-alert { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; background: #eef4ff; color: #1f4fb0; }
.d-alert.warn { background: #fff6e5; color: #8a5a00; } .d-alert.bad { background: #ffeded; color: #a31616; } .d-alert.ok { background: #e9f8e5; color: #1c6a14; }

/* tables */
.d-tablewrap { overflow-x: auto; }
.d-table { width: 100%; border-collapse: collapse; }
.d-table th { text-align: left; font-size: 12px; font-weight: 300; color: var(--muted); padding: 0 12px 12px; border-bottom: 1px solid var(--row); white-space: nowrap; }
.d-table td { padding: 12px; border-bottom: 1px solid var(--row); font-size: 15px; font-weight: 300; color: var(--muted); vertical-align: middle; }
.d-table td.strong, .d-table td b { color: var(--ink); font-weight: 400; }
.d-table tr:hover td { background: #fafafa; }
.d-table .act { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.d-table .num { text-align: right; }
.d-empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.d-empty svg { width: 56px; height: 56px; stroke: var(--ph); fill: none; stroke-width: 1.3; margin: 0 auto 10px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; align-items: center; font-size: 14px; color: var(--muted); }
.pager button { width: 32px; height: 32px; border: 1px solid var(--border); background: #fff; border-radius: 4px; }
.pager button[aria-current="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button[disabled] { opacity: .4; cursor: not-allowed; }

/* tabs */
.d-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--row); margin-bottom: 20px; overflow-x: auto; }
.d-tabs button { background: none; border: 0; padding: 10px 16px; border-bottom: 2px solid transparent; color: var(--muted); white-space: nowrap; }
.d-tabs button[aria-selected="true"] { color: var(--primary); border-color: var(--primary); font-weight: 500; }

/* charts */
.legend { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.legend div { display: flex; align-items: center; gap: 12px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.legend b { margin-left: auto; font-weight: 400; }
.donut { display: block; margin: 8px auto 0; }
.chart text { font-size: 12px; fill: var(--sec); }
.chart-legend { display: flex; gap: 24px; font-size: 12px; color: var(--muted); justify-content: flex-end; margin-bottom: 8px; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; }

/* modal / drawer / toast */
.d-overlay { position: fixed; inset: 0; background: rgba(26, 25, 25, .5); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.d-modal { background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 28px; width: min(640px, 100%); }
.d-modal.wide { width: min(900px, 100%); }
.d-modal h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.d-modal footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.d-toast { position: fixed; bottom: 24px; right: 24px; z-index: 80; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow); max-width: 360px; }
.d-toast.bad { background: var(--danger); }
.kvs { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kvs dt { color: var(--muted); } .kvs dd { margin: 0; color: var(--ink); word-break: break-word; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs figure { margin: 0; position: relative; width: 110px; }
.thumbs img { width: 110px; height: 80px; object-fit: cover; border-radius: 4px; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; line-height: 1; }
.itin-row { display: grid; grid-template-columns: 90px 1fr 36px; gap: 10px; margin-bottom: 10px; align-items: start; }
.itin-row .dt { min-height: 60px; grid-column: 2; }
.itin-row .del { grid-row: 1 / span 2; grid-column: 3; }
.login-card { max-width: 420px; margin: 12vh auto 0; background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 32px; }
.login-card img { height: 40px; margin-bottom: 18px; }
.login-card h1 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, #f1f1f1, #fafafa, #f1f1f1); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 1180px) { .d-home { grid-template-columns: 1fr; } .d-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .d-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .d-shell { grid-template-columns: 1fr; }
  .d-side { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; width: 260px; }
  .d-side.open { transform: none; }
  .d-top .burger { display: block; } .d-search { display: none; }
  .d-main { padding: 0 16px 50px; }
  .d-grid.c2, .d-grid.c3, .d-grid.c4, .df { grid-template-columns: minmax(0, 1fr); }
  .d-card { padding: 20px 16px; } .kvs { grid-template-columns: 110px 1fr; }
}
@media print { .d-side, .d-top, .d-actions { display: none !important; } .d-shell { display: block; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
img { border-radius: 10px; } .d-logo img, .login-card img { border-radius: 0; } .d-av { border-radius: 50%; }

/* =====================================================================
   v2 — more visual, tidier dashboards: tinted status pills, avatars, KPI cards
   with sparklines, charts, hero greeting, card grids, softer shell
   ===================================================================== */
:root { --bg: #f4f6fb; --card-r: 16px; --purple: #7c5cff; --teal: #00b8a9; --orange: #ff8a2b; --shadow: 0 4px 18px rgba(20, 30, 70, .06); --shadow-lg: 0 12px 32px rgba(20, 30, 70, .12); }
body { background: var(--bg); }
.d-side { background: linear-gradient(180deg, #17181f 0%, #0f1016 100%); }
.d-nav a { border-radius: 10px; opacity: .72; transition: background .15s, opacity .15s; }
.d-nav a[aria-current="page"] { background: linear-gradient(135deg, #2f80ff, #006aff); box-shadow: 0 8px 18px rgba(0, 106, 255, .35); }
.d-nav a[aria-current="page"]::before { display: none; }
.d-sec { border-top: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 18px 16px 6px; color: rgba(255, 255, 255, .38); }
.d-side .d-me-card { margin-top: auto; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 12px; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.d-side .d-me-card b { display: block; font-size: 14px; line-height: 1.2; } .d-side .d-me-card small { color: rgba(255, 255, 255, .55); font-size: 12px; }
.d-logout { margin-top: 0; border-radius: 10px; font-size: 15px; padding: 10px; background: rgba(255, 255, 255, .1); }
.d-top { background: rgba(244, 246, 251, .85); backdrop-filter: blur(10px); padding: 20px 0 14px; }
.d-search { box-shadow: var(--shadow); border-radius: 999px; }
.d-av { background: linear-gradient(135deg, #2f80ff, #7c5cff); }
.d-main { padding-bottom: 70px; }

/* cards */
.d-card { border-radius: var(--card-r); box-shadow: var(--shadow); padding: 24px 24px 20px; border: 1px solid rgba(20, 30, 70, .04); }
.d-card > h2, .d-card .h { font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.d-card > h2 small { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }
.d-head h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; display: flex; align-items: center; gap: 12px; }
.d-head h1 .hico { width: 42px; height: 42px; border-radius: 12px; background: rgba(0, 106, 255, .1); display: grid; place-items: center; color: var(--primary); }
.d-head .sub { font-size: 14px; margin-top: 4px; }
.d-mini { border-radius: 14px; border: 1px solid rgba(20, 30, 70, .05); }
.db { border-radius: 10px; font-weight: 500; transition: transform .15s, box-shadow .15s, background .15s; }
.db:not(.alt):not(.ghost):hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 106, 255, .28); }
.db.sm { border-radius: 8px; }
.di, .ds, .dt { border-radius: 10px; background: #fff; }

/* hero greeting */
.d-hero { background: linear-gradient(120deg, #0b2b66 0%, #1e6fd9 60%, #00b8a9 130%); border-radius: 20px; padding: 28px 32px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-lg); }
.d-hero::before, .d-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.d-hero::before { width: 260px; height: 260px; right: -60px; top: -90px; } .d-hero::after { width: 160px; height: 160px; right: 160px; bottom: -90px; }
.d-hero > * { position: relative; z-index: 1; }
.d-hero h1 { color: #fff; font-size: 24px; font-weight: 700; } .d-hero p { margin: 6px 0 0; opacity: .85; font-size: 14px; }
.d-hero .d-actions .db { background: #fff; color: #0b2b66; border-color: #fff; } .d-hero .d-actions .db.alt { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .35); }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.kpi-card { background: #fff; border-radius: var(--card-r); box-shadow: var(--shadow); padding: 20px 20px 14px; position: relative; overflow: hidden; border: 1px solid rgba(20, 30, 70, .04); transition: transform .2s, box-shadow .2s; }
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.kpi-ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpi-card .lbl { color: var(--muted); font-size: 13px; margin-top: 14px; }
.kpi-card .val { font-size: 26px; font-weight: 700; color: var(--metric); letter-spacing: -.02em; line-height: 1.2; }
.kpi-card .spark { display: block; width: 100%; height: 46px; margin-top: 8px; }
.chip-delta { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; display: inline-flex; gap: 3px; align-items: center; }
.chip-delta.up { background: #e8f8e4; color: #1c8a10; } .chip-delta.down { background: #ffe9e9; color: #c01c1c; } .chip-delta.flat { background: #f0f1f5; color: var(--muted); }

/* status pills (tinted) — overrides the dot style everywhere */
.dot { background: color-mix(in srgb, var(--c, var(--ph)) 13%, #fff); color: color-mix(in srgb, var(--c, #656575) 70%, #000); padding: 3px 11px 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; gap: 7px; text-transform: capitalize; }
.dot::before { width: 7px; height: 7px; box-shadow: none; background: var(--c, var(--ph)); }
.dot.green { --c: #1faa59; } .dot.blue { --c: #2f80ff; } .dot.red { --c: #ef4444; } .dot.amber { --c: #f59e0b; } .dot.grey { --c: #8b90a3; }
.code { background: #eef1f9; color: #3b4a7a; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* avatars */
.av { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; background: var(--bg, #2f80ff); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; } .who b { display: block; color: var(--ink); font-weight: 500; line-height: 1.3; } .who small { color: var(--muted); font-size: 12px; display: block; }
.thumb-s { width: 56px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: #e5e9f4; }
.pkg-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; } .pkg-cell b { display: block; color: var(--ink); font-weight: 500; line-height: 1.3; max-width: 320px; white-space: normal; }
.pkg-cell small { color: var(--muted); font-size: 12px; }

/* tables */
.d-table th { background: #f6f8fc; color: #7a8196; text-transform: uppercase; font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 11px 14px; border: 0; }
.d-table th:first-child { border-radius: 10px 0 0 10px; } .d-table th:last-child { border-radius: 0 10px 10px 0; }
.d-table td { padding: 14px; border-bottom: 1px solid #eef1f7; color: #4d556b; font-weight: 400; }
.d-table tbody tr { transition: background .12s; } .d-table tr:hover td { background: #f9fbff; }
.d-table tr:last-child td { border-bottom: 0; }
.d-empty { color: var(--muted); } .d-empty svg { stroke: #b9bfd3; }

/* charts */
.chart-box { position: relative; } .chart text { fill: #7a8196; font-size: 11px; }
.vbars rect { transition: opacity .2s; } .vbars g:hover rect { opacity: .75; }
.donut-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto; } .donut-wrap svg { width: 100%; height: 100%; }
.donut-wrap .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .donut-wrap .center b { font-size: 26px; color: var(--metric); line-height: 1.1; } .donut-wrap .center span { font-size: 12px; color: var(--muted); }
.hbars { display: grid; gap: 14px; } .hbar-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hbar-row .nm { font-size: 14px; color: var(--ink); font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row .track { height: 8px; background: #eef1f7; border-radius: 99px; margin-top: 6px; overflow: hidden; } .hbar-row .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f80ff, #7c5cff); width: var(--w); }
.hbar-row .amt { font-size: 13px; color: var(--ink); font-weight: 600; white-space: nowrap; text-align: right; } .hbar-row .amt small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.rank { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--bg, #2f80ff); }
.hbar-row img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }

/* attention tiles + feed */
.attn { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.attn a { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; background: color-mix(in srgb, var(--c) 8%, #fff); border: 1px solid color-mix(in srgb, var(--c) 18%, #fff); transition: transform .18s, box-shadow .18s; }
.attn a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.attn .n { font-size: 26px; font-weight: 700; color: var(--metric); line-height: 1; } .attn .t { font-size: 13px; color: var(--muted); margin-top: 4px; }
.attn .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; } .attn .ic svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 1.8; }
.feed { display: grid; gap: 14px; } .feed li { list-style: none; display: flex; gap: 12px; align-items: center; } .feed { padding: 0; margin: 0; }
.feed small { color: var(--muted); display: block; font-size: 12px; } .feed b { font-weight: 500; color: var(--ink); }

/* card grids */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pcard { background: #fff; border-radius: var(--card-r); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(20, 30, 70, .04); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard .cover { height: 150px; position: relative; background: #dfe5f3; } .pcard .cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.pcard .cover .dot { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, .95); }
.pcard .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; } .pcard h3 { font-size: 16px; font-weight: 600; } .pcard p { margin: 0; font-size: 13px; color: var(--muted); }
.pcard .meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); } .pcard .meta b { color: var(--ink); font-weight: 600; }
.pcard .act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.stars { color: #f5a524; letter-spacing: 1px; }
.review-card { background: #fff; border-radius: var(--card-r); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 10px; border: 1px solid rgba(20, 30, 70, .04); }
.review-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .review-card p { margin: 0; color: #4d556b; font-size: 15px; line-height: 1.6; }
.review-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs-pill { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); gap: 2px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs-pill button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; color: var(--muted); font-size: 14px; } .tabs-pill button[aria-selected="true"] { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(0, 106, 255, .3); }
.tabs-pill .cnt { font-size: 11px; background: rgba(0, 0, 0, .08); padding: 0 7px; border-radius: 9px; margin-left: 6px; } .tabs-pill button[aria-selected="true"] .cnt { background: rgba(255, 255, 255, .25); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; } .split > .d-card { margin-bottom: 0; }
.split3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; } .split3 > .d-card { margin-bottom: 0; }
@media (max-width: 1180px) { .kpis, .attn { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split, .split3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .kpis, .attn { grid-template-columns: minmax(0, 1fr); } .d-hero { padding: 22px; } .d-head h1 { font-size: 22px; } }
.d-side { padding: 18px 20px; } .d-logo { margin-bottom: 14px; } .d-nav { gap: 2px; } .d-nav a { padding: 9px 14px; font-size: 15px; } .d-sec { padding: 12px 16px 4px; }
.d-side .d-me-card { margin-top: auto; padding-top: 12px; }
@media (max-height: 860px) { .d-role { display: none; } .d-side .d-me-card { display: none; } }
.hico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hbar-row img, .pcard .cover img { background: #e5e9f4; }

/* =====================================================================
   v4 — compact type scale, world-class icons + interactive charts
   ===================================================================== */
:root { --shadow: 0 1px 2px rgba(16, 24, 56, .04), 0 6px 20px rgba(16, 24, 56, .05); --shadow-lg: 0 2px 4px rgba(16, 24, 56, .05), 0 16px 36px rgba(16, 24, 56, .12); --card-r: 14px; }
body { font-size: 13.5px; letter-spacing: -.003em; }
.d-main { padding-left: 28px; padding-right: 28px; }
.d-head h1 { font-size: 21px; } .d-head .hico { width: 36px; height: 36px; border-radius: 11px; } .d-head h1 .hico { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, rgba(47, 128, 255, .16), rgba(124, 92, 255, .16)); }
.d-head .sub { font-size: 12.5px; }
.d-hero { padding: 22px 28px; border-radius: 18px; } .d-hero h1 { font-size: 20px; } .d-hero p { font-size: 13px; }
.d-card { padding: 20px 20px 16px; } .d-card > h2, .d-card .h { font-size: 14px; margin-bottom: 14px; letter-spacing: -.01em; } .d-card > h2 small { font-size: 12px; }
.kpis, .split, .split3 { gap: 16px; } .attn { gap: 12px; }
.kpi-card { padding: 16px 16px 10px; } .kpi-card .lbl { font-size: 12px; margin-top: 12px; } .kpi-card .val { font-size: 22px; }
.kpi-ico { width: 38px; height: 38px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 38%, transparent); }
.kpi-ico svg { width: 19px; height: 19px; stroke-width: 1.7; } .kpi-ico svg * { fill-opacity: .22; }
.kpi-card::after { content: ""; position: absolute; right: -28px; top: -28px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 14%, transparent), transparent); pointer-events: none; }
.kpi-card .spark { height: 40px; }
.chip-delta { font-size: 11px; padding: 2px 8px; }
.attn a { padding: 13px; gap: 12px; } .attn .n { font-size: 21px; } .attn .t { font-size: 12px; }
.attn .ic { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); } .attn .ic svg { width: 19px; height: 19px; stroke-width: 1.7; } .attn .ic svg * { fill-opacity: .25; }
.d-table th { font-size: 10.5px; padding: 9px 12px; } .d-table td { font-size: 13px; padding: 11px 12px; }
.who b { font-size: 13px; } .who small, .pkg-cell small, .feed small, .hbar-row .amt small { font-size: 11.5px; }
.av { width: 32px; height: 32px; font-size: 12px; } .thumb-s { width: 48px; height: 36px; border-radius: 9px; }
.dot { font-size: 11px; padding: 2px 9px 2px 8px; } .code { font-size: 11.5px; }
.db { font-size: 13px; } .db.sm { font-size: 12px; padding: 3px 12px; }
.di, .ds, .dt { font-size: 13px; } .df label, .dl { font-size: 12px; }
.tabs-pill button { font-size: 13px; padding: 6px 15px; } .pager { font-size: 12.5px; }
.pcard h3 { font-size: 14.5px; } .pcard p, .pcard .meta { font-size: 12px; } .review-card p { font-size: 13.5px; }
.hbar-row .nm { font-size: 13px; } .hbar-row .amt { font-size: 12.5px; } .hbar-row img, .rank { width: 38px; height: 38px; border-radius: 11px; } .hbar-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
.hbar-row .fill { background: linear-gradient(90deg, #5aa2ff, #7c5cff); box-shadow: 0 2px 8px rgba(47, 128, 255, .35); }
.d-modal h2 { font-size: 16px; } .kvs { font-size: 13px; }
/* shell */
.d-side { padding: 16px 14px; } .d-nav a { padding: 8px 12px; font-size: 13.5px; gap: 11px; font-weight: 500; } .d-nav svg, .d-ico { width: 19px; height: 19px; stroke-width: 1.7; }
.d-nav a[aria-current="page"] svg * { fill-opacity: .3; } .d-nav a:hover { opacity: 1; background: rgba(255, 255, 255, .07); }
.d-sec { font-size: 10px; padding: 14px 14px 4px; } .d-logout { font-size: 13px; padding: 9px; } .d-side .d-me-card b { font-size: 13px; }
.d-search input { font-size: 13px; } .d-me b { font-size: 13px; } .d-me small { font-size: 11px; }
.d-bell svg { width: 20px; height: 20px; }
.d-empty svg { width: 42px; height: 42px; stroke-width: 1.4; }

/* tooltip */
.d-tip { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .12s; background: rgba(15, 18, 38, .96); color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 12px; box-shadow: 0 10px 30px rgba(10, 14, 40, .3); min-width: 130px; backdrop-filter: blur(6px); }
.d-tip.on { opacity: 1; }
.d-tip .tl { font-weight: 600; margin-bottom: 5px; color: #fff; }
.d-tip .tr { display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .72); } .d-tip .tr i { width: 8px; height: 8px; border-radius: 50%; flex: none; } .d-tip .tr span { flex: 1; } .d-tip .tr b { color: #fff; font-weight: 600; margin-left: 12px; }

/* charts */
.chart text { font-size: 10.5px; fill: #8a91a8; font-weight: 500; }
.area-chart .xh, .area-chart .xd { opacity: 0; transition: opacity .12s; } .area-chart .col:hover .xh, .area-chart .col:hover .xd { opacity: 1; }
.area-chart .xe { animation: pulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.area-chart .ln, .spark .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.4, 0, .2, 1) .1s forwards; }
.area-chart .fill, .spark path:first-of-type { animation: fadein .9s ease .3s both; }
.vbars .b { transform-box: fill-box; transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 60ms); transition: filter .15s; }
.vbars .bar:hover .b { filter: brightness(1.06) saturate(1.2); } .vbars .bar:hover .hit { fill: rgba(47, 128, 255, .06); } .vbars .bar:hover text { fill: #1f2a44; }
.vbars .bar.cur text { fill: #1f2a44; font-weight: 700; }
.donut-wrap { width: 180px; height: 180px; } .donut-wrap .center b { font-size: 24px; } .donut-wrap .center span { font-size: 11.5px; }
.donut-wrap .seg { transition: stroke-width .15s; animation: fadein .8s ease both; animation-delay: calc(var(--k) * 120ms); cursor: pointer; } .donut-wrap .seg:hover { stroke-width: 21; }
.legend div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; padding: 6px 10px; border-radius: 9px; transition: background .12s; } .legend div:hover { background: #f4f6fc; }
.legend i { width: 9px; height: 9px; border-radius: 3px; } .legend span { flex: 1; color: #4d556b; } .legend em { font-style: normal; color: var(--muted); } .legend b { min-width: 38px; text-align: right; color: var(--ink); font-weight: 600; }
.chart-legend { font-size: 11.5px; }
@keyframes draw { to { stroke-dashoffset: 0; } } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .area-chart .ln, .spark .ln { animation: none; stroke-dashoffset: 0; } .vbars .b, .donut-wrap .seg, .area-chart .fill, .area-chart .xe { animation: none; } }

.chart { --r: 1; } .chart text { font-size: calc(11px / var(--r)); } .area-chart .ln { stroke-width: calc(2.6px / var(--r)); } .area-chart .ln2 { stroke-width: calc(1.8px / var(--r)); }
.area-chart .xd { r: calc(4.5px / var(--r)); stroke-width: calc(2.5px / var(--r)); } .area-chart .xe { r: calc(3.5px / var(--r)); }
.area-chart line { stroke-width: calc(1px / var(--r)); }
.spark { --r: 1; }
.seatbar { display: flex; align-items: center; gap: 10px; min-width: 150px; } .seatbar .track { flex: 1; height: 7px; background: #eef1f7; border-radius: 99px; overflow: hidden; } .seatbar .fill { height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #5aa2ff, #7c5cff); } .seatbar span { font-size: 12px; color: var(--muted); white-space: nowrap; }
#ac { justify-content: center; }
