/* ============================================================
   QAZBOOM Cabinet — LIGHT theme (overrides landing.css dark base
   for body.cabinet). Soft cards, brand-purple accents.
   ============================================================ */

:root {
  --cab-bg:           #E7EBF2;
  --cab-surface:      #FFFFFF;
  --cab-surface-2:    #F2F4F8;
  --cab-border:       #D6DBE3;
  --cab-border-soft:  #E1E5EC;
  --cab-text:         #0F172A;
  --cab-text-dim:     #475569;
  --cab-text-muted:   #64748B;
  --cab-text-faint:   #8E96A3;
  --cab-brand:        #7B3FF2;
  --cab-brand-light:  #9D6FFF;
  --cab-brand-soft:   #EFE7FE;
  --cab-shadow-sm:    0 1px 2px rgba(15,23,42,0.05);
  --cab-shadow:       0 6px 18px rgba(15,23,42,0.08);
  --cab-shadow-lg:    0 14px 36px rgba(15,23,42,0.12);
}

/* ---------- Override landing.css dark body for cabinet ---------- */
body.cabinet,
.cabinet body {
  background: var(--cab-bg);
  color: var(--cab-text);
  overflow-x: hidden;
}

/* Form/button overrides for light surfaces inside cabinet */
.cabinet .form-input {
  background: #fff;
  border: 1px solid var(--cab-border);
  color: var(--cab-text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.92rem;
}
.cabinet .form-input::placeholder { color: var(--cab-text-faint); }
.cabinet .form-input:focus {
  border-color: var(--cab-brand);
  box-shadow: 0 0 0 3px rgba(123,63,242,0.12);
}
.cabinet .form-label {
  color: var(--cab-text-dim);
  font-weight: 600;
  font-size: 0.78rem;
}
.cabinet .btn-secondary {
  background: #fff;
  border: 1px solid var(--cab-border);
  color: var(--cab-text);
}
.cabinet .btn-secondary:hover {
  border-color: var(--cab-brand);
  color: var(--cab-brand);
  background: var(--cab-brand-soft);
}

/* ---------- Shell ---------- */
.cab-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .cab-shell { grid-template-columns: 1fr; }
}

/* ---------- Sidebar (desktop) ---------- */
.cab-sidebar {
  background: var(--cab-surface);
  border-right: 1px solid var(--cab-border);
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

@media (max-width: 900px) {
  .cab-sidebar { display: none; }
}

.cab-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--cab-border-soft);
  margin-bottom: 18px;
  text-decoration: none;
}
.cab-brand-logo { height: 30px; width: auto; }
.cab-brand-name { font-weight: 700; font-size: 0.98rem; color: var(--cab-text); letter-spacing: 0.01em; }
.cab-brand-tag  { font-size: 0.66rem; color: var(--cab-text-faint); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 2px; }

.cab-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cab-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--cab-text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.cab-nav-item:hover {
  background: var(--cab-surface-2);
  color: var(--cab-text);
}
.cab-nav-item.is-active {
  background: var(--cab-brand-soft);
  color: var(--cab-brand);
}
.cab-nav-item.is-active .cab-nav-icon { color: var(--cab-brand); }
.cab-nav-icon {
  display: inline-flex;
  width: 20px;
  align-items: center;
  justify-content: center;
  color: var(--cab-text-faint);
}

.cab-sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid var(--cab-border-soft);
  margin-top: 14px;
}
.cab-side-user-name {
  font-size: 0.88rem;
  color: var(--cab-text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cab-side-user-company {
  font-size: 0.72rem;
  color: var(--cab-text-faint);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cab-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--cab-border);
  color: var(--cab-text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cab-logout-btn:hover {
  border-color: #fecaca;
  color: #dc2626;
  background: #fef2f2;
}

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

.cab-topbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cab-border-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cab-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
}
@media (max-width: 700px) {
  .cab-topbar-inner { padding: 14px 18px; }
}
.cab-topbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cab-text);
  letter-spacing: -0.01em;
}
.cab-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cab-topbar-user {
  text-align: right;
}
.cab-user-name { font-size: 0.88rem; font-weight: 600; color: var(--cab-text); }
.cab-user-email { font-size: 0.72rem; color: var(--cab-text-faint); margin-top: 2px; }

