/* ============================================================
   AssetFlow — Dashboard Design System
   Dark-first B2B marketplace UI (motion-graphics templates)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Inter+Tight:wght@500;600;700&display=swap');

:root {
  /* ---- Surfaces ---- */
  --bg-0: #0d0f14;          /* app background */
  --bg-1: #12151b;          /* sidebar / rail */
  --bg-2: #171a21;          /* card */
  --bg-3: #1d212b;          /* elevated / hover */
  --bg-4: #242935;          /* input / active */
  --bg-glass: rgba(20,23,30,.72);

  /* ---- Lines ---- */
  --line: #262b36;
  --line-soft: rgba(255,255,255,.06);
  --line-strong: #333a48;

  /* ---- Text ---- */
  --tx-0: #eef1f6;          /* primary */
  --tx-1: #b6bdca;          /* secondary */
  --tx-2: #828b9b;          /* muted */
  --tx-3: #5d6675;          /* faint / placeholder */

  /* ---- Brand & status ---- */
  --violet: #8b7cf6;
  --violet-bright: #a594ff;
  --violet-dim: rgba(139,124,246,.14);
  --violet-line: rgba(139,124,246,.34);

  --green: #38d399;
  --green-dim: rgba(56,211,153,.13);
  --green-line: rgba(56,211,153,.32);

  --yellow: #f2c94c;
  --yellow-dim: rgba(242,201,76,.13);
  --yellow-line: rgba(242,201,76,.30);

  --orange: #f2994a;
  --orange-dim: rgba(242,153,74,.13);
  --orange-line: rgba(242,153,74,.32);

  --red: #ef5d6b;
  --red-dim: rgba(239,93,107,.13);
  --red-line: rgba(239,93,107,.34);

  --blue: #56a0f2;
  --blue-dim: rgba(86,160,242,.13);

  --gray: #8b95a6;
  --gray-dim: rgba(139,149,166,.12);
  --gray-line: rgba(139,149,166,.28);

  /* ---- Radius ---- */
  --r-xs: 5px;
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;

  /* ---- Shadow ---- */
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 8px 24px rgba(0,0,0,.36);
  --sh-3: 0 18px 50px rgba(0,0,0,.5);

  --sidebar-w: 248px;
  --topbar-h: 60px;

  --ease: cubic-bezier(.4,.1,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--tx-0);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--violet-dim); color: var(--violet-bright); }

