﻿:root {
  --bg: #050608;
  --ink: #080a0f;
  --panel: #10141b;
  --panel-2: #161b24;
  --line: #303744;
  --line-gold: rgba(214, 162, 58, .48);
  --gold: #d6a23a;
  --gold-2: #f4c766;
  --text: #f5ead2;
  --muted: #aeb6c5;
  --green: #67d36b;
  --red: #ff5364;
  --orange: #f0b447;
  --radius: 8px;
  --radius-sm: 6px;
  --gold-glow: 0 18px 36px rgba(0,0,0,.28), 0 0 24px rgba(214, 162, 58, .08);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(214, 162, 58, .16), transparent 320px),
    radial-gradient(circle at 88% 14%, rgba(244, 199, 102, .08), transparent 360px),
    linear-gradient(135deg, #050608 0%, #0c1016 48%, #050608 100%);
  color: var(--text);
  font-family: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(7, 9, 13, .86);
  border-left: 1px solid var(--line-gold);
  backdrop-filter: blur(16px);
  box-shadow: inset 1px 0 0 rgba(244, 199, 102, .05);
}

.brand-card {
  min-height: 184px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(244, 199, 102, .08), transparent 48%),
    rgba(16, 20, 27, .86);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 18px 34px rgba(0,0,0,.28);
}

.brand-card img {
  width: 178px;
  max-height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(244, 199, 102, .42));
}

.brand-card strong { color: var(--gold-2); }
.brand-card span, .rail-status span { color: var(--muted); font-size: 12px; }

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  justify-content: flex-start;
}

.nav-item span {
  width: 22px;
  color: var(--gold-2);
}

.nav-item.active,
.nav-item:hover {
  color: var(--text);
  border-color: var(--line-gold);
  background: linear-gradient(90deg, rgba(214, 162, 58, .16), rgba(214, 162, 58, .03));
}

.rail-status {
  margin-top: auto;
  min-height: 74px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(214, 162, 58, .32);
  border-radius: var(--radius);
  background: rgba(16, 20, 27, .92);
  box-shadow: 0 0 18px rgba(214, 162, 58, .06);
}

.rail-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.main {
  min-width: 0;
  padding: 18px 18px 92px;
}

.topbar {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 4px 14px;
}

.topbar strong { display: block; color: var(--gold-2); }
.topbar span { color: var(--muted); font-size: 12px; }

.top-actions {
  display: flex;
  gap: 8px;
}

.top-actions button,
.work-card button,
.report-panel button {
  min-height: 38px;
  border: 1px solid rgba(214, 162, 58, .62);
  background: rgba(214, 162, 58, .12);
  color: var(--gold-2);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 16px rgba(214, 162, 58, .08);
}

.mobile-menu {
  display: none;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-sm);
  background: rgba(16, 20, 27, .9);
  color: var(--gold-2);
}

.lux-hero {
  min-height: 236px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 250px minmax(320px, 1fr) 240px;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent),
    #07090d;
  box-shadow: var(--gold-glow);
}

.lux-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  box-shadow: 0 0 22px rgba(244, 199, 102, .68);
}