@media (max-width: 700px) {
  .cab-topbar-user { display: none; }
}

/* ---------- Bell (notifications) ---------- */
.cab-bell-wrap { position: relative; }
.cab-bell-btn {
  position: relative;
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cab-text-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cab-bell-btn:hover { background: var(--cab-surface-2); color: var(--cab-text); }
.cab-bell-wrap.is-open .cab-bell-btn { background: var(--cab-brand-soft); color: var(--cab-brand); border-color: rgba(123,63,242,0.2); }

.cab-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #DC2626;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--cab-surface, #fff);
}

.cab-bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 540px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cab-border);
  border-radius: 14px;
  box-shadow: var(--cab-shadow-lg);
  z-index: 40;
  overflow: hidden;
}
.cab-bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cab-border-soft);
  background: var(--cab-surface-2);
}
.cab-bell-head-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cab-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cab-bell-head-action button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cab-brand);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: inherit;
}
.cab-bell-head-action button:hover { background: var(--cab-brand-soft); }

.cab-bell-empty {
  padding: 22px 18px;
  font-size: 0.85rem;
  color: var(--cab-text-muted);
  text-align: center;
}

.cab-bell-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow-y: auto;
}
.cab-bell-item {
  border-bottom: 1px solid var(--cab-border-soft);
}
.cab-bell-item:last-child { border-bottom: 0; }
.cab-bell-item-form { margin: 0; }
.cab-bell-item-btn, .cab-bell-item-static {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  font-family: inherit;
  color: var(--cab-text);
  cursor: pointer;
  position: relative;
}
.cab-bell-item-btn:hover { background: var(--cab-surface-2); }
.cab-bell-item-static { cursor: default; }
.cab-bell-item.is-unread .cab-bell-item-btn,
.cab-bell-item.is-unread .cab-bell-item-static {
  background: rgba(123,63,242,0.04);
}
.cab-bell-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 2px;
}
.cab-bell-icon-approved { background: #ECFDF5; color: #047857; }
.cab-bell-icon-rejected { background: #FEF2F2; color: #B91C1C; }
.cab-bell-icon-info     { background: var(--cab-brand-soft); color: var(--cab-brand); font-size: 0.95rem; }

.cab-bell-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cab-bell-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cab-text);
  line-height: 1.3;
}
.cab-bell-item-text {
  font-size: 0.8rem;
  color: var(--cab-text-dim);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cab-bell-item-time {
  font-size: 0.72rem;
  color: var(--cab-text-faint);
  margin-top: 2px;
}
.cab-bell-item-dot {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cab-brand);
}

.cab-content {
  padding: 28px 32px 32px;
  flex: 1;
}
@media (max-width: 700px) {
  .cab-content { padding: 18px 16px 96px; } /* bottom-nav clearance */
}

/* ---------- Mobile bottom nav ---------- */
.cab-bottom-nav {
  display: none;
}
@media (max-width: 900px) {
  .cab-bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--cab-border);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
}
.cab-bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 10px;
  color: var(--cab-text-muted);
  font-size: 0.66rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.cab-bn-item svg { width: 20px; height: 20px; }
.cab-bn-item.is-active {
  color: var(--cab-brand);
  background: var(--cab-brand-soft);
}
.cab-bn-logout {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Dashboard / panels ---------- */
.cab-panel {
  background: var(--cab-surface);
  border: 1px solid var(--cab-border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--cab-shadow-sm);
}
.cab-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.cab-panel-title {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--cab-text-muted);
}

/* ---------- Stat tiles ---------- */
.cab-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.cab-stat {
  background: var(--cab-surface);
  border: 1px solid var(--cab-border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--cab-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cab-stat:hover {
  border-color: rgba(123,63,242,0.35);
  box-shadow: var(--cab-shadow);
  transform: translateY(-1px);
}
.cab-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--cab-text-muted);
  margin-bottom: 8px;
}
.cab-stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--cab-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cab-stat-sub {
  font-size: 0.72rem;
  color: var(--cab-text-faint);
  margin-top: 4px;
}