/* ---- scrollbars ---- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2b313d; border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #39414f; background-clip: padding-box; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
svg { display: block; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.font-display { font-family: 'Inter Tight', 'Inter', sans-serif; letter-spacing: -.01em; }
.h1 { font-family: 'Inter Tight', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-family: 'Inter Tight', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.body { font-size: 13px; color: var(--tx-1); }
.small { font-size: 12px; color: var(--tx-2); }
.label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--tx-2); white-space: nowrap;
}
.num { font-family: 'Inter Tight', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mono { font-variant-numeric: tabular-nums; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(145deg, var(--violet-bright), #6b5ce0);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(139,124,246,.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand-name { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-sub { font-size: 10.5px; color: var(--tx-2); font-weight: 500; }

.nav { padding: 6px 12px; overflow-y: auto; flex: 1; }
.nav-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--tx-3); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--tx-1); font-size: 13px; font-weight: 500;
  cursor: pointer; position: relative;
  transition: background .14s var(--ease), color .14s var(--ease);
  width: 100%; text-align: left;
}
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; flex: 0 0 auto; color: var(--tx-2); transition: color .14s; }
.nav-item > span:not(.nav-badge) { white-space: nowrap; }
.nav-item:hover { background: var(--bg-3); color: var(--tx-0); }
.nav-item:hover svg { color: var(--tx-1); }
.nav-item.active { background: var(--violet-dim); color: var(--violet-bright); }
.nav-item.active svg { color: var(--violet-bright); }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--violet-bright);
}
.nav-badge {
  margin-left: auto; min-width: 19px; height: 18px; padding: 0 6px;
  border-radius: var(--r-full); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.nav-badge.warn { background: var(--yellow-dim); color: var(--yellow); }
.nav-badge.brand { background: var(--violet-dim); color: var(--violet-bright); }

.sidebar-foot { border-top: 1px solid var(--line); padding: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .14s;
}
.user-chip:hover { background: var(--bg-3); }
.avatar {
  width: 30px; height: 30px; border-radius: var(--r-full); flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff;
  font-family: 'Inter Tight', sans-serif;
}

/* ---- main column ---- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  background: var(--bg-glass); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  position: sticky; top: 0; z-index: 30;
}
.topbar-title { display: flex; flex-direction: column; gap: 1px; }
.topbar-title h1 { font-family: 'Inter Tight', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.crumb { font-size: 11px; color: var(--tx-2); display: flex; align-items: center; gap: 6px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0 10px; height: 34px; width: 280px; color: var(--tx-2);
  transition: border-color .14s, background .14s;
}
.search:focus-within { border-color: var(--violet-line); background: var(--bg-3); }
.search input { background: none; border: none; outline: none; color: var(--tx-0); width: 100%; font-size: 13px; }
.search input::placeholder { color: var(--tx-3); }
.search svg { width: 15px; height: 15px; }
.search kbd {
  font-size: 10px; padding: 2px 5px; border-radius: 4px; background: var(--bg-4);
  border: 1px solid var(--line); color: var(--tx-2); font-family: inherit;
}

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center;
  color: var(--tx-2); background: var(--bg-2); border: 1px solid var(--line);
  transition: all .14s; position: relative;
}
.icon-btn:hover { color: var(--tx-0); background: var(--bg-3); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; stroke-width: 1.8; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg-2);
}

.content {
  padding: 26px;
  flex: 1;
  max-width: 1640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: auto;
}
.content #view { flex: 1; width: 100%; min-width: 0; }
.content #blockedHost:empty { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .lead { color: var(--tx-2); font-size: 13px; margin-top: 5px; max-width: 560px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: all .14s var(--ease);
}
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: var(--r-xs); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 13.5px; }

.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 2px 10px rgba(139,124,246,.34); }
.btn-primary:hover { background: var(--violet-bright); }
.btn-ghost { background: var(--bg-2); color: var(--tx-1); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-3); color: var(--tx-0); border-color: var(--line-strong); }
.btn-subtle { background: transparent; color: var(--tx-1); }
.btn-subtle:hover { background: var(--bg-3); color: var(--tx-0); }
.btn-success { background: var(--green); color: #06281c; box-shadow: 0 2px 10px rgba(56,211,153,.26); }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-warn { background: var(--orange); color: #2b1705; }
.btn-warn:hover { filter: brightness(1.06); }
.btn-danger-ghost { background: var(--red-dim); color: var(--red); border-color: var(--red-line); }
.btn-danger-ghost:hover { background: rgba(239,93,107,.2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-icon { padding: 0; width: 36px; }
.btn-icon.btn-sm { width: 30px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
}
.card-pad { padding: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 13.5px; font-weight: 600; }
.card-head .label { margin: 0; }

/* ---- KPI ---- */
.kpi-grid { display: grid; gap: 14px; }
.kpi {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px; position: relative; overflow: hidden;
  transition: border-color .14s, transform .14s;
}
.kpi:hover { border-color: var(--line-strong); }
.kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.kpi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.kpi-ico svg { width: 16px; height: 16px; stroke-width: 2; }
.kpi-label { font-size: 11.5px; color: var(--tx-2); font-weight: 500; }
.kpi-val { font-family: 'Inter Tight', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11.5px; color: var(--tx-2); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.trend svg { width: 13px; height: 13px; }

/* ============================================================
   BADGES (status system)
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.badge svg { width: 12px; height: 12px; stroke-width: 2.4; }

.badge-draft   { background: var(--gray-dim);   color: var(--gray);   border-color: var(--gray-line); }
.badge-draft .dot { background: var(--gray); }
.badge-pending { background: var(--yellow-dim); color: var(--yellow); border-color: var(--yellow-line); }
.badge-pending .dot { background: var(--yellow); }
.badge-approved{ background: var(--green-dim);  color: var(--green);  border-color: var(--green-line); }
.badge-approved .dot { background: var(--green); }
.badge-soft    { background: var(--orange-dim); color: var(--orange); border-color: var(--orange-line); }
.badge-soft .dot { background: var(--orange); }
.badge-hard    { background: var(--red-dim);    color: var(--red);    border-color: var(--red-line); }
.badge-hard .dot { background: var(--red); }
.badge-archived{ background: var(--gray-dim);   color: var(--tx-2);   border-color: var(--line); }
.badge-archived .dot { background: var(--tx-2); }
.badge-blocked { background: var(--red-dim);    color: var(--red);    border-color: var(--red-line); }
.badge-active  { background: var(--green-dim);  color: var(--green);  border-color: var(--green-line); }
.badge-active .dot { background: var(--green); }
.badge-removed { background: var(--gray-dim); color: var(--gray); border-color: var(--gray-line); }
.badge-removed .dot { background: var(--gray); }
.badge-plan { background: var(--blue-dim); color: var(--blue); border-color: rgba(86,160,242,.28); }
.badge-plan.free { background: var(--gray-dim); color: var(--gray); border-color: var(--gray-line); }
.badge-plan.pro { background: var(--violet-dim); color: var(--violet-bright); border-color: var(--violet-line); }

/* ---- plugin plans (admin) ---- */
.plan-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.plan-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.plan-card-pro { border-color: var(--violet-line); box-shadow: 0 0 0 1px var(--violet-dim); }
.plan-card-free { border-color: var(--line-strong); }
.plan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 0;
}
.plan-mini-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.plan-mini {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-mini-pro { border-color: var(--violet-line); background: linear-gradient(145deg, var(--violet-dim), var(--bg-2)); }
.plan-mini-free { border-color: var(--gray-line); }

.plan-discount-card { border-color: var(--orange-line); }
.plan-price-preview {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.price-old {
  font-size: 15px;
  color: var(--tx-3);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.price-new {
  font-family: 'Inter Tight', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.promo-type-seg button { min-width: 72px; }

.log-table .log-row.log-error td { background: rgba(239, 93, 107, 0.06); }
.log-table .log-row.log-warn td { background: rgba(242, 153, 74, 0.05); }
.badge-violet  { background: var(--violet-dim); color: var(--violet-bright); border-color: var(--violet-line); }
.badge-info    { background: var(--blue-dim);   color: var(--blue); }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
  border-radius: var(--r-full); background: var(--bg-4); color: var(--tx-1);
  font-size: 11px; font-weight: 500; border: 1px solid var(--line);
}
.pill.trunc {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   FILTER CHIPS / SEGMENTED
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: var(--r-full); background: var(--bg-2); border: 1px solid var(--line);
  color: var(--tx-1); font-size: 12px; font-weight: 500; transition: all .14s; white-space: nowrap;
}
.chip:hover { background: var(--bg-3); color: var(--tx-0); border-color: var(--line-strong); }
.chip.active { background: var(--violet-dim); border-color: var(--violet-line); color: var(--violet-bright); }
.chip .cnt { font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.chip.active .cnt { color: var(--violet-bright); opacity: .8; }
.chip svg { width: 13px; height: 13px; }

.segmented { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segmented button {
  height: 28px; padding: 0 12px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600;
  color: var(--tx-2); display: inline-flex; align-items: center; gap: 6px; transition: all .14s;
}
.segmented button svg { width: 14px; height: 14px; }
.segmented button:hover { color: var(--tx-0); }
.segmented button.active { background: var(--bg-4); color: var(--tx-0); box-shadow: var(--sh-1); }

.select {
  height: 34px; padding: 0 30px 0 11px; border-radius: var(--r-sm); background: var(--bg-2);
  border: 1px solid var(--line); color: var(--tx-1); font-size: 12.5px; font-weight: 500;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23828b9b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
  transition: border-color .14s;
}
.select:hover { border-color: var(--line-strong); color: var(--tx-0); }
.select:focus { outline: none; border-color: var(--violet-line); }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--tx-1); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 11.5px; color: var(--tx-3); }
.field .req { color: var(--red); }
.input, .textarea {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--tx-0); padding: 0 12px; height: 38px; font-size: 13px; width: 100%;
  transition: border-color .14s, background .14s;
}
.textarea { padding: 10px 12px; height: auto; min-height: 84px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--tx-3); }
.input:focus, .textarea:focus { outline: none; border-color: var(--violet-line); background: var(--bg-2); box-shadow: 0 0 0 3px var(--violet-dim); }
.input.error, .textarea.error { border-color: var(--red-line); }
.field-error { font-size: 11.5px; color: var(--red); display: flex; align-items: center; gap: 5px; }

.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: var(--bg-1);
  padding: 26px; text-align: center; transition: all .16s; cursor: pointer;
}
.dropzone:hover { border-color: var(--violet-line); background: var(--violet-dim); }
.dropzone .dz-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--bg-3); display: grid; place-items: center; margin: 0 auto 12px; color: var(--violet-bright); }
.dropzone .dz-ico svg { width: 20px; height: 20px; }