.gold-arc {
  position: absolute;
  width: 62%;
  height: 8px;
  left: 21%;
  top: 25px;
  border-radius: 999px;
  transform: rotate(-14deg);
  background: linear-gradient(90deg, transparent, #4b2d05, var(--gold-2), #6b4108, transparent);
  box-shadow: 0 0 22px rgba(244, 199, 102, .58);
}

.arc-b {
  top: 58px;
  height: 3px;
  opacity: .76;
}

.logo-stage {
  position: relative;
  z-index: 1;
  min-height: 158px;
  display: grid;
  place-items: center;
}

.logo-stage img {
  width: 230px;
  max-width: 100%;
  filter: drop-shadow(0 0 16px rgba(244, 199, 102, .45));
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-copy h1 {
  margin: 0;
  color: var(--gold-2);
  font-size: 31px;
  text-shadow: 0 0 14px rgba(244, 199, 102, .35);
}

.company-picker {
  display: grid;
  grid-template-columns: auto 280px;
  align-items: center;
  gap: 14px;
}

.company-picker label {
  color: var(--gold);
  font-weight: 700;
}

input, select {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(214, 162, 58, .5);
  background: #0c0f15;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.hero-meta {
  position: relative;
  z-index: 1;
  min-height: 130px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(214, 162, 58, .32);
  background: rgba(16, 20, 27, .72);
}

.hero-meta strong {
  color: var(--gold-2);
  font-size: 18px;
}

.hero-meta span,
.hero-meta time {
  color: var(--muted);
  font-size: 13px;
}

.view { display: none; }
.view.active { display: block; }

.quick-strip {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 10px;
}

.quick-strip .metric:nth-child(1),
.quick-strip .metric:nth-child(2) {
  grid-column: span 4;
}

.quick-strip .metric:nth-child(n+3) {
  grid-column: span 2;
}

.metric {
  min-height: 104px;
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid rgba(214, 162, 58, .22);
  background:
    linear-gradient(180deg, rgba(255,255,255,.062), rgba(255,255,255,.012)),
    radial-gradient(circle at 12% 18%, rgba(244, 199, 102, .10), transparent 58px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22), inset 0 0 18px rgba(244,199,102,.025);
}

.quick-strip .metric:nth-child(1),
.quick-strip .metric:nth-child(2) {
  min-height: 124px;
  padding: 15px 16px 14px;
  border-color: rgba(214, 162, 58, .34);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.012)),
    radial-gradient(circle at 14% 20%, rgba(244, 199, 102, .16), transparent 78px),
    linear-gradient(135deg, rgba(20, 24, 32, .98), rgba(8, 10, 15, .98));
  box-shadow:
    0 18px 34px rgba(0,0,0,.3),
    inset 0 0 24px rgba(244,199,102,.045);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 24%, currentColor, transparent 72px);
  opacity: .08;
}

.metric::after {
  content: "";
  position: absolute;
  right: 16px;
  left: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: .45;
  box-shadow: 0 0 16px currentColor;
}

.metric span {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 13px;
}

.quick-strip .metric:nth-child(1) > span,
.quick-strip .metric:nth-child(2) > span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.metric strong {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  padding-left: 54px;
  overflow: visible;
  direction: ltr;
  text-align: right;
  white-space: nowrap;
  font-size: 19px;
  line-height: 1.35;
}

.quick-strip .metric:nth-child(n+3) strong {
  padding-left: 54px;
  font-size: 22px;
}

.metric strong .amount-number {
  direction: ltr;
  font-size: 19px;
  line-height: 1.2;
  white-space: nowrap;
}

.metric strong small {
  color: var(--muted);
  direction: rtl;
  font-size: 11px;
  font-weight: 700;
}

.amount-list {
  width: 100%;
  display: grid;
  gap: 7px;
  padding-left: 48px;
}

.amount-list em {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  direction: ltr;
  font-style: normal;
  line-height: 1.15;
  padding: 6px 8px;
  border: 1px solid rgba(244, 199, 102, .14);
  background: rgba(5, 7, 11, .38);
}

.amount-list em strong {
  display: block;
  min-width: 0;
  padding-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255,255,255,.08);
}

.amount-list em small {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 3px 7px;
  border: 1px solid rgba(214, 162, 58, .32);
  background: rgba(214, 162, 58, .1);
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.amount-list.empty {
  display: block;
  padding-left: 54px;
  font-size: 18px;
}

.metric b {
  position: absolute;
  left: 16px;
  top: 26px;
  width: 42px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 21px;
}

.quick-strip .metric:nth-child(1) b,
.quick-strip .metric:nth-child(2) b {
  top: 44px;
  width: 36px;
  height: 36px;
  border-width: 1px;
  background: rgba(5, 7, 11, .5);
  box-shadow: 0 0 18px currentColor;
  opacity: .92;
}

.positive, .success { color: var(--green); }
.negative { color: var(--red); }
.gold, .amber { color: var(--gold-2); }

.dashboard-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.12fr);
  gap: 14px;
}

