/* MyDeewanji — Modern UI (2026)
   Adv. Aksshay Duragkar · Property Document Portal */

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

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  --surface-glass: rgba(255, 255, 255, 0.72);

  --tx: #0f172a;
  --tx-secondary: #475569;
  --tx-muted: #94a3b8;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.25);

  --accent-teal: #0d9488;
  --accent-teal-soft: #ccfbf1;

  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;

  --purple: #7c3aed;
  --purple-soft: #ede9fe;

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-w: 260px;

  --ff: 'Plus Jakarta Sans', system-ui, sans-serif;
  --fm: 'JetBrains Mono', ui-monospace, monospace;

  /* legacy aliases for JS inline vars */
  --bl: var(--primary);
  --bll: var(--primary-soft);
  --bld: var(--primary-hover);
  --blm: #6366f1;
  --gn: var(--success);
  --gnl: var(--success-soft);
  --gnm: #10b981;
  --am: var(--warning);
  --aml: var(--warning-soft);
  --rd: var(--danger);
  --rdl: var(--danger-soft);
  --tl: var(--accent-teal);
  --tll: var(--accent-teal-soft);
  --pu: var(--purple);
  --pul: var(--purple-soft);
  --tx2: var(--tx-secondary);
  --tx3: var(--tx-muted);
  --bg2: var(--bg-elevated);
  --bg3: var(--bg-subtle);
  --bg4: var(--bg-muted);
  --br: var(--border);
  --br2: var(--border-strong);
  --shadow: var(--shadow-sm);
  --shadow2: var(--shadow-md);
  --r: var(--radius);
  --rl: var(--radius-lg);
  --sw: var(--sidebar-w);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--tx);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; }
h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 0.9375rem; font-weight: 600; }

.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.page-sub { font-size: 0.875rem; color: var(--tx-secondary); margin-top: 0.35rem; max-width: 42rem; }

/* ── Forms ─────────────────────────────────────────────────── */
input, select, textarea {
  font-family: var(--ff);
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--tx);
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: var(--tx-muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); cursor: pointer; }

label.lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tx-secondary);
  margin-bottom: 0.35rem;
  display: block;
  letter-spacing: 0.01em;
}

/* ── Buttons ───────────────────────────────────────────────── */
button {
  font-family: var(--ff);
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn {
  background: var(--bg-elevated);
  color: var(--tx);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--tx-muted); }