.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--bg-4); border: 1px solid var(--line); position: relative; transition: background .16s; flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--tx-2); transition: all .16s; }
.switch.on { background: var(--violet); border-color: var(--violet); }
.switch.on::after { left: 18px; background: #fff; }

/* progress */
.progress { height: 6px; border-radius: 999px; background: var(--bg-4); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--violet-bright)); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 720px; }
table.data thead th {
  text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--tx-2); padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-2); position: sticky; top: 0; white-space: nowrap;
}
table.data thead th.sortable { cursor: pointer; }
table.data thead th.sortable:hover { color: var(--tx-0); }
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); color: var(--tx-1); vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--bg-3); }
table.data tbody tr.sel { background: var(--violet-dim); }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-strong { color: var(--tx-0); font-weight: 600; }
.cell-muted { color: var(--tx-2); }
.cell-num { font-variant-numeric: tabular-nums; text-align: right; }
.th-num { text-align: right; }

.row-thumb {
  width: 46px; height: 30px; border-radius: var(--r-xs); flex: 0 0 auto; overflow: hidden;
  border: 1px solid var(--line); position: relative;
}
.tmpl-cell { display: flex; align-items: center; gap: 11px; }
.tmpl-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tmpl-meta .nm { color: var(--tx-0); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.tmpl-meta .sub { font-size: 11px; color: var(--tx-3); }

.checkbox {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line-strong);
  background: var(--bg-1); display: grid; place-items: center; cursor: pointer; transition: all .12s; flex: 0 0 auto;
}
.checkbox svg { width: 11px; height: 11px; stroke-width: 3; color: #fff; opacity: 0; }
.checkbox.on { background: var(--violet); border-color: var(--violet); }
.checkbox.on svg { opacity: 1; }

.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.act {
  width: 28px; height: 28px; border-radius: var(--r-xs); display: grid; place-items: center;
  color: var(--tx-2); transition: all .12s;
}
.act:hover { background: var(--bg-4); color: var(--tx-0); }
.act.danger:hover { background: var(--red-dim); color: var(--red); }
.act.success:hover { background: var(--green-dim); color: var(--green); }
.act svg { width: 15px; height: 15px; stroke-width: 1.9; }

/* ── Amal dropdown (⋮) ── */
.act-menu { position: relative; }
.act-menu > summary { list-style: none; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-menu[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 999; }
.act-drop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 1000;
  min-width: 176px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.22);
  padding: 4px; display: flex; flex-direction: column;
}
.act-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--r-xs); font-size: 13px; cursor: pointer;
  color: var(--tx-1); background: none; border: none; width: 100%; text-align: left;
  transition: background .1s;
}
.act-item:hover { background: var(--bg-4); color: var(--tx-0); }
.act-item.danger { color: var(--red); }
.act-item.danger:hover { background: var(--red-dim); }
.act-item.success { color: var(--green); }
.act-item.success:hover { background: var(--green-dim); }
.act-item svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 1.9; }
.act-sep { height: 1px; background: var(--line); margin: 3px 0; }