.panel,
.work-card {
  border: 1px solid rgba(214, 162, 58, .28);
  background: rgba(16, 20, 27, .94);
  box-shadow: 0 18px 32px rgba(0,0,0,.24);
}

.panel header,
.work-card header {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(214, 162, 58, .32);
  background: linear-gradient(90deg, rgba(214,162,58,.1), transparent);
}

h2 {
  margin: 0;
  color: var(--gold-2);
  font-size: 16px;
}

.panel header span {
  color: var(--gold-2);
  font-size: 22px;
}

.table-wrap {
  overflow: auto;
  padding: 12px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  white-space: nowrap;
}

th, td {
  padding: 10px 12px;
  text-align: center;
}

th {
  color: var(--gold-2);
  background: transparent;
  font-size: 12px;
  border: 0;
  padding-top: 0;
  padding-bottom: 6px;
  opacity: .86;
}

td {
  font-size: 13px;
  border-top: 1px solid rgba(214, 162, 58, .13);
  border-bottom: 1px solid rgba(214, 162, 58, .13);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
    rgba(8, 11, 17, .72);
}

td:first-child {
  border-right: 1px solid rgba(214, 162, 58, .13);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

td:last-child {
  border-left: 1px solid rgba(214, 162, 58, .13);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

tbody tr {
  transition: transform .16s ease, filter .16s ease;
}

tbody tr:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.badge {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  padding: 5px 10px;
  border: 1px solid rgba(214, 162, 58, .55);
  color: var(--gold-2);
  background: rgba(214, 162, 58, .1);
}

.currency-pill,
.deal-code,
.progress-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(214, 162, 58, .25);
  background: rgba(214, 162, 58, .08);
  color: var(--gold-2);
  font-weight: 700;
}

.deal-code {
  max-width: 168px;
  overflow: hidden;
  direction: ltr;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.progress-chip {
  min-width: 52px;
  color: var(--text);
  background: linear-gradient(90deg, rgba(214, 162, 58, .2), rgba(214, 162, 58, .05));
}

.badge.green {
  color: var(--green);
  border-color: rgba(103, 211, 107, .5);
}

.badge.red {
  color: var(--red);
  border-color: rgba(255, 83, 100, .5);
}

.pro-chart {
  min-height: 286px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.net-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(214, 162, 58, .36);
  background:
    radial-gradient(circle at 18% 16%, rgba(244, 199, 102, .18), transparent 33%),
    linear-gradient(135deg, rgba(18, 21, 28, .96), rgba(8, 10, 15, .98));
  box-shadow: inset 0 0 24px rgba(244, 199, 102, .06), 0 16px 34px rgba(0,0,0,.28);
}

.net-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  box-shadow: 0 0 18px rgba(244, 199, 102, .72);
}

.net-card small,
.net-card span {
  color: var(--muted);
  font-size: 12px;
}

.net-card strong {
  color: var(--gold-2);
  font-size: 30px;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(244, 199, 102, .28);
  direction: ltr;
  text-align: right;
}

.exposure-track {
  height: 20px;
  overflow: hidden;
  display: flex;
  border: 1px solid rgba(214, 162, 58, .28);
  background: #080b11;
  box-shadow: inset 0 0 18px rgba(0,0,0,.42);
}

.exposure-credit,
.exposure-debt {
  min-width: 3px;
  transition: width .25s ease;
}

.exposure-credit {
  background: linear-gradient(90deg, #14562d, var(--green), #a8f3a1);
  box-shadow: 0 0 18px rgba(103, 211, 107, .38);
}

.exposure-debt {
  background: linear-gradient(90deg, #ff9a9a, var(--red), #6d1824);
  box-shadow: 0 0 18px rgba(255, 83, 100, .36);
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(48, 55, 68, .9);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
}

.stat-chip span {
  color: var(--muted);
  font-size: 12px;
}

.stat-chip strong {
  font-size: 20px;
  direction: ltr;
}

.positive { color: var(--green); }
.negative { color: var(--red); }

.exposure-list {
  display: grid;
  gap: 9px;
}

.exposure-row {
  display: grid;
  grid-template-columns: 50px minmax(96px, 1fr) minmax(108px, auto);
  align-items: center;
  gap: 10px;
  min-height: 30px;
  color: var(--text);
}

.exposure-row span {
  color: var(--gold-2);
  font-weight: 700;
}

.exposure-row strong {
  direction: ltr;
  text-align: right;
  font-size: 13px;
}

.exposure-mini-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(48, 55, 68, .86);
  background: #080b11;
}

.exposure-mini-fill {
  display: block;
  height: 100%;
}

.exposure-mini-fill.positive {
  background: linear-gradient(90deg, rgba(103, 211, 107, .18), var(--green));
}

.exposure-mini-fill.negative {
  background: linear-gradient(90deg, rgba(255, 83, 100, .18), var(--red));
}

.work-card {
  margin-top: 14px;
}

.form-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.wide { grid-column: 1 / -1; }

.secondary-action {
  min-height: 44px;
  border: 1px solid rgba(214, 162, 58, .52);
  background:
    linear-gradient(90deg, rgba(214, 162, 58, .16), rgba(214, 162, 58, .04));
  color: var(--gold-2);
  font-weight: 700;
}

.bank-lookup {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(214, 162, 58, .28);
  background:
    radial-gradient(circle at 12% 0%, rgba(244, 199, 102, .11), transparent 120px),
    rgba(8, 11, 17, .72);
}

.bank-lookup.hidden {
  display: none;
}

.bank-lookup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bank-lookup-head strong {
  display: block;
  color: var(--gold-2);
  margin-bottom: 4px;
}

.bank-lookup-head span,
.bank-lookup p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.bank-lookup-head button {
  min-width: 92px;
  min-height: 38px;
  border: 1px solid rgba(214, 162, 58, .55);
  background: rgba(214, 162, 58, .12);
  color: var(--gold-2);
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bank-lookup p {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(48, 55, 68, .7);
  background: rgba(5, 7, 11, .46);
}

.bank-lookup p.success { color: var(--green); border-color: rgba(103, 211, 107, .35); }
.bank-lookup p.error { color: var(--red); border-color: rgba(255, 83, 100, .35); }
.bank-lookup p.warning,
.bank-lookup p.loading { color: var(--gold-2); border-color: rgba(214, 162, 58, .4); }

.recipient-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recipient-summary strong {
  color: var(--text);
  font-size: 12px;
}

.recipient-summary small {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  direction: ltr;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.management-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.compact {
  margin-top: 0;
  padding-bottom: 16px;
}

.compact label {
  margin: 14px 18px 0;
}

.cards {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.small-card {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(48, 55, 68, .85);
  background: #0c0f15;
}

.small-card strong {
  display: block;
  color: var(--gold-2);
  margin-bottom: 8px;
}

.small-card button,
.access-row button,
.access-actions button {
  border: 1px solid rgba(244, 199, 102, .6);
  background: rgba(244, 199, 102, .08);
  color: var(--gold-2);
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.report-panel {
  margin-top: 14px;
}

.report-panel p {
  margin: 0;
  padding: 22px;
  color: var(--muted);
}

.access-admin-panel {
  margin-top: 16px;
}

.access-form {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.access-grid label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 199, 102, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-weight: 800;
}

.access-grid input {
  accent-color: var(--gold);
}

.access-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.access-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 0 16px 16px;
}

.access-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(244, 199, 102, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.access-row strong {
  display: block;
  color: var(--gold-2);
  margin-bottom: 6px;
}

.access-row span {
  color: var(--muted);
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  min-width: 260px;
  max-width: 420px;
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(12px);
  border: 1px solid rgba(214, 162, 58, .55);
  background: #0c0f15;
  color: var(--text);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-tabs {
  display: none;
}

/* Final luxury polish */
.brand-card,
.rail-status,
.lux-hero,
.hero-meta,
.metric,
.panel,
.work-card,
.net-card,
.stat-chip,
.small-card,
.toast,
.secondary-action,
input,
select,
button {
  border-radius: var(--radius);
}

.nav-item,
.badge,
.amount-list em,
.amount-list em small,
.exposure-track,
.exposure-mini-track,
.mobile-tabs,
.table-wrap {
  border-radius: var(--radius-sm);
}

.panel,
.work-card,
.metric,
.brand-card,
.hero-meta,
.net-card,
.small-card {
  box-shadow:
    0 18px 34px rgba(0,0,0,.28),
    0 0 0 1px rgba(244, 199, 102, .035),
    0 0 22px rgba(214, 162, 58, .07);
}

.panel,
.work-card,
.metric,
.net-card,
.table-wrap {
  overflow: hidden;
}

.panel header,
.work-card header {
  border-radius: var(--radius) var(--radius) 0 0;
}

.panel .table-wrap {
  overflow: auto;
}

.metric {
  border-color: rgba(214, 162, 58, .3);
}

.quick-strip .metric:nth-child(1),
.quick-strip .metric:nth-child(2) {
  box-shadow:
    0 20px 38px rgba(0,0,0,.32),
    0 0 0 1px rgba(244, 199, 102, .05),
    0 0 28px rgba(214, 162, 58, .11),
    inset 0 0 24px rgba(244, 199, 102, .045);
}

.amount-list em {
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 14px rgba(244, 199, 102, .025);
}

.top-actions button:hover,
.work-card button:hover,
.report-panel button:hover,
.secondary-action:hover {
  border-color: rgba(244, 199, 102, .78);
  box-shadow: 0 0 20px rgba(214, 162, 58, .14);
}

input:focus,
select:focus {
  border-color: rgba(244, 199, 102, .82);
  box-shadow: 0 0 0 2px rgba(244, 199, 102, .08), 0 0 18px rgba(214, 162, 58, .1);
}

@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    z-index: 30;
    right: 0;
    width: 282px;
    transform: translateX(105%);
    transition: transform .2s ease;
  }
  .rail.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; place-items: center; }
  .top-actions { display: none; }
  .main { padding: 14px 14px 86px; }
}

@media (max-width: 900px) {
  .lux-hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
  }
  .logo-stage { min-height: 118px; }
  .logo-stage img { width: 190px; }
  .hero-copy h1 { font-size: 24px; }
  .company-picker { grid-template-columns: 1fr; width: 100%; }
  .hero-meta { justify-items: center; }
  .quick-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-strip .metric:nth-child(1),
  .quick-strip .metric:nth-child(2),
  .quick-strip .metric:nth-child(n+3) {
    grid-column: span 1;
  }
  .quick-strip .metric:nth-child(1),
  .quick-strip .metric:nth-child(2) {
    min-height: 116px;
  }
  .amount-list em strong {
    font-size: 16px;
  }
  .dashboard-layout,
  .form-grid,
  .management-layout {
    grid-template-columns: 1fr;
  }
  .bank-grid {
    grid-template-columns: 1fr;
  }
  .bank-lookup-head {
    align-items: stretch;
    flex-direction: column;
  }
  .pro-chart { padding: 14px; }
  .net-card strong { font-size: 24px; }
  .exposure-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }
  .exposure-row strong {
    grid-column: 2;
    text-align: left;
  }
  .mobile-tabs {
    position: fixed;
    z-index: 20;
    right: 10px;
    left: 10px;
    bottom: 10px;
    min-height: 60px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(214, 162, 58, .32);
    background: rgba(7, 9, 13, .94);
    backdrop-filter: blur(16px);
  }
  .mobile-tabs .nav-item {
    min-height: 42px;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .topbar { padding-bottom: 10px; }
  .quick-strip { grid-template-columns: 1fr; }
  .quick-strip .metric:nth-child(1),
  .quick-strip .metric:nth-child(2),
  .quick-strip .metric:nth-child(n+3) {
    grid-column: span 1;
  }
  .metric { min-height: 82px; }
  .quick-strip .metric:nth-child(1),
  .quick-strip .metric:nth-child(2) {
    min-height: 112px;
  }
  .metric strong { font-size: 19px; }
  .amount-list {
    gap: 6px;
    padding-left: 44px;
  }
  .amount-list em {
    padding: 5px 7px;
  }
  .amount-list em strong {
    font-size: 15px;
  }
  .amount-list em small {
    min-width: 40px;
    font-size: 10px;
  }
  .chart-stats { grid-template-columns: 1fr; }
  .table-wrap {
    padding: 10px;
    overflow: visible;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  table {
    border-spacing: 0;
  }
  tbody {
    display: grid;
    gap: 10px;
  }
  tbody tr {
    padding: 10px;
    border: 1px solid rgba(214, 162, 58, .18);
    border-radius: var(--radius);
    background:
      linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.014)),
      rgba(8, 11, 17, .82);
    box-shadow: 0 14px 26px rgba(0,0,0,.24), 0 0 16px rgba(214, 162, 58, .045);
  }
  td {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 2px;
    border: 0;
    border-bottom: 1px solid rgba(48, 55, 68, .52);
    border-radius: 0;
    background: transparent;
    white-space: normal;
    text-align: left;
  }
  td:last-child {
    border-bottom: 0;
  }
  td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
  }
  .deal-code {
    max-width: 150px;
  }
  .recipient-summary small {
    max-width: 180px;
  }
}

/* Auth and brand refinement */
.rail-status {
  display: none !important;
}

.sync-status-text {
  margin-top: auto;
  color: rgba(244, 199, 102, .72);
  font-size: 11px;
  text-align: center;
}

.brand-card {
  min-height: 158px;
}

.brand-card img,
.logo-stage img,
.auth-brand img {
  height: auto;
  object-fit: contain;
  object-position: center;
  aspect-ratio: auto;
}

.brand-card img {
  width: min(188px, 92%);
  max-height: 126px;
}

.logo-stage img {
  width: min(260px, 100%);
  max-height: 156px;
}

.auth-trigger {
  min-width: 74px;
  height: 38px;
  border: 1px solid rgba(214, 162, 58, .58);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(244, 199, 102, .18), rgba(214, 162, 58, .06)),
    rgba(12, 15, 21, .92);
  color: var(--gold-2);
  padding: 0 16px;
  box-shadow: 0 0 18px rgba(214, 162, 58, .1);
}