/* ---------- Tables ---------- */
.cab-table-wrap {
  background: var(--cab-surface);
  border: 1px solid var(--cab-border);
  border-radius: 14px;
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--cab-shadow-sm);
}
.cab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cab-table thead { background: var(--cab-surface-2); }
.cab-table th {
  text-align: left;
  padding: 12px 18px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cab-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--cab-border);
  white-space: nowrap;
}
.cab-table th.text-right { text-align: right; }
.cab-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cab-border-soft);
  color: var(--cab-text);
  vertical-align: middle;
}
.cab-table tbody tr { transition: background 0.12s ease; }
.cab-table tbody tr:hover { background: var(--cab-surface-2); }
.cab-table tbody tr:last-child td { border-bottom: 0; }
.cab-table a.row-link {
  color: var(--cab-text);
  font-weight: 600;
  text-decoration: none;
}
.cab-table a.row-link:hover { color: var(--cab-brand); }
.cab-table .num { font-variant-numeric: tabular-nums; }
.cab-table .muted { color: var(--cab-text-muted); font-size: 0.82rem; }

/* ---------- Status dot (inline indicator before account name) ---------- */
.cab-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: middle;
  flex-shrink: 0;
}
.cab-dot-approved { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.16); }
.cab-dot-punished { background: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.16); }
.cab-dot-neutral  { background: #94A3B8; box-shadow: 0 0 0 3px rgba(148,163,184,0.16); }

/* Hide a table cell on mobile (header + cells get the same class) */
@media (max-width: 700px) {
  .cab-cell-hide-mobile { display: none; }
}

/* ---------- Combined stat tile (multi-value inside one card) ---------- */
.cab-stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--cab-border-soft);
  font-size: 0.78rem;
  color: var(--cab-text-muted);
}
.cab-stat-breakdown-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cab-stat-breakdown-item .cab-dot { margin-right: 0; width: 7px; height: 7px; box-shadow: none; }

/* ---------- Status badges ---------- */
.cab-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cab-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.cab-badge-approved { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.cab-badge-approved::before { background: #10B981; }
.cab-badge-punished { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.cab-badge-punished::before { background: #EF4444; }
.cab-badge-neutral  { background: var(--cab-surface-2); color: var(--cab-text-muted); border: 1px solid var(--cab-border); }
.cab-badge-neutral::before { background: var(--cab-text-faint); }

/* ---------- Account header on detail page ---------- */
.cab-acc-header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cab-acc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cab-text);
}
.cab-acc-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--cab-text-faint);
  margin-top: 4px;
}
.cab-acc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cab-back-link {
  font-size: 0.85rem;
  color: var(--cab-text-muted);
  text-decoration: none;
}
.cab-back-link:hover { color: var(--cab-brand); }

/* ---------- Login layout (light) ---------- */
.cab-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(123,63,242,0.10) 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(79,70,229,0.08) 0%, transparent 60%),
    var(--cab-bg);
}
.cab-login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: var(--cab-surface);
  border: 1px solid var(--cab-border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--cab-shadow-lg);
}
.cab-login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.cab-login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cab-text);
  text-align: center;
  margin-bottom: 6px;
}
.cab-login-sub {
  font-size: 0.88rem;
  color: var(--cab-text-muted);
  text-align: center;
  margin-bottom: 26px;
}
.cab-login-foot {
  font-size: 0.78rem;
  color: var(--cab-text-faint);
  text-align: center;
  margin-top: 24px;
}

/* ---------- Alerts ---------- */
.cab-alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
  border: 1px solid;
}
.cab-alert-error   { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.cab-alert-success { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.cab-alert-info    { background: var(--cab-brand-soft); color: #6D28D9; border-color: rgba(123,63,242,0.25); }

/* ---------- Checkbox label ---------- */
.cab-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: var(--cab-text-dim);
}
.cab-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--cab-brand);
  cursor: pointer;
}