/* ============================================================
   THUMBNAIL ART (placeholder motion previews)
   ============================================================ */
.thumb { position: relative; overflow: hidden; background: var(--bg-3); }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.thumb .play span {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.42); backdrop-filter: blur(3px);
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22);
}
.thumb .play svg { width: 14px; height: 14px; color: #fff; margin-left: 2px; }
.thumb .dur {
  position: absolute; bottom: 5px; right: 5px; font-size: 10px; font-weight: 600; color: #fff;
  background: rgba(0,0,0,.6); padding: 1px 5px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
/* gradient presets (abstract motion frames) */
.g1 { background: linear-gradient(135deg,#7b5cff,#3a1f8f 60%,#1a0f47); }
.g2 { background: linear-gradient(135deg,#ff7a59,#c9305f 55%,#3a0f47); }
.g3 { background: linear-gradient(135deg,#1fd1a3,#0a8f6f 55%,#063b3a); }
.g4 { background: linear-gradient(135deg,#56a0f2,#2a4fb0 60%,#11204a); }
.g5 { background: linear-gradient(135deg,#f2c94c,#e07b39 55%,#7a2f12); }
.g6 { background: linear-gradient(135deg,#ec5fb0,#8b2fd6 55%,#2a0f5a); }
.g7 { background: linear-gradient(135deg,#34d399,#2c8fb0 55%,#1a2f6b); }
.g8 { background: linear-gradient(135deg,#cdd2dc,#7c8595 55%,#3a4150); }
.g9 { background: linear-gradient(160deg,#ff5e7e,#ffb15c); }
.g10{ background: linear-gradient(135deg,#9b8cff,#4a3fb0 55%,#160f3a); }
.grain::after {
  content: ''; position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay;
  background-image: radial-gradient(circle at 30% 20%, rgba(255,255,255,.5), transparent 40%),
                    radial-gradient(circle at 80% 80%, rgba(0,0,0,.5), transparent 50%);
}

/* ============================================================
   EMPTY / SKELETON / TOAST / MODAL / DRAWER
   ============================================================ */
.empty { text-align: center; padding: 56px 24px; }
.empty .ico { width: 56px; height: 56px; border-radius: 15px; background: var(--bg-3); display: grid; place-items: center; margin: 0 auto 16px; color: var(--tx-2); border: 1px solid var(--line); }
.empty .ico svg { width: 26px; height: 26px; stroke-width: 1.6; }
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--tx-2); font-size: 12.5px; max-width: 340px; margin: 0 auto 18px; }

.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 6px; }
@keyframes sk { to { background-position: -200% 0; } }

.info-banner {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--violet-dim); border: 1px solid var(--violet-line); color: var(--tx-1); font-size: 12.5px;
}
.info-banner svg { width: 17px; height: 17px; color: var(--violet-bright); flex: 0 0 auto; }
.info-banner.warn { background: var(--yellow-dim); border-color: var(--yellow-line); }
.info-banner.warn svg { color: var(--yellow); }
.info-banner.danger { background: var(--red-dim); border-color: var(--red-line); }
.info-banner.danger svg { color: var(--red); }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  display: flex; align-items: flex-start; gap: 11px; background: var(--bg-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--sh-3); min-width: 300px; max-width: 380px;
  animation: toastin .3s var(--ease);
}
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }
.toast .t-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.toast .t-ico svg { width: 16px; height: 16px; }
.toast .t-body { flex: 1; }
.toast .t-title { font-size: 13px; font-weight: 600; }
.toast .t-msg { font-size: 12px; color: var(--tx-2); margin-top: 2px; }

/* modal */
.overlay {
  position: fixed; inset: 0; background: rgba(6,8,12,.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 150; padding: 24px; animation: fade .18s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 460px; background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); animation: pop .2s var(--ease); overflow: hidden;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-head { display: flex; align-items: flex-start; gap: 13px; padding: 20px 20px 0; }
.modal-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.modal-ico svg { width: 20px; height: 20px; }
.modal-head h3 { font-family: 'Inter Tight', sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.modal-head p { font-size: 12.5px; color: var(--tx-2); margin-top: 3px; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-1); }
.modal-foot.spread { justify-content: space-between; }

/* drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(6,8,12,.55); backdrop-filter: blur(2px); z-index: 120; animation: fade .18s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: var(--bg-1);
  border-left: 1px solid var(--line-strong); box-shadow: var(--sh-3); z-index: 121;
  display: flex; flex-direction: column; animation: slidein .26s var(--ease);
}
@keyframes slidein { from { transform: translateX(40px); opacity: .6; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; }

/* ============================================================
   TIMELINE / ACTIVITY
   ============================================================ */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -22px; top: 2px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--bg-1); display: grid; place-items: center; }
.tl-dot svg { width: 9px; height: 9px; stroke-width: 3; color: #fff; }
.tl-title { font-size: 12.5px; font-weight: 600; color: var(--tx-0); }
.tl-meta { font-size: 11px; color: var(--tx-3); margin-top: 1px; }
.tl-note { font-size: 12px; color: var(--tx-1); margin-top: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; }

/* chat */
.msg { display: flex; gap: 9px; margin-bottom: 14px; }
.msg .avatar { width: 28px; height: 28px; font-size: 11px; }
.msg-body { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px 11px 11px 11px; padding: 9px 12px; max-width: 78%; }
.msg.me { flex-direction: row-reverse; }
.msg.me .msg-body { background: var(--violet-dim); border-color: var(--violet-line); border-radius: 11px 4px 11px 11px; }
.msg-name { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.msg-time { font-size: 10px; color: var(--tx-3); margin-top: 4px; }
.msg-text { font-size: 12.5px; color: var(--tx-1); line-height: 1.5; }

/* ============================================================
   CHARTS (pure CSS/SVG)
   ============================================================ */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bars .bar { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--violet-bright), var(--violet)); position: relative; transition: opacity .14s; min-height: 4px; }
.bars .bar:hover { opacity: .8; }
.bars .bar.alt { background: linear-gradient(180deg, #3a4150, #2b313d); }

.donut-legend { display: flex; flex-direction: column; gap: 9px; }
.leg-item { display: flex; align-items: center; gap: 9px; font-size: 12px; line-height: 1.2; }
.leg-item .nm { white-space: nowrap; }
.leg-item .sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.leg-item .nm { color: var(--tx-1); }
.leg-item .vl { margin-left: auto; color: var(--tx-2); font-variant-numeric: tabular-nums; font-weight: 600; }

.leader-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.leader-row:last-child { border-bottom: none; }
.leader-rank { font-family: 'Inter Tight', sans-serif; font-weight: 700; font-size: 13px; color: var(--tx-3); width: 20px; text-align: center; }
.leader-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--bg-4); overflow: hidden; }
.leader-bar > span { display: block; height: 100%; background: linear-gradient(90deg,var(--violet),var(--violet-bright)); border-radius: 999px; }

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.text-c { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.dot-sep { color: var(--tx-3); }

/* upload stepper */
.step-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; background: var(--bg-3); color: var(--tx-2); border: 1px solid var(--line); font-family: 'Inter Tight', sans-serif; }
.step-dot svg { width: 14px; height: 14px; stroke-width: 3; }
.step-dot.active { background: var(--violet); color: #fff; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-dim); }
.step-dot.done { background: var(--green-dim); color: var(--green); border-color: var(--green-line); }
.step-label { font-size: 12.5px; font-weight: 600; color: var(--tx-3); white-space: nowrap; }
.step-label.active { color: var(--tx-0); }
.step-label.done { color: var(--tx-1); }
.step-line { flex: 1; height: 1.5px; background: var(--line); }
.step-line.done { background: var(--green-line); }

/* mod queue item */
.mod-item { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .12s; }
.mod-item:hover { background: var(--bg-3); }
.mod-item.sel { background: var(--violet-dim); box-shadow: inset 3px 0 0 var(--violet-bright); }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 18px; }

/* role switch (top-right) */
.role-switch { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.role-switch a { height: 28px; padding: 0 12px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; color: var(--tx-2); display: inline-flex; align-items: center; gap: 6px; transition: all .14s; }
.role-switch a svg { width: 14px; height: 14px; }
.role-switch a:hover { color: var(--tx-0); }
.role-switch a.active { background: var(--bg-4); color: var(--tx-0); box-shadow: var(--sh-1); }

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --bg-0: #f4f5f8;
  --bg-1: #eceef3;
  --bg-2: #ffffff;
  --bg-3: #f8f9fc;
  --bg-4: #e8ebf2;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --line: #dde1ea;
  --line-soft: rgba(0, 0, 0, 0.05);
  --line-strong: #c8ceda;

  --tx-0: #12151c;
  --tx-1: #3d4556;
  --tx-2: #6b7385;
  --tx-3: #9aa3b5;

  --violet-dim: rgba(107, 92, 224, 0.12);
  --violet-line: rgba(107, 92, 224, 0.28);
  --green-dim: rgba(16, 163, 110, 0.12);
  --green-line: rgba(16, 163, 110, 0.28);
  --yellow-dim: rgba(202, 138, 4, 0.12);
  --orange-dim: rgba(234, 88, 12, 0.12);
  --red-dim: rgba(220, 38, 56, 0.1);
  --blue-dim: rgba(37, 99, 235, 0.1);
  --gray-dim: rgba(100, 116, 139, 0.1);

  --sh-1: 0 1px 2px rgba(15, 23, 42, 0.06);
  --sh-2: 0 8px 24px rgba(15, 23, 42, 0.08);
  --sh-3: 0 18px 50px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c5cbd6;
  border-color: transparent;
}

[data-theme="light"] .thumb.grain::after {
  opacity: 0.08;
}

.theme-ico { width: 18px; height: 18px; }

/* ============================================================
   AUTH / LOGIN
   ============================================================ */
.auth-page { min-height: 100vh; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 480px);
}

.auth-side {
  padding: 40px 36px;
  background: linear-gradient(165deg, var(--bg-1) 0%, var(--bg-0) 55%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-side-title { max-width: 360px; line-height: 1.25; }
.auth-side-desc { max-width: 400px; }
.auth-side-foot { margin-top: auto; color: var(--tx-3); }

.auth-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--tx-1);
  font-size: 13px;
}

.auth-features li {
  padding-left: 18px;
  position: relative;
}

.auth-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 32px;
  position: relative;
}

.auth-main-top {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 24px 24px;
  box-shadow: var(--sh-2);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  height: 34px;
  border-radius: var(--r-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-2);
}

.auth-tab.active {
  background: var(--bg-2);
  color: var(--tx-0);
  box-shadow: var(--sh-1);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--tx-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-quick {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
  height: auto;
}

.auth-quick-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.auth-error {
  color: var(--red);
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--red-dim);
  border: 1px solid var(--red-line);
}

.auth-foot {
  margin-top: 20px;
  text-align: center;
}

.auth-foot a {
  color: var(--violet-bright);
  font-weight: 500;
}

.auth-foot a:hover {
  text-decoration: underline;
}

/* ============================================================
   BLOCKED CONTRIBUTOR
   ============================================================ */
.blocked-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--red-line);
  background: var(--red-dim);
}

.blocked-banner-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: rgba(239, 93, 107, 0.2);
  color: var(--red);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.blocked-banner-ico svg {
  width: 20px;
  height: 20px;
}

body.user-blocked .content > .col > .card:first-of-type,
body.user-blocked #upRoot,
body.user-blocked .btn-primary[onclick*="upload"] {
  opacity: 0.45;
  pointer-events: none;
}

.nav-item.disabled {
  opacity: 0.38;
  pointer-events: none;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-3) 0%,
    var(--bg-4) 50%,
    var(--bg-3) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: var(--r-sm);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.skeleton-kpi {
  height: 88px;
  border-radius: var(--r-md);
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.w60 {
  width: 60%;
}

.skeleton-line.w40 {
  width: 40%;
}

/* ============================================================
   MOBILE NAV + RESPONSIVE
   ============================================================ */
.nav-toggle {
  display: none;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}

body.nav-open .sidebar-scrim {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-title-compact {
  display: none;
}

/* Contributor overview — 2 ustunli asosiy grid */
.ov-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) and (min-width: 769px) {
  :root {
    --sidebar-w: 70px;
  }
  .brand-name,
  .brand-sub,
  .nav-item span:not(.nav-badge),
  .nav-group-label,
  .user-chip .col,
  .topbar .search {
    display: none;
  }
  .nav-item {
    justify-content: center;
  }
  .brand {
    justify-content: center;
    padding: 18px 0;
  }
  .kpi-grid[style*="repeat(6"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 260px;
    --topbar-h: 56px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .sidebar-scrim {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.22s var(--ease);
    box-shadow: var(--sh-3);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .brand-name,
  .brand-sub,
  .nav-item span:not(.nav-badge),
  .nav-group-label,
  .user-chip .col {
    display: unset;
  }

  .nav-item {
    justify-content: flex-start;
  }

  .topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .topbar .search {
    display: none;
  }

  .topbar-title .crumb {
    display: none;
  }

  .topbar-title h1 {
    font-size: 15px;
  }

  .content {
    padding: 14px 12px 24px;
  }

  .kpi-grid,
  .kpi-grid[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .ov-grid {
    grid-template-columns: 1fr;
  }

  .plan-mini-row {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar.between {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar .chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  #modRoot [style*="grid-template-columns:380px"] {
    display: flex !important;
    flex-direction: column !important;
  }

  #modRoot [style*="grid-template-columns:380px"] > .card {
    max-height: 280px;
  }

  .drawer {
    width: 100% !important;
    max-width: 100%;
  }

  .modal {
    width: calc(100% - 24px) !important;
    max-width: 100%;
    margin: 12px;
  }

  .msg-layout,
  #msgRoot > div[style*="grid-template-columns"],
  #cmsgRoot > div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

  .auth-card {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .kpi-grid,
  .kpi-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .grid[style*="grid-template-columns:1fr 1fr"],
  .grid[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .row3 {
    grid-template-columns: 1fr !important;
  }

  .topbar .btn-primary span:not(svg) {
    display: none;
  }

  .topbar .btn-primary {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  .blocked-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .sub-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .plan-editor-grid,
  .plan-mini-row {
    grid-template-columns: 1fr !important;
  }
}