.auth-trigger:hover {
  border-color: rgba(244, 199, 102, .82);
  box-shadow: 0 0 24px rgba(214, 162, 58, .18);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(2, 4, 8, .72);
  backdrop-filter: blur(14px);
}

.auth-modal.open {
  display: grid;
}

.auth-dialog {
  width: min(430px, 100%);
  position: relative;
  border: 1px solid rgba(214, 162, 58, .52);
  border-radius: 16px;
  padding: 22px;
  background:
    radial-gradient(circle at 26% 0%, rgba(244, 199, 102, .16), transparent 210px),
    linear-gradient(180deg, rgba(18, 22, 30, .98), rgba(8, 10, 15, .98));
  box-shadow: 0 28px 70px rgba(0, 0, 0, .52), 0 0 32px rgba(214, 162, 58, .12);
}

.auth-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 162, 58, .34);
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  color: var(--gold-2);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-brand img {
  width: 92px;
  max-height: 62px;
  filter: drop-shadow(0 0 14px rgba(244, 199, 102, .38));
}

.auth-brand strong {
  display: block;
  color: var(--gold-2);
  font-size: 20px;
}

.auth-brand span,
.auth-form p {
  color: var(--muted);
  font-size: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tabs button {
  height: 40px;
  border: 1px solid rgba(214, 162, 58, .28);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
}

.auth-tabs button.active {
  color: #14110a;
  border-color: rgba(244, 199, 102, .78);
  background: linear-gradient(180deg, #f4d079, #bc8325);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--gold-2);
  font-size: 12px;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(214, 162, 58, .26);
  border-radius: 10px;
  background: rgba(3, 5, 9, .72);
  color: var(--text);
  padding: 0 13px;
  direction: ltr;
  text-align: left;
}

.auth-form button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: #151009;
  background: linear-gradient(180deg, #ffe59b, #c1872a);
  font-weight: 700;
}

#publicAppUrl {
  color: var(--gold-2);
  font-weight: 700;
  letter-spacing: .2px;
  background:
    linear-gradient(90deg, rgba(214, 162, 58, .12), rgba(244, 199, 102, .04)),
    rgba(3, 5, 9, .72);
}

.technical-setting {
  opacity: .68;
}

.hidden {
  display: none !important;
}

body:not(.is-authenticated) .app,
body:not(.is-authenticated) .mobile-tabs {
  display: none;
}

body.is-authenticated .auth-gate {
  display: none;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(244, 199, 102, .18), transparent 280px),
    radial-gradient(circle at 82% 78%, rgba(214, 162, 58, .1), transparent 320px),
    linear-gradient(135deg, #040507, #10141b 52%, #050608);
}

.auth-gate-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(214, 162, 58, .5);
  border-radius: 18px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.018)),
    rgba(10, 13, 19, .94);
  box-shadow: 0 32px 90px rgba(0,0,0,.58), 0 0 34px rgba(214, 162, 58, .12);
}

