@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/tajawal-400-ar.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/tajawal-400-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/tajawal-700-ar.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/tajawal-700-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/tajawal-800-ar.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/tajawal-800-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/tajawal-400-ar.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/tajawal-800-ar.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/tajawal-800-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

@view-transition { navigation: auto; }

:root {
  --primary: #1D4ED8;
  --primary-dark: #1E3A8A;
  --primary-light: #3B82F6;
  --primary-soft: #EFF6FF;
  --surface: #FFFFFF;
  --surface-elevated: #F8FAFC;
  --text: #0F172A;
  --text-2: #475569;
  --text-muted: #64748B;
  --coral: #EA580C;
  --mint: #059669;
  --amber: #D97706;
  --teal: #0D9488;
  --indigo: #4F46E5;
  --rose: #E11D48;
  --sky: #0284C7;
  --border: #E2E8F0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.09);
  --radius: 18px;
  --sidebar: 268px;
}

* { box-sizing: border-box; }
html { direction: rtl; }
body, .admin-body {
  margin: 0;
  font-family: 'Tajawal', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(29,78,216,.16), transparent 55%),
    radial-gradient(700px 420px at 5% 100%, rgba(13,148,136,.10), transparent 50%),
    linear-gradient(165deg, #EEF2FF 0%, #F8FAFC 45%, #ECFEFF 100%);
  min-height: 100vh;
  position: relative;
}
.admin-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.admin-bg .blob {
  position: absolute; border-radius: 50%;
  filter: blur(44px); opacity: .35;
  animation: adminBlob 16s ease-in-out infinite;
}
.admin-bg .b1 {
  width: 320px; height: 320px; top: -80px; left: 30%;
  background: rgba(59,130,246,.35);
}
.admin-bg .b2 {
  width: 260px; height: 260px; bottom: 8%; right: 8%;
  background: rgba(13,148,136,.28);
  animation-delay: -5s;
}
.admin-bg .b3 {
  width: 180px; height: 180px; top: 45%; left: 8%;
  background: rgba(251,146,60,.16);
  animation-delay: -9s;
}
@keyframes adminBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.08); }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

#nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(90deg, #60A5FA, #2DD4BF);
  transform: scaleX(0);
  transform-origin: right center;
  opacity: 0;
}
#nav-progress.on {
  opacity: 1;
  animation: navProgress 1s ease-in-out infinite;
}
@keyframes navProgress {
  0% { transform: scaleX(0.15); }
  50% { transform: scaleX(0.72); }
  100% { transform: scaleX(0.94); }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  background: linear-gradient(175deg, #0B1628 0%, #122447 48%, #1A3A7A 100%);
  color: #fff;
  overflow-y: auto;
  border-left: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 0 80px rgba(29,78,216,.12);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 14px;
}
.brand-logo {
  width: 46px; height: 46px; object-fit: contain;
  border-radius: 14px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  animation: brandPulse 4.5s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, #60A5FA, #1D4ED8);
  display: grid; place-items: center;
  font-weight: 900; font-size: 18px;
  box-shadow: 0 8px 22px rgba(29,78,216,.45);
}
.brand h1 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -.02em; }
.brand p { margin: 3px 0 0; font-size: 11px; opacity: .65; font-weight: 600; }