/* ---------- KV grid (profile) ---------- */
.cab-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 24px;
}
.cab-kv-key {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--cab-text-muted);
  margin-bottom: 4px;
}
.cab-kv-value {
  font-size: 0.95rem;
  color: var(--cab-text);
  font-weight: 500;
}

/* ---------- Mini note ---------- */
.cab-note {
  background: var(--cab-brand-soft);
  border: 1px solid rgba(123,63,242,0.18);
  border-radius: 12px;
  padding: 14px 18px;
  color: #6D28D9;
  font-size: 0.88rem;
}

/* ---------- Inline metric grid (used inside a panel — flat, no extra borders) ---------- */
.cab-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 28px;
}
.cab-metric {
  padding: 4px 0;
}
.cab-metric-accent {
  background: var(--cab-brand-soft);
  border: 1px solid rgba(123,63,242,0.18);
  border-radius: 12px;
  padding: 12px 14px;
}
.cab-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--cab-text-muted);
  margin-bottom: 6px;
}
.cab-metric-accent .cab-metric-label { color: #6D28D9; }
.cab-metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--cab-text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.cab-metric-accent .cab-metric-value { color: var(--cab-brand); }
.cab-metric-sub {
  font-size: 0.72rem;
  color: var(--cab-text-faint);
  margin-top: 4px;
}
.cab-metric-accent .cab-metric-sub { color: #6D28D9; opacity: 0.72; }

/* ---------- Chart ---------- */
.cab-chart-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--cab-surface-2);
  border: 1px solid var(--cab-border-soft);
  border-radius: 10px;
  margin: 22px 0 14px;
}
.cab-chart-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cab-text-muted);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.cab-chart-tab:hover { color: var(--cab-text); }
.cab-chart-tab.is-active {
  background: #fff;
  color: var(--cab-brand);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}

.cab-chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}
@media (max-width: 700px) {
  .cab-chart-wrap { height: 200px; }
}