.auth-gate-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.auth-gate-brand p,
.auth-gate-brand h1,
.auth-gate-brand span {
  margin: 0;
}

.auth-gate-brand p {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.auth-gate-brand h1 {
  margin-top: 5px;
  color: var(--gold-2);
  font-size: 25px;
  line-height: 1.55;
}

.auth-gate-brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.brand-mark {
  width: 128px;
  height: 86px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(244, 199, 102, .58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 229, 155, .22), transparent 54%),
    linear-gradient(145deg, rgba(25, 20, 10, .92), rgba(7, 9, 13, .96));
  box-shadow: inset 0 0 24px rgba(244, 199, 102, .08), 0 0 24px rgba(214, 162, 58, .12);
  color: var(--gold-2);
  text-align: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 9px 16px rgba(0, 0, 0, .45));
}

.brand-mark span {
  color: #ffe8a7;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .5px;
}

.brand-mark b {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.brand-mark-lg {
  width: 154px;
  height: 118px;
}

.brand-mark-lg span {
  font-size: 38px;
}

.brand-mark-hero {
  width: 260px;
  height: 170px;
  border-radius: 22px;
  transform: perspective(900px) rotateY(-8deg);
}

.brand-mark-hero span {
  font-size: 58px;
}

.brand-card .brand-mark {
  width: min(190px, 94%);
  height: 132px;
}

.auth-brand .brand-mark {
  flex: 0 0 auto;
  width: 92px;
  height: 62px;
  border-radius: 14px;
}

.auth-brand .brand-mark span {
  font-size: 25px;
}

.auth-brand .brand-mark b {
  font-size: 9px;
}

body,
button,
input,
select,
textarea {
  font-feature-settings: "ss01" 1, "tnum" 1;
}

.topbar strong,
.hero-copy h1,
h2,
.panel header,
.work-card header,
.nav-item,
.auth-form,
.auth-gate {
  font-weight: 700;
}

.hero-copy h1 {
  line-height: 1.65;
}

.nav-item,
label,
td,
th,
.topbar span,
.hero-meta span,
.hero-meta time {
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .auth-trigger {
    margin-right: auto;
  }
}

@media (max-width: 520px) {
  .auth-gate {
    padding: 14px;
  }
  .auth-gate-panel {
    padding: 18px;
  }
  .auth-gate-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .auth-gate-brand h1 {
    font-size: 21px;
  }
  .brand-mark-hero {
    width: 190px;
    height: 126px;
  }
  .auth-trigger {
    min-width: 62px;
    padding: 0 12px;
  }
  .auth-dialog {
    padding: 18px;
  }
}