.nav-section {
  font-size: 10px; letter-spacing: .08em; opacity: .45;
  margin: 16px 12px 7px; font-weight: 800; text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px;
  margin-bottom: 3px; color: rgba(255,255,255,.82);
  transition: .18s ease;
  font-weight: 700; font-size: 14.5px;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active {
  background: linear-gradient(90deg, rgba(59,130,246,.4), rgba(59,130,246,.12));
  box-shadow: inset 3px 0 0 #60A5FA, 0 8px 22px rgba(29,78,216,.18);
  color: #fff;
}
.nav-locked {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px;
  margin-bottom: 3px; color: rgba(255,255,255,.38);
  font-weight: 700; font-size: 14.5px;
  cursor: not-allowed; user-select: none;
}
.nav-locked .lock-badge,
.lock-badge {
  margin-inline-start: auto;
  font-size: 10px; font-weight: 900;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(251,191,36,.2); color: #FBBF24;
  border: 1px solid rgba(251,191,36,.35);
}
.module-tile.is-locked {
  opacity: .72; cursor: not-allowed; pointer-events: none;
  filter: grayscale(.25);
}
.module-tile.is-locked .go { color: #D97706; }
.nav .ico {
  width: 30px; height: 30px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  display: grid; place-items: center; font-size: 13px; flex-shrink: 0;
}

.main { padding: 24px 28px 48px; min-width: 0; animation: mainIn .45s ease both; }
@keyframes mainIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 26px;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar h2 {
  margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.03em;
  background: linear-gradient(120deg, #0F172A, #1D4ED8 60%, #0D9488);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar .sub { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; font-weight: 600; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 8px 14px 8px 8px; border-radius: 999px; box-shadow: var(--shadow);
  flex-shrink: 0;
}
.menu-toggle,
.nav-close,
.nav-backdrop { display: none; }
.menu-toggle {
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: #0F172A;
  border-radius: 2px;
}
.nav-close {
  margin-inline-start: auto;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.user-logo {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: contain; background: #EFF6FF; padding: 3px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff; display: grid; place-items: center; font-weight: 900;
}

/* —— Page stack / section spacing —— */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.card-lead {
  margin: -4px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}
.card-tag {
  font-size: 12px; font-weight: 900;
  padding: 5px 12px; border-radius: 999px;
}
.tag-add { background: #DBEAFE; color: #1D4ED8; }
.tag-list { background: #F1F5F9; color: #475569; }

/* —— Sections —— */
.dash-section { margin-bottom: 28px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0; font-size: 15px; font-weight: 900; color: var(--text);
}
.section-title .pip,
.card-head h3 .pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(29,78,216,.15);
  display: inline-block;
}
.section-title .pip.amber, .card-head h3 .pip.amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(217,119,6,.15); }
.section-title .pip.teal, .card-head h3 .pip.teal { background: var(--teal); box-shadow: 0 0 0 4px rgba(13,148,136,.15); }
.section-title .pip.coral, .card-head h3 .pip.coral { background: var(--coral); box-shadow: 0 0 0 4px rgba(234,88,12,.15); }
.section-title .pip.indigo, .card-head h3 .pip.indigo { background: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.15); }
.section-meta { font-size: 12.5px; color: var(--text-muted); font-weight: 700; }

/* —— KPI / Stat cards —— */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card {
  position: relative;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: var(--accent, var(--primary));
}
.stat-card.accent-blue { --accent: #2563EB; --icon-bg: #DBEAFE; --icon-fg: #1D4ED8; }
.stat-card.accent-amber { --accent: #D97706; --icon-bg: #FEF3C7; --icon-fg: #B45309; }
.stat-card.accent-teal { --accent: #0D9488; --icon-bg: #CCFBF1; --icon-fg: #0F766E; }
.stat-card.accent-coral { --accent: #EA580C; --icon-bg: #FFEDD5; --icon-fg: #C2410C; }
.stat-card.accent-indigo { --accent: #4F46E5; --icon-bg: #E0E7FF; --icon-fg: #4338CA; }
.stat-card.accent-rose { --accent: #E11D48; --icon-bg: #FFE4E6; --icon-fg: #BE123C; }

.stat-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--icon-bg); color: var(--icon-fg);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-card .label {
  color: var(--text-muted); font-size: 12.5px; font-weight: 800;
  line-height: 1.35; max-width: 70%;
}
.stat-card .value {
  font-size: 30px; font-weight: 900; letter-spacing: -.04em;
  line-height: 1; color: var(--text);
}
.stat-card .hint {
  margin-top: 10px; font-size: 12.5px; color: var(--text-2); font-weight: 700;
}
.stat-card .hint a {
  color: var(--accent, var(--primary));
  font-weight: 800;
}
.stat-card .hint a:hover { text-decoration: underline; }

/* —— Module tiles —— */
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.module-tile {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: .18s ease;
  min-height: 128px;
}
.module-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.module-tile .tile-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
}
.module-tile .tile-icon svg { width: 22px; height: 22px; }
.module-tile.tone-blue .tile-icon { background: linear-gradient(145deg, #3B82F6, #1D4ED8); }
.module-tile.tone-amber .tile-icon { background: linear-gradient(145deg, #FBBF24, #D97706); }
.module-tile.tone-teal .tile-icon { background: linear-gradient(145deg, #2DD4BF, #0D9488); }
.module-tile.tone-indigo .tile-icon { background: linear-gradient(145deg, #818CF8, #4F46E5); }
.module-tile.tone-coral .tile-icon { background: linear-gradient(145deg, #FB923C, #EA580C); }
.module-tile.tone-rose .tile-icon { background: linear-gradient(145deg, #FB7185, #E11D48); }
.module-tile.tone-sky .tile-icon { background: linear-gradient(145deg, #38BDF8, #0284C7); }
.module-tile.tone-mint .tile-icon { background: linear-gradient(145deg, #34D399, #059669); }
.module-tile.tone-slate .tile-icon { background: linear-gradient(145deg, #94A3B8, #475569); }

.module-tile .t { font-weight: 900; font-size: 15px; letter-spacing: -.02em; }
.module-tile .d {
  color: var(--text-muted); font-size: 12.5px; line-height: 1.55; font-weight: 600;
  margin-top: auto;
}
.module-tile .go {
  font-size: 12px; font-weight: 800; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
}

/* —— Cards / tables —— */
.card {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 22px;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
  padding: 22px 22px 16px;
}
.card + .card { margin-top: 18px; }
.page-stack > .card + .card { margin-top: 0; }

.card-form {
  background: linear-gradient(160deg, rgba(239,246,255,.98), rgba(255,255,255,.98) 42%);
  border: 1px solid #BFDBFE;
  box-shadow: 0 16px 40px rgba(29,78,216,.09);
}
.card-form .card-head {
  border-bottom-color: #DBEAFE;
}
.card-list {
  background: rgba(255,255,255,.96);
  border-color: #E2E8F0;
  padding-bottom: 10px;
}

.card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid #EEF2F7;
}
.card-head h3 {
  margin: 0; font-size: 17px; font-weight: 900;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 11px 16px;
  font-weight: 800; cursor: pointer; transition: .15s ease;
  font-size: 14px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; box-shadow: 0 8px 18px rgba(29,78,216,.28);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--primary-soft); color: var(--primary-dark); }
.btn-danger { background: #FEE2E2; color: #991B1B; }
.btn-success { background: #ECFDF5; color: #065F46; }
.btn-sm { padding: 8px 12px; font-size: 13.5px; border-radius: 11px; }
.btn-doc {
  background: #EEF2FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
  font-size: 13px;
}
.btn-doc:hover { background: #E0E7FF; }

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #E8EEF5;
  background: #fff;
}
table.data {
  width: 100%; border-collapse: separate; border-spacing: 0;
  min-width: 760px;
}
table.data th, table.data td {
  text-align: right;
  padding: 16px 16px;
  border-bottom: 1px solid #EEF2F7;
  font-size: 15px;
  line-height: 1.45;
  vertical-align: middle;
}
table.data th {
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(180deg, #F8FAFC, #F1F5F9);
  letter-spacing: .01em;
  white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data th:first-child { border-top-right-radius: 15px; }
table.data th:last-child { border-top-left-radius: 15px; }
table.data td { color: #0F172A; font-weight: 700; }
table.data tbody tr { transition: background .15s ease; }
table.data tbody tr:nth-child(even) td { background: #FAFBFC; }
table.data tbody tr:hover td { background: #EFF6FF; }
table.data tr:last-child td { border-bottom: 0; }

/* Status-colored rows (market / mine tables) */
table.data tbody tr.status-row > td {
  border-bottom-color: transparent;
  box-shadow: none;
}
table.data tbody tr.status-row.row-ok > td {
  background: #ECFDF5 !important;
}
table.data tbody tr.status-row.row-ok > td:first-child {
  box-shadow: inset -4px 0 0 #059669;
}
table.data tbody tr.status-row.row-ok:hover > td { background: #D1FAE5 !important; }
table.data tbody tr.status-row.row-review > td {
  background: #EFF6FF !important;
}
table.data tbody tr.status-row.row-review > td:first-child {
  box-shadow: inset -4px 0 0 #2563EB;
}
table.data tbody tr.status-row.row-review:hover > td { background: #DBEAFE !important; }
table.data tbody tr.status-row.row-hold > td {
  background: #FFFBEB !important;
}
table.data tbody tr.status-row.row-hold > td:first-child {
  box-shadow: inset -4px 0 0 #D97706;
}
table.data tbody tr.status-row.row-hold:hover > td { background: #FEF3C7 !important; }
table.data tbody tr.status-row.row-open > td {
  background: #F8FAFC !important;
}
table.data tbody tr.status-row.row-open > td:first-child {
  box-shadow: inset -4px 0 0 #64748B;
}
table.data tbody tr.status-row.row-open:hover > td { background: #F1F5F9 !important; }
table.data tbody tr.status-row.row-danger > td {
  background: #FEF2F2 !important;
  color: #7F1D1D;
}
table.data tbody tr.status-row.row-danger > td:first-child {
  box-shadow: inset -4px 0 0 #DC2626;
}
table.data tbody tr.status-row.row-danger:hover > td { background: #FEE2E2 !important; }
table.data tbody tr.status-row.row-muted > td {
  background: #F1F5F9 !important;
  color: #64748B;
}
table.data tbody tr.status-row.row-muted > td:first-child {
  box-shadow: inset -4px 0 0 #94A3B8;
}
table.data tbody tr.status-row.row-muted:hover > td { background: #E2E8F0 !important; }
table.data tbody tr.status-row.row-neutral > td {
  background: #fff !important;
}
.badge-muted { background: #E2E8F0; color: #475569; }
table.data td .muted,
table.data td [style*="text-muted"],
table.data td div[style*="font-size:11px"] {
  font-size: 13px !important;
  font-weight: 600;
  margin-top: 3px;
}

.badge {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800;
}
.badge-warn { background: #FEF3C7; color: #92400E; }
.badge-ok { background: #D1FAE5; color: #065F46; }
.badge-info { background: var(--primary-soft); color: var(--primary-dark); }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-deposit { background: #DCFCE7; color: #166534; }
.badge-withdraw { background: #FFEDD5; color: #9A3412; }

/* —— Wallet hub —— */
.wallet-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100dvh - 176px);
}
.wallet-switch {
  display: none;
}
.wallet-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.wallet-switch label {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 14px;
  color: #475569;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  cursor: pointer;
}
.wallet-switch label em {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  margin-inline-start: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 11px;
  font-style: normal;
  align-items: center;
  justify-content: center;
}
.wallet-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: calc(100dvh - 176px);
}
.wallet-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.96);
  border: 1px solid #E2E8F0;
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(15,23,42,.06);
  overflow: hidden;
}
.wallet-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #EEF2F7;
  background: linear-gradient(180deg, #F8FAFC, #fff);
  flex-shrink: 0;
}
.wallet-pane-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}
.wallet-pane-head p {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.wallet-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #475569;
}
.wallet-count.is-hot { background: #FEF3C7; color: #92400E; }
.wallet-count.is-balance { background: #DBEAFE; color: #1D4ED8; }

.wallet-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #EEF2F7;
  flex-shrink: 0;
}
.wallet-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.wallet-chips-label {
  font-size: 11px;
  font-weight: 900;
  color: #94A3B8;
  margin-left: 2px;
}
.wchip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  background: #fff;
  font-weight: 800;
  font-size: 12.5px;
  color: #334155;
}
.wchip:hover { border-color: #93C5FD; color: var(--primary); background: #EFF6FF; }
.wchip.active { color: #fff; border-color: transparent; background: #1D4ED8; }
.wchip.tone-amber.active { background: #D97706; }
.wchip.tone-teal.active { background: #0D9488; }
.wchip.tone-rose.active { background: #E11D48; }
.wchip.tone-mint.active { background: #16A34A; }
.wchip.tone-coral.active { background: #EA580C; }

.wallet-ledger-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, .9fr) auto;
  gap: 8px;
  align-items: end;
  padding: 12px 16px;
  border-bottom: 1px solid #EEF2F7;
  flex-shrink: 0;
}
.w-field { display: grid; gap: 4px; min-width: 0; }
.w-field.grow { min-width: 0; }
.w-field span {
  font-size: 11px;
  font-weight: 900;
  color: #64748B;
}
.wallet-ledger-form .input {
  padding: 9px 11px;
  font-size: 13px;
  border-radius: 12px;
}
.wallet-ledger-form .btn { height: 42px; padding-inline: 16px; }

.wallet-pane-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F8FAFC;
}
.wallet-empty {
  margin: auto;
  padding: 36px 12px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 800;
}

.wreq {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(15,23,42,.04);
}
.wreq.is-deposit { border-right: 4px solid #16A34A; }
.wreq.is-withdraw { border-right: 4px solid #EA580C; }
.wreq-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wreq-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 18px; flex-shrink: 0;
}
.wreq.is-deposit .wreq-mark { background: #DCFCE7; color: #16A34A; }
.wreq.is-withdraw .wreq-mark { background: #FFEDD5; color: #C2410C; }
.wreq-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wreq-title strong { font-size: 14.5px; }
.wreq.is-deposit .wreq-title strong { color: #166534; }
.wreq.is-withdraw .wreq-title strong { color: #9A3412; }
.wreq-amount {
  font-size: 16px; font-weight: 900; white-space: nowrap;
}
.wreq.is-deposit .wreq-amount { color: #16A34A; }
.wreq.is-withdraw .wreq-amount { color: #EA580C; }
.wreq-who {
  display: flex; flex-direction: column; gap: 2px;
}
.wreq-who strong { font-size: 14px; }
.wreq-who span { font-size: 12.5px; color: var(--text-muted); font-weight: 700; }
.wreq-hint {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #9A3412;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 12px;
  padding: 8px 10px;
  line-height: 1.45;
}
.wreq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  padding-top: 4px;
  border-top: 1px dashed #E2E8F0;
}
.wreq-approve {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
}
.w-file {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 180px;
  font-size: 11.5px;
  font-weight: 800;
  color: #9A3412;
}
.w-file input[type=file] {
  width: 100%;
  padding: 8px;
  border: 1px dashed #FDBA74;
  border-radius: 12px;
  background: #FFF7ED;
  font-size: 12px;
  color: #7C2D12;
}

.wled {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 14px;
}
.wled.is-in { border-right: 4px solid #16A34A; }
.wled.is-out { border-right: 4px solid #EA580C; }
.wled-main { min-width: 0; }
.wled-main strong { display: block; font-size: 13.5px; font-weight: 900; }
.wled-main span { display: block; margin-top: 2px; font-size: 13px; font-weight: 800; }
.wled-main em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.wled-main .btn-doc { margin-top: 6px; }
.wled-money { text-align: left; flex-shrink: 0; }
.wled-money b { display: block; font-size: 15px; font-weight: 900; }
.wled.is-in .wled-money b { color: #16A34A; }
.wled.is-out .wled-money b { color: #EA580C; }
.wled-money small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.country-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 11px;
  font-weight: 900;
}
.pm-list { display: flex; flex-direction: column; gap: 10px; }
.pm-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border: 1px solid #E2E8F0; border-radius: 14px; background: #F8FAFC;
}
.pm-mark { flex: 0 0 44px; }
.whish-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.pm-bank {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 10px; background: #DBEAFE; color: #1D4ED8; font-weight: 900; font-size: 11px;
}
.pm-body { flex: 1; min-width: 0; }
.pm-title { font-weight: 900; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pm-meta { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }
.pm-edit summary, .pm-add summary {
  cursor: pointer; font-weight: 800; color: var(--primary); margin-top: 8px;
}
.check-inline { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; margin-top: 28px; }

.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.acc-pick { display: flex; flex-direction: column; gap: 6px; }
.acc-pick .acc-q { background: #F8FAFC; }

.acc-page { max-width: 860px; }
.acc-card { padding: 22px 22px 26px; }
.acc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; padding-bottom: 16px;
  border-bottom: 1px solid #EFF6FF;
}
.acc-meta { margin-top: 14px; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ui-switch {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; cursor: pointer; user-select: none; white-space: nowrap;
}
.ui-switch input[type=hidden] { display: none; position: absolute; }
.ui-switch input[type=checkbox] {
  appearance: none; width: 46px; height: 26px; border-radius: 999px;
  background: #CBD5E1; position: relative; outline: 0; cursor: pointer; transition: .2s; margin: 0;
}
.ui-switch input[type=checkbox]:checked { background: var(--primary); }
.ui-switch input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; inset-inline-end: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s;
}
.ui-switch input[type=checkbox]:checked::before { inset-inline-end: 23px; }
.combo { position: relative; }
.combo-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #BFDBFE; background: #fff; border-radius: 14px; padding: 13px 14px;
  font-weight: 700; color: var(--text); text-align: right; cursor: pointer;
}
.combo-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-btn i {
  width: 8px; height: 8px; border-inline-start: 2px solid #64748B; border-bottom: 2px solid #64748B;
  transform: rotate(-45deg); margin-top: -4px; flex: 0 0 auto;
}
.combo.open .combo-btn {
  border-color: #93C5FD; box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.combo-panel {
  display: none; position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; left: 0;
  background: #fff; border: 1px solid #DBEAFE; border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,.14); overflow: hidden;
}
.combo.open .combo-panel { display: block; }
.combo-search-wrap { padding: 10px; border-bottom: 1px solid #EFF6FF; }
.combo-search {
  width: 100%; border: 1px solid #DBEAFE; border-radius: 12px;
  padding: 10px 12px; background: #F8FAFC; font-weight: 600;
}
.combo-search:focus { outline: none; border-color: #93C5FD; background: #fff; }
.combo-list { max-height: 280px; overflow: auto; padding: 6px; }
.combo-item {
  width: 100%; display: block; border: 0; background: transparent; text-align: right;
  padding: 10px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--text);
}
.combo-item:hover, .combo-item.on { background: #EFF6FF; color: var(--primary); }
.combo-empty { padding: 16px; color: #94A3B8; text-align: center; font-weight: 700; }
@media (max-width: 720px) {
  .acc-head { flex-direction: column; }
}
label.field { display: block; font-size: 14px; font-weight: 800; color: var(--text-2); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 14px; background: #fff; color: var(--text);
  font-size: 15px; font-weight: 600;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #93C5FD;
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.card-form .input, .card-form .select, .card-form .textarea {
  border-color: #BFDBFE;
  background: #fff;
}
.textarea { min-height: 110px; resize: vertical; }
.help { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

.alert {
  border-radius: 14px; padding: 13px 15px; margin-bottom: 14px;
  font-weight: 700; font-size: 14.5px;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.auth-card .lead { color: var(--text-muted); margin-bottom: 22px; font-size: 14px; }

/* —— Filters —— */
.filters,
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center;
}
.filter-bar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(15,23,42,.05);
  gap: 14px;
}
.filter-group {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.filter-group + .filter-group {
  padding-right: 14px;
  border-right: 1px dashed #CBD5E1;
}
.filter-label {
  font-size: 12px;
  font-weight: 900;
  color: #64748B;
  margin-left: 4px;
  letter-spacing: .02em;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  font-weight: 800;
  font-size: 14px;
  color: #334155;
  transition: .18s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
}
.chip::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: #94A3B8;
  flex-shrink: 0;
}
.chip:hover {
  border-color: #93C5FD;
  color: var(--primary);
  background: #EFF6FF;
  transform: translateY(-1px);
}
.chip.active {
  background: linear-gradient(135deg, #1D4ED8, #3B82F6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(29,78,216,.28);
}
.chip.active::before {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.25);
}
.chip.tone-amber.active { background: linear-gradient(135deg, #B45309, #D97706); box-shadow: 0 10px 22px rgba(217,119,6,.28); }
.chip.tone-teal.active { background: linear-gradient(135deg, #0F766E, #14B8A6); box-shadow: 0 10px 22px rgba(13,148,136,.28); }
.chip.tone-rose.active { background: linear-gradient(135deg, #BE123C, #E11D48); box-shadow: 0 10px 22px rgba(225,29,72,.28); }
.chip.tone-indigo.active { background: linear-gradient(135deg, #4338CA, #6366F1); box-shadow: 0 10px 22px rgba(79,70,229,.28); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.empty-state {
  text-align: center; padding: 44px 16px; color: var(--text-muted);
  font-weight: 700; font-size: 15px;
}
.muted-dash { color: var(--text-muted); font-size: 13.5px; font-weight: 700; }

.search-head { align-items: stretch; }
.search-bar {
  display: flex; gap: 10px; flex: 1; align-items: center;
}
.search-bar .input {
  max-width: 380px;
  background: #F8FAFC;
  border-color: #E2E8F0;
}

/* —— Trade deals —— */
.trade-settings-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0B1628, #1E3A8A 55%, #1D4ED8);
  color: #fff;
  box-shadow: 0 14px 36px rgba(29,78,216,.22);
}
.tss-item {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 120px;
}
.tss-item span { display: block; font-size: 11.5px; opacity: .8; font-weight: 700; margin-bottom: 3px; }
.tss-item strong { font-size: 16px; font-weight: 900; }
.trade-settings-strip .btn-ghost {
  margin-inline-start: auto;
  background: rgba(255,255,255,.14);
  color: #fff;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.deal-card {
  background: rgba(255,255,255,.96);
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
  display: flex; flex-direction: column; gap: 14px;
}
.deal-card.is-confirm { border-color: #A7F3D0; box-shadow: 0 12px 32px rgba(5,150,105,.1); }
.deal-card.is-wait { border-color: #FDE68A; }
.deal-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
}
.deal-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-id { font-size: 18px; font-weight: 900; color: #1E3A8A; }
.deal-parties {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  background: #F8FAFC;
  border-radius: 14px;
  padding: 12px;
}
.deal-parties span { display: block; font-size: 11.5px; color: #64748B; font-weight: 800; }
.deal-parties strong { display: block; font-size: 14.5px; font-weight: 900; margin-top: 2px; }
.deal-parties em { display: block; font-style: normal; font-size: 12.5px; color: #64748B; font-weight: 700; margin-top: 2px; }
.deal-arrow { font-weight: 900; color: #94A3B8; font-size: 18px; }
.deal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.deal-metrics > div {
  background: #fff;
  border: 1px solid #EEF2F7;
  border-radius: 12px;
  padding: 10px 12px;
}
.deal-metrics span { display: block; font-size: 11.5px; color: #64748B; font-weight: 800; margin-bottom: 3px; }
.deal-metrics strong { font-size: 14.5px; font-weight: 900; }
.deal-metrics small { font-size: 12px; color: #64748B; font-weight: 700; }
.deal-note {
  margin: 0;
  font-size: 13.5px;
  color: #475569;
  font-weight: 700;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 10px 12px;
}
.deal-actions {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #EEF2F7;
}
.deal-confirm-form, .deal-reject-form {
  display: grid;
  gap: 8px;
}
.deal-confirm-form .field { margin: 0; font-size: 12.5px; }
.card-head h3 .pip.indigo { background: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.15); }

/* —— Document modal —— */
body.doc-modal-open { overflow: hidden; }
.doc-modal[hidden] { display: none !important; }
.doc-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 18px;
}
.doc-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(4px);
}
.doc-modal-panel {
  position: relative; z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  display: flex; flex-direction: column;
  background: #0B1220;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
}
.doc-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #122447, #1E3A8A);
  color: #fff;
}
.doc-modal-head h3 { margin: 0; font-size: 15px; font-weight: 900; }
.doc-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-modal-actions .btn-ghost {
  background: rgba(255,255,255,.12); color: #fff;
}
.doc-modal-body {
  flex: 1; min-height: 360px;
  display: grid; place-items: center;
  background: #020617;
  padding: 16px;
  overflow: auto;
}
.doc-modal-body img {
  max-width: 100%; max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.doc-modal-body iframe {
  width: 100%; height: 72vh; border: 0; border-radius: 10px; background: #fff;
}
.doc-modal-body .empty-state { color: #94A3B8; }
.doc-modal-body .empty-state a { color: #93C5FD; text-decoration: underline; }

@media (max-width: 1100px) {
  .grid-stats, .module-grid, .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .nav-close { display: grid; place-items: center; }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    z-index: 70;
    transform: translateX(110%);
    transition: transform .22s ease;
    box-shadow: none;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: -18px 0 48px rgba(0,0,0,.28);
  }
  .topbar { align-items: center; }
  .filter-group + .filter-group {
    padding-right: 0;
    border-right: 0;
    padding-top: 10px;
    border-top: 1px dashed #CBD5E1;
    width: 100%;
  }
  .wallet-page, .wallet-hub { height: auto; min-height: 0; }
}
@media (max-width: 900px) {
  .wallet-switch {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(255,255,255,.92);
    border: 1px solid #E2E8F0;
    border-radius: 18px;
  }
  .wallet-page:has(#wp-req:checked) .wallet-switch label[for="wp-req"],
  .wallet-page:has(#wp-led:checked) .wallet-switch label[for="wp-led"] {
    background: linear-gradient(135deg, #1D4ED8, #3B82F6);
    color: #fff;
    border-color: transparent;
  }
  .wallet-page:has(#wp-req:checked) .wallet-switch label[for="wp-req"] em {
    background: rgba(255,255,255,.22);
    color: #fff;
  }
  .wallet-hub {
    grid-template-columns: 1fr;
    height: min(70dvh, 640px);
    min-height: 420px;
  }
  .wallet-page:has(#wp-req:checked) .wallet-pane-ledger,
  .wallet-page:has(#wp-led:checked) .wallet-pane-requests {
    display: none;
  }
}
@media (max-width: 720px) {
  .form-grid, .deal-grid { grid-template-columns: 1fr; }
  .grid-stats, .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .deal-metrics { grid-template-columns: 1fr 1fr; }
  .deal-parties { grid-template-columns: 1fr; }
  .deal-arrow { display: none; }
  .main { padding: 14px 14px 32px; }
  .topbar { gap: 10px; margin-bottom: 18px; }
  .topbar h2 { font-size: 20px; }
  .topbar .sub { font-size: 12px; }
  .user-chip { padding: 6px; }
  .user-chip-text { display: none; }
  .page-stack { gap: 16px; }
  table.data { min-width: 640px; }
  table.data th, table.data td { padding: 12px 10px; font-size: 14px; }
  .chip { padding: 9px 13px; font-size: 13.5px; }
  .trade-settings-strip .btn-ghost { margin-inline-start: 0; width: 100%; }
  .wallet-ledger-form { grid-template-columns: 1fr 1fr; }
  .wallet-ledger-form .grow,
  .wallet-ledger-form .btn { grid-column: 1 / -1; }
  .wallet-hub { height: min(70dvh, 640px); min-height: 420px; }
  .card { padding: 16px 14px 12px; }
  .filter-bar { padding: 10px 12px; }

  .dash-section { margin-bottom: 20px; }
  .section-head { margin-bottom: 10px; }
  .section-meta { display: none; }
  .section-title { font-size: 14px; }

  .stat-card { padding: 12px 12px 10px; border-radius: 16px; }
  .stat-card:hover { transform: none; }
  .stat-top { margin-bottom: 8px; gap: 6px; }
  .stat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .stat-icon svg { width: 15px; height: 15px; }
  .stat-card .label { font-size: 11px; max-width: 78%; }
  .stat-card .value { font-size: 20px; }
  .stat-card .hint { display: none; }

  .module-tile {
    min-height: 0;
    padding: 12px;
    gap: 10px;
    border-radius: 16px;
    flex-direction: row;
    align-items: center;
  }
  .module-tile:hover { transform: none; }
  .module-tile .tile-icon { width: 36px; height: 36px; border-radius: 11px; }
  .module-tile .tile-icon svg { width: 18px; height: 18px; }
  .module-tile .t { font-size: 13px; line-height: 1.35; }
  .module-tile .d,
  .module-tile .go { display: none; }
}

/* Login / auth (kept here so /login is styled even if auth.css is cached as 404) */
.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Tajawal', system-ui, sans-serif;
  background: #0B1628;
  direction: rtl;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.auth-brand-pane {
  position: relative;
  padding: 28px 40px;
  color: #fff;
  background:
    radial-gradient(700px 400px at 20% 20%, rgba(59,130,246,.35), transparent 55%),
    linear-gradient(160deg, #0B1628 0%, #122447 50%, #1D4ED8 130%);
  overflow: hidden;
}
.auth-brand-pane::after {
  content: '';
  position: absolute; inset: auto -20% -30% 30%;
  height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,.2), transparent 65%);
}
.auth-back {
  position: relative; z-index: 2;
  color: rgba(255,255,255,.75); font-weight: 800; font-size: 13px;
}
.auth-brand-inner {
  position: relative; z-index: 2;
  max-width: 420px;
  margin-top: 18vh;
}
.auth-logo {
  width: 110px; height: 110px; object-fit: contain;
  background: rgba(255,255,255,.95);
  border-radius: 28px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  margin-bottom: 22px;
}
.auth-brand-inner h2 {
  margin: 0 0 10px; font-size: 36px; font-weight: 900; letter-spacing: -.03em;
}
.auth-brand-inner > p {
  margin: 0 0 22px; color: rgba(255,255,255,.78);
  line-height: 1.7; font-weight: 600; font-size: 15px;
}
.auth-brand-inner ul {
  margin: 0; padding: 0; list-style: none;
}
.auth-brand-inner li {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  font-weight: 700; font-size: 13.5px;
}
.auth-form-pane {
  display: grid; place-items: center;
  padding: 28px 22px;
  background:
    radial-gradient(600px 300px at 80% 0%, rgba(29,78,216,.08), transparent 50%),
    #F1F5F9;
}
.auth-card-premium {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 60px rgba(15,23,42,.1);
}
.auth-card-logo {
  display: flex; justify-content: center; margin-bottom: 10px;
}
.auth-card-logo img {
  width: 64px; height: 64px; object-fit: contain;
}
.auth-card-premium h1 {
  margin: 0 0 6px; font-size: 24px; font-weight: 900; text-align: center;
}
.auth-card-premium .lead {
  text-align: center; color: #64748B; margin: 0 0 22px;
  font-size: 13.5px; font-weight: 600; line-height: 1.55;
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-pane { display: none; }
}

/* —— Reports hub —— */
.export-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.export-bar form { margin: 0; }
.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.filter-bar .input,
.filter-bar .select {
  min-width: 140px;
  max-width: 220px;
  padding: 9px 12px;
  border-radius: 12px;
}
.wallet-report-strip {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.wallet-report-strip a {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  border-radius: 12px;
  background: #EEF2FF;
  color: #3730A3;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid #C7D2FE;
}
.wallet-report-strip a:hover { background: #E0E7FF; }
.interbranch-page .wallet-hub { height: auto; min-height: 0; }
.interbranch-page .wallet-pane-body { max-height: none; }
.ib-acks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ib-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 900;
}
.ib-pill.on { background: #CCFBF1; color: #0F766E; }
.ib-pill.off { background: #FEF3C7; color: #B45309; }
.wreq.ib-acked { border-color: #99F6E4; }
.module-tile .export-bar .btn { flex: 1; }
@media (max-width: 720px) {
  .report-kpis { grid-template-columns: 1fr 1fr; }
  .filter-bar .input, .filter-bar .select { max-width: none; min-width: 0; width: 100%; }
}