/* ---------- Operations list ---------- */
.op-list {
  display: grid;
  gap: 14px;
}
.op-card {
  background: var(--cab-surface);
  border: 1px solid var(--cab-border);
  border-radius: 14px;
  box-shadow: var(--cab-shadow-sm);
  overflow: hidden;
}
.op-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--cab-border-soft);
  background: var(--cab-surface-2);
}
.op-card-head-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.op-card-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cab-text);
  letter-spacing: -0.01em;
}
.op-card-body {
  padding: 14px 20px;
  display: grid;
  gap: 8px;
}
.op-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.88rem;
}
.op-row-label {
  flex: 0 0 130px;
  color: var(--cab-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.op-row-value {
  color: var(--cab-text);
  flex: 1;
  word-break: break-word;
}
.op-row-link {
  color: var(--cab-text);
  text-decoration: none;
  font-weight: 600;
}
.op-row-link:hover { color: var(--cab-brand); }
.op-row-id {
  display: inline-block;
  margin-left: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--cab-text-faint);
  font-size: 0.76rem;
  font-weight: 400;
}
.op-row-operator {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--cab-border-soft);
}
.op-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid var(--cab-border-soft);
  background: var(--cab-surface-2);
}
.op-foot-meta {
  font-size: 0.76rem;
  color: var(--cab-text-faint);
}
.op-cancel-btn {
  appearance: none;
  border: 1px solid var(--cab-border);
  background: #fff;
  color: var(--cab-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.op-cancel-btn:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}

.op-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.op-type-topup    { background: #ECFDF5; color: #047857; }
.op-type-withdraw { background: #FFF7ED; color: #9A3412; }
.op-type-transfer { background: var(--cab-brand-soft); color: #6D28D9; }

.op-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.op-status-submitted { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.op-status-approved  { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.op-status-rejected  { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.op-status-cancelled { background: var(--cab-surface-2); color: var(--cab-text-muted); border-color: var(--cab-border); }

/* Tickets: clickable card */
.op-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.op-card-link:hover {
  border-color: rgba(123,63,242,0.35);
  box-shadow: var(--cab-shadow);
  transform: translateY(-1px);
}

/* Ticket message thread */
.tk-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tk-msg {
  border: 1px solid var(--cab-border-soft);
  border-radius: 12px;
  padding: 10px 14px;
}
.tk-msg-client { background: var(--cab-surface); }
.tk-msg-admin  { background: var(--cab-brand-soft); border-color: rgba(123,63,242,0.22); }
.tk-msg-system { background: var(--cab-surface-2); font-style: italic; color: var(--cab-text-muted); }
.tk-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--cab-text-faint);
  margin-bottom: 4px;
}
.tk-msg-who { font-weight: 700; color: var(--cab-text-dim); }
.tk-msg-admin .tk-msg-who { color: var(--cab-brand); }
.tk-msg-body { font-size: 0.9rem; color: var(--cab-text); line-height: 1.5; }

/* ---------- Modal forms (topup/withdraw/transfer on account page) ---------- */
.op-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.op-modal-backdrop[data-open="1"] { display: flex; }
.op-modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--cab-shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
}
.op-modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--cab-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.op-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cab-text);
}
.op-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cab-text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 0;
}
.op-modal-close:hover { color: var(--cab-text); background: var(--cab-surface-2); }
.op-modal-body {
  padding: 18px 22px;
  display: grid;
  gap: 14px;
  overflow-y: auto;
}
.op-modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--cab-border-soft);
  background: var(--cab-surface-2);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.op-field {
  display: grid;
  gap: 6px;
}
.op-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cab-text-dim);
}
.op-field-help {
  font-size: 0.74rem;
  color: var(--cab-text-faint);
}
.op-field-error {
  font-size: 0.78rem;
  font-weight: 600;
  color: #B91C1C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 6px 10px;
}
.op-btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--cab-brand);
}
.op-btn-submit:disabled:hover { background: var(--cab-brand); }
.op-input, .op-select, .op-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--cab-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--cab-text);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.op-input:focus, .op-select:focus, .op-textarea:focus {
  border-color: var(--cab-brand);
  box-shadow: 0 0 0 3px rgba(123,63,242,0.12);
}
.op-textarea { resize: vertical; min-height: 64px; }
.op-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--cab-text-dim);
  cursor: pointer;
  user-select: none;
}
.op-checkbox input { accent-color: var(--cab-brand); width: 16px; height: 16px; cursor: pointer; }
.op-btn-cancel, .op-btn-submit {
  appearance: none;
  border: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.op-btn-cancel {
  background: #fff;
  border: 1px solid var(--cab-border);
  color: var(--cab-text-dim);
}
.op-btn-cancel:hover { background: var(--cab-surface-2); color: var(--cab-text); }
.op-btn-submit {
  background: var(--cab-brand);
  color: #fff;
}
.op-btn-submit:hover { background: #6D28D9; }

/* ---------- Action triggers on account/show.php ---------- */
.op-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.op-trigger {
  appearance: none;
  border: 1px solid var(--cab-border);
  background: #fff;
  color: var(--cab-text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.op-trigger:hover {
  border-color: var(--cab-brand);
  color: var(--cab-brand);
  background: var(--cab-brand-soft);
}
.op-trigger-primary {
  background: var(--cab-brand);
  border-color: var(--cab-brand);
  color: #fff;
}
.op-trigger-primary:hover { background: #6D28D9; border-color: #6D28D9; color: #fff; }

.op-trigger-disabled {
  color: var(--cab-text-faint);
  background: var(--cab-surface-2);
  cursor: not-allowed;
}
.op-trigger-disabled:hover {
  border-color: var(--cab-border);
  color: var(--cab-text-faint);
  background: var(--cab-surface-2);
}
.op-actions-note {
  margin: -16px 0 24px;
  font-size: 0.82rem;
  color: var(--cab-text-muted);
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 8px 14px;
}

/* ---------- Collapsible (per-day table) ---------- */
.cab-details > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cab-brand);
  padding: 6px 0;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cab-details > summary::-webkit-details-marker { display: none; }
.cab-details > summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
}
.cab-details[open] > summary::before { transform: rotate(90deg); }
.cab-details > summary:hover { color: #6D28D9; }