.bp {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff;
  padding: 0.65rem 1.25rem;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.bp:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.bd { background: var(--danger); color: #fff; padding: 0.5rem 1rem; }
.bd:hover:not(:disabled) { background: #b91c1c; }
.bg { background: var(--success); color: #fff; padding: 0.5rem 1rem; }
.bg:hover:not(:disabled) { background: #047857; }
.bs { padding: 0.4rem 0.75rem; font-size: 0.8125rem; font-weight: 500; }
.btn-icon { padding: 0.45rem; border-radius: var(--radius); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.card-flat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.card-interactive {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, 0.2);
}

/* ── Credit-card style holdings cards ───────────────────────── */
.cc-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  perspective: 1200px;
}
.cc-dash-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.cc-cards-row--dashboard {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
  gap: 1.75rem;
  max-width: 1400px;
}
.cc-cards-row--dashboard > .cc-card {
  width: 100%;
  min-height: 228px;
  height: 100%;
  aspect-ratio: 1.586 / 1;
  max-height: none;
  border-radius: 22px;
}
.cc-cards-row--dashboard .grp-card--credit .grp-card__body {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: 1.5rem 1.65rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}
.cc-cards-row--dashboard .grp-card--credit .cc-chip {
  width: 52px;
  height: 36px;
  margin: 0.5rem 0 0.35rem;
  flex-shrink: 0;
}
.cc-cards-row--dashboard .grp-card--primary {
  box-shadow:
    0 8px 16px rgba(76, 29, 149, 0.35),
    0 28px 56px rgba(30, 27, 75, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.cc-cards-row--dashboard .grp-card--credit .cc-card__footer {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}
.grp-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.5rem;
}
.grp-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.grp-card__title--main {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cc-card--group .grp-card__title--main,
.grp-card--primary .grp-card__title--main {
  font-size: 2rem;
  letter-spacing: 0.14em;
}
.grp-card__title--editable {
  cursor: text;
  outline: none;
  border-radius: 6px;
  padding: 4px 8px;
  margin: -4px -8px;
  position: relative;
  z-index: 6;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}
.grp-card__title--main.grp-card__title--editable {
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 800;
  line-height: 1.15;
}
.grp-card__title--editable:not(.grp-card__title--main) {
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 1.25rem;
  font-weight: 700;
}
.grp-card__head-end {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex-shrink: 0;
}
.grp-card__head-end .cc-card__nfc {
  margin-top: 2px;
}
.grp-card__title--editable:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.grp-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  align-items: end;
  flex: 1;
  min-height: 0;
  padding: 0.15rem 0;
}
.grp-card__metric {
  text-align: center;
  min-width: 0;
}
.cc-cards-row--dashboard .grp-card--credit .grp-card__metric-num {
  font-size: 3rem;
}
.grp-card--credit .grp-card__metric-num {
  font-size: 2.15rem;
}
.grp-card__metric-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.cc-cards-row--dashboard .grp-card__metric-lbl {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}
.grp-card__metric-lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 0.4rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.grp-card--create .grp-card__create-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
}
.grp-card__create-plus {
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.95;
}
.grp-card__create-hint {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.95;
}
.grp-card__create-types {
  margin: 0.35rem 0 0;
  font-size: 0.625rem;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.35;
}
.grp-card__add-icon {
  font-size: 1.25rem;
  opacity: 0.9;
  flex-shrink: 0;
}
.cc-card__row--head {
  align-items: flex-start;
  width: 100%;
}
.cc-card__row-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}
.cc-card {
  position: relative;
  aspect-ratio: 1.75 / 1;
  min-height: 200px;
  max-width: 100%;
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.12),
    0 20px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cc-card:hover {
  transform: translateY(-8px) rotateX(4deg) scale(1.02);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 32px 64px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.cc-card:active { transform: translateY(-2px) scale(0.99); }

.cc-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cc-card--group .cc-card__bg {
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 35%, #7c3aed 70%, #a78bfa 100%);
}
.cc-card--individual .cc-card__bg {
  background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 40%, #0ea5e9 75%, #38bdf8 100%);
}
.cc-card--create .cc-card__bg {
  background: linear-gradient(135deg, #14532d 0%, #15803d 40%, #22c55e 75%, #86efac 100%);
}
.cc-card--create:hover {
  transform: translateY(-8px) rotateX(4deg) scale(1.02);
}
.cc-chip--add {
  background: linear-gradient(145deg, #ecfdf5 0%, #6ee7b7 50%, #34d399 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-chip--add::before { display: none; }
.cc-chip--add::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: #065f46;
  line-height: 1;
  left: 0;
  top: 0;
}

.cc-card__pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 80%, #fff 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, #fff 1.5px, transparent 1.5px);
  background-size: 28px 28px, 36px 36px;
}

.cc-card__holo {
  position: absolute;
  inset: -50%;
  z-index: 2;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.22) 48%,
    rgba(255, 255, 255, 0.08) 54%,
    transparent 62%
  );
  transform: translateX(-30%) rotate(25deg);
  pointer-events: none;
  transition: transform 0.6s ease;
}
.cc-card:hover .cc-card__holo { transform: translateX(30%) rotate(25deg); }

.cc-card__body {
  position: relative;
  z-index: 3;
  height: 100%;
  padding: 1.35rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cc-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cc-card__type {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}
.cc-card__type--groups {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  opacity: 1;
}
.cc-card__nfc {
  font-size: 1.35rem;
  opacity: 0.85;
  transform: rotate(90deg);
}

.cc-chip {
  width: 44px;
  height: 32px;
  margin: 0.75rem 0 0.5rem;
  border-radius: 6px;
  background: linear-gradient(145deg, #f5e6a8 0%, #d4a84b 35%, #c9a227 55%, #f0d78c 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}
.cc-chip::before {
  content: '';
  position: absolute;
  inset: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}
.cc-chip::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  width: 60%;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1), 0 8px 0 rgba(0, 0, 0, 0.08);
}

.cc-card__number {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  font-variant-numeric: tabular-nums;
}
.cc-card--group .cc-card__number { color: #faf5ff; }
.cc-card--individual .cc-card__number { color: #f0f9ff; }

.cc-card__label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
}
.cc-card__detail {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

/* Dashboard hero cards — Groups / Create property holder */
.cc-card__hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}
.cc-card__hero-stat--holdings {
  margin-top: 0.15rem;
}
.cc-card__stat-hint {
  font-size: 0.625rem;
  font-weight: 600;
  opacity: 0.78;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}
.cc-card__stat-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}
.cc-card__number--holdings {
  font-size: 2.75rem;
  line-height: 1;
}
.cc-card__stat-name--holdings {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: capitalize;
}
.cc-card__create-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
}
.cc-card__plus-icon {
  font-size: 3.25rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.cc-card__create-headline {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 12rem;
}
.cc-card__create-sub {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.88;
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}
.cc-card__title--editable {
  cursor: text;
  outline: none;
  border-radius: 4px;
  padding: 2px 4px;
  margin: 0 -4px;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
.cc-card__title--editable:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.cc-card__edit-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cc-card__edit-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.cc-card__delete-btn {
  background: rgba(220, 38, 38, 0.45);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cc-card__delete-btn:hover {
  background: rgba(220, 38, 38, 0.7);
}

.cc-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
}
.cc-card__foot-lbl {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
}
.cc-card__foot-val {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-card__logo {
  text-align: right;
  opacity: 0.95;
}
.cc-card__logo i {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 2px;
}
.cc-card__logo span {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .cc-cards-row { grid-template-columns: 1fr; }
  .cc-cards-row--dashboard { grid-template-columns: 1fr; }
  .cc-cards-row--dashboard {
    grid-template-columns: 1fr;
  }
  .cc-cards-row--dashboard > .cc-card {
    aspect-ratio: 1.586 / 1;
    min-height: 200px;
  }
  .cc-cards-row--dashboard .grp-card--credit .grp-card__metric-num {
    font-size: 2.35rem;
  }
  .grp-card__title--main.grp-card__title--editable {
    font-size: 1.5rem;
  }
}

/* Medium credit cards — groups, members, properties grid */
.cc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  perspective: 1000px;
}

.cc-card--md {
  aspect-ratio: 1.72 / 1;
  min-height: 0;
  border-radius: 16px;
  max-width: 340px;
  justify-self: stretch;
}
.cc-card--md:hover {
  transform: translateY(-6px) rotateX(3deg) scale(1.015);
}
.cc-card--md .cc-card__body {
  padding: 1rem 1.15rem 0.85rem;
}
.cc-card--md .cc-chip {
  width: 34px;
  height: 24px;
  margin: 0.35rem 0 0.4rem;
}
.cc-card--md .cc-card__nfc { font-size: 1.1rem; }
.cc-card--md .cc-card__type { font-size: 0.5625rem; }
.cc-card--md .cc-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-card--md .cc-card__number {
  font-size: 1.65rem;
  margin-top: 0.15rem;
}
.cc-card--md .cc-card__label { font-size: 0.6875rem; margin-top: 0.2rem; }
.cc-card--md .cc-card__foot-val { font-size: 0.6875rem; max-width: 140px; }
.cc-card--md .cc-card__logo i { font-size: 1.15rem; }

.cc-card--surname .cc-card__bg,
.cc-card--group.cc-card--md .cc-card__bg {
  background: linear-gradient(135deg, #312e81 0%, #5b21b6 45%, #7c3aed 100%);
}
.cc-card--member .cc-card__bg {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #818cf8 100%);
}
.cc-card--property .cc-card__bg {
  background: linear-gradient(135deg, #064e3b 0%, #047857 45%, #10b981 100%);
}
.cc-card--hue-1 .cc-card__bg { background: linear-gradient(135deg, #4a044e 0%, #86198f 50%, #c026d3 100%); }
.cc-card--hue-2 .cc-card__bg { background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 50%, #60a5fa 100%); }
.cc-card--hue-3 .cc-card__bg { background: linear-gradient(135deg, #713f12 0%, #b45309 50%, #fbbf24 100%); }
.cc-card--hue-4 .cc-card__bg { background: linear-gradient(135deg, #134e4a 0%, #0f766e 50%, #2dd4bf 100%); }
.cc-card--hue-5 .cc-card__bg { background: linear-gradient(135deg, #581c87 0%, #9333ea 50%, #e879f9 100%); }

@media (max-width: 640px) {
  .cc-cards-grid { grid-template-columns: 1fr; }
  .cc-card--md { max-width: none; }
}

/* Holding groups — tabs + create modal */
.hg-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.hg-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--tx-secondary);
  transition: all 0.2s;
}
.hg-tab:hover { border-color: var(--primary); color: var(--primary); }
.hg-tab--on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hg-modal {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.hg-prop-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}
.hg-prop-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.4rem 0.35rem;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: 6px;
}
.hg-prop-row:hover { background: var(--bg-subtle); }

/* ── Tags ──────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-bl { background: var(--primary-soft); color: var(--primary-hover); }
.tag-gn { background: var(--success-soft); color: var(--success); }
.tag-am { background: var(--warning-soft); color: var(--warning); }
.tag-rd { background: var(--danger-soft); color: var(--danger); }
.tag-tl { background: var(--accent-teal-soft); color: var(--accent-teal); }
.tag-pu { background: var(--purple-soft); color: var(--purple); }
.tag-gray { background: var(--bg-subtle); color: var(--tx-secondary); }

/* ── Layout grid ───────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.875rem; }
.fg { margin-bottom: 1rem; }
.div { height: 1px; background: var(--border); margin: 1.25rem 0; }
.flex { display: flex; align-items: center; }
.gap6 { gap: 0.375rem; }
.gap8 { gap: 0.5rem; }
.gap10 { gap: 0.625rem; }
.gap14 { gap: 0.875rem; }

/* ── Sidebar ───────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; width: 100%; }

/* Login: #app flex was pinning content to the left */
#app:has(> .login-page) {
  justify-content: center;
  align-items: stretch;
}
#app:has(> .login-page) > .login-page {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
}

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.main {
  margin-left: var(--sidebar-w);
  padding: 1.75rem 2rem 2.5rem;
  min-height: 100vh;
  flex: 1;
  background:
    radial-gradient(ellipse 80% 50% at 100% -20%, rgba(79, 70, 229, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(13, 148, 136, 0.04), transparent),
    var(--bg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.logo .lico {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.app-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}
.logo-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.logo-tag {
  font-size: 0.5625rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
  line-height: 1.3;
}
.logo > div > div:first-child {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.logo > div > div:last-child {
  font-size: 0.625rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.secttitle {
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 1rem 1rem 0.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  border-radius: var(--radius);
  margin: 2px 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.nav:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.nav.on {
  background: rgba(79, 70, 229, 0.2);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.3);
}
.nav i { font-size: 1.125rem; opacity: 0.9; }

.badge {
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  text-align: center;
}

.sidebar .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  margin: 0 0.5rem 0.75rem;
  padding: 0.85rem;
  box-shadow: none;
}
.sidebar .card .text-faint { color: #94a3b8 !important; }
.sidebar .btn.bs {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.uzone-user {
  padding: 0.75rem;
  margin: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.avatar-txt {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
}
.sidebar .uzone-user .text-sm { color: #f1f5f9; }
.sidebar .uzone-user .text-xs { color: #94a3b8; }

/* ── Tables ────────────────────────────────────────────────── */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--tx-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
thead th:first-child { border-radius: var(--radius) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius) 0 0; }
td {
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr { transition: background 0.12s; }
tbody tr:hover td { background: var(--bg-subtle); }
tbody tr:last-child td { border-bottom: none; }

/* ── Stats ─────────────────────────────────────────────────── */
.sc, .stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-xs);
}
.sn { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin-top: 0.25rem; }
.sl {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--tx-muted);
  letter-spacing: 0.04em;
}

/* ── Notifications ─────────────────────────────────────────── */
.notif {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.nw { background: var(--warning-soft); color: #92400e; border: 1px solid #fcd34d; }
.ni { background: var(--primary-soft); color: var(--primary-hover); border: 1px solid #c7d2fe; }
.nr { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.ng { background: var(--success-soft); color: var(--success); border: 1px solid #a7f3d0; }

/* ── Modals ────────────────────────────────────────────────── */
.mwrap {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1.25rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── Progress ──────────────────────────────────────────────── */
.pb { height: 6px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.pf { height: 100%; border-radius: 999px; transition: width 0.4s ease; background: linear-gradient(90deg, var(--success), #34d399); }

/* ── Page chrome ───────────────────────────────────────────── */
.phdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.bc {
  font-size: 0.75rem;
  color: var(--tx-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.bc a { color: var(--primary); text-decoration: none; font-weight: 600; }
.bc a:hover { text-decoration: underline; }
.bc b { color: var(--tx-secondary); font-weight: 600; }

/* ── Login page (centered portal) ─────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(30, 58, 138, 0.12), transparent),
    linear-gradient(165deg, #f0f4ff 0%, #e8eef9 40%, #f8fafc 100%);
  z-index: 0;
}
.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(30, 58, 138, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.login-hero {
  margin-bottom: 1.75rem;
  width: 100%;
}
.login-hero__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 12px 40px rgba(30, 58, 138, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 1rem;
}
.login-logo-img {
  max-width: min(280px, 88vw);
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.login-hero__tagline {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1e40af;
  margin: 0;
}
.login-hero__desc {
  font-size: 0.875rem;
  color: var(--tx-secondary);
  margin: 0.5rem 0 0;
  line-height: 1.5;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.login-form-card {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 24px 48px rgba(30, 58, 138, 0.1);
  text-align: left;
}
.login-form-head {
  margin-bottom: 1.35rem;
  text-align: center;
}
.login-form-head h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--tx);
}
.login-form-head .sub {
  color: var(--tx-secondary);
  font-size: 0.875rem;
  margin: 0.35rem 0 0;
}
.login-api-warn {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.login-api-warn i { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }
.login-api-warn strong { display: block; margin-bottom: 0.25rem; }
.login-api-warn p { margin: 0; }
.login-api-warn a { color: #1d4ed8; font-weight: 600; }
.login-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}
.login-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.login-field {
  position: relative;
}
.login-field__ico {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tx-muted);
  font-size: 1.1rem;
  pointer-events: none;
}
.login-field input {
  width: 100%;
  padding: 0.7rem 0.85rem 0.7rem 2.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 0.9375rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.login-input-wrap input { padding-right: 2.75rem; }
.login-eye {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--tx-muted);
  padding: 0.35rem;
  cursor: pointer;
  z-index: 2;
}
.login-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}
.login-submit {
  display: inline-block;
  width: auto;
  min-width: 11rem;
  padding: 0.8rem 2.5rem;
  margin: 0;
  border: none;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--ff);
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #312e81 100%);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(30, 58, 138, 0.4);
}
.login-submit:disabled { opacity: 0.65; cursor: wait; }
.login-foot {
  margin-top: 1.75rem;
  font-size: 0.75rem;
  color: var(--tx-muted);
  line-height: 1.6;
}
.login-foot__adv {
  font-weight: 600;
  color: var(--tx-secondary);
  margin-bottom: 2px;
}
.login-copy {
  margin-top: 0.65rem;
  font-size: 0.6875rem;
  color: var(--tx-muted);
}

/* ── Misc components ───────────────────────────────────────── */
.uzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  color: var(--tx-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s;
}
.uzone:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.tabrow { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.tab {
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tx-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab:hover:not(.on) { color: var(--tx); }

.doc-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.4rem;
  background: var(--bg-elevated);
  transition: background 0.12s;
}
.doc-item:hover { background: var(--bg-subtle); }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--tx-muted);
}
.empty-state i { font-size: 2.5rem; opacity: 0.35; display: block; margin-bottom: 0.75rem; }

/* ── Reminders ─────────────────────────────────────────────── */
.rem-section h3 { display: flex; align-items: center; gap: 0.5rem; }
.rem-count {
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.rem-list-inner { display: flex; flex-direction: column; gap: 0.5rem; }
.rem-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.rem-cls-nr .rem-row { border-left: 3px solid var(--danger); background: var(--rdl); }
.rem-cls-nw .rem-row { border-left: 3px solid var(--warning); background: var(--aml); }
.rem-cls-ni .rem-row { border-left: 3px solid var(--primary); background: var(--bll); }
.rem-row__ico { font-size: 1.35rem; color: var(--primary); flex-shrink: 0; }
.rem-cls-nr .rem-row__ico { color: var(--danger); }
.rem-row__body { flex: 1; min-width: 0; }
.rem-row__title { font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rem-row__sub { font-size: 0.8rem; color: var(--tx-secondary); margin-top: 2px; }
.rem-row__action { flex-shrink: 0; }
.rem-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.rem-badge--prop  { background: #dbeafe; color: #1e40af; }
.rem-badge--asset { background: #f3e8ff; color: #6d28d9; }

/* ── cc-card title (Other Assets cards) ────────────────────── */
.cc-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.1rem;
}

/* Property type bars */
.pt-agri { border-left: 4px solid #22c55e; }
.pt-agri-na { border-left: 4px solid #84cc16; }
.pt-vacant { border-left: 4px solid #f59e0b; }
.pt-plot-const { border-left: 4px solid #fb923c; }
.pt-industrial { border-left: 4px solid #3b82f6; }
.pt-flat { border-left: 4px solid #ef4444; }
.pt-apartment { border-left: 4px solid #dc2626; }
.pt-shop { border-left: 4px solid #8b5cf6; }
.pt-na-land { border-left: 4px solid #14b8a6; }

.doc-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0.75rem 0 0.4rem;
}
.dsh-agri { background: var(--success-soft); color: var(--success); }
.dsh-loan { background: var(--danger-soft); color: var(--danger); }
.dsh-general { background: var(--primary-soft); color: var(--primary-hover); }
.dsh-flat { background: #fee2e2; color: #b91c1c; }
.dsh-apt { background: #fee2e2; color: #dc2626; }
.dsh-shop { background: var(--purple-soft); color: var(--purple); }
.dsh-plot { background: var(--warning-soft); color: var(--warning); }
.dsh-const { background: var(--primary-soft); color: var(--primary); }

.mapbox {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

pre {
  font-family: var(--fm);
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

.plan-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s;
}
.plan-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.plan-card.popular { border: 2px solid var(--primary); }
.plan-card.current { border: 2px solid var(--success); }

/* Toast (api.js inline — enhance via class if needed) */

/* Utilities */
.mono { font-family: var(--fm); }
.text-red, .text-rd { color: var(--danger); }
.text-gn { color: var(--success); }
.text-bl { color: var(--primary); }
.text-am { color: var(--warning); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.6875rem; }
.text-muted { color: var(--tx-secondary); }
.text-faint { color: var(--tx-muted); }
.fw6 { font-weight: 600; }
.fw7 { font-weight: 700; }
.mt4 { margin-top: 0.25rem; }
.mt6 { margin-top: 0.375rem; }
.mt8 { margin-top: 0.5rem; }
.mt10 { margin-top: 0.625rem; }
.mt12 { margin-top: 0.75rem; }
.mt16 { margin-top: 1rem; }
.mb6 { margin-bottom: 0.375rem; }
.mb10 { margin-bottom: 0.625rem; }
.mb14 { margin-bottom: 0.875rem; }
.mb18 { margin-bottom: 1.125rem; }
.p10 { padding: 0.625rem; }
.p14 { padding: 0.875rem; }
.w100 { width: 100%; }
.text-center { text-align: center; }
.flex-wrap { flex-wrap: wrap; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-muted); border-radius: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; }

@media (max-width: 960px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; padding: 1rem; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}
