:root {
  color-scheme: dark;
  --page: #070706;
  --ink: #fff8e8;
  --ink-soft: #e5d8ba;
  --muted: #a99c83;
  --line: rgba(255, 223, 157, 0.16);
  --line-strong: rgba(255, 220, 139, 0.34);
  --glass: rgba(18, 17, 14, 0.58);
  --glass-strong: rgba(25, 24, 19, 0.78);
  --gold: #d7ad56;
  --gold-2: #f2d88a;
  --green: #31c48d;
  --green-soft: rgba(49, 196, 141, 0.13);
  --red: #f16f6f;
  --red-soft: rgba(241, 111, 111, 0.13);
  --amber: #f2bd4d;
  --amber-soft: rgba(242, 189, 77, 0.14);
  --blue: #88b9ff;
  --blue-soft: rgba(136, 185, 255, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 8px;
  font-family:
    Nadeem, "Nadeem", Vazirmatn, IRANSans, "Noto Naskh Arabic",
    "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  direction:rtl;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.94), rgba(7, 7, 6, 0.78) 48%, rgba(7, 7, 6, 0.9)),
    url("./bc-hero.png") right center / cover fixed,
    var(--page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(230, 181, 78, 0.05), transparent 36%, rgba(255, 255, 255, 0.025) 72%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 240px);
  mix-blend-mode: screen;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}


.auth-register-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: black;
    font-size: 0.9rem;
    text-align: center;
}

.auth-register-link {
    color: #d8aa55;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}

    .auth-register-link:hover,
    .auth-register-link:focus {
        color: #f0c979;
        text-decoration: underline;
        text-underline-offset: 3px;
    }



.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  grid-template-columns: minmax(320px, 430px) minmax(280px, 420px);
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 28px;
}

.login-card,
.login-policy {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 12, 10, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  width:500px;
}

.login-card {
  padding: 18px;
}

.login-brand {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(242, 216, 138, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  display:flex;
  justify-content:space-between;
}

.login-brand img {
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 230, 165, 0.25);
  filter: none;
}

.login-brand strong,
.login-form h1,
.login-policy h2 {
  color: #fff4dc;
  letter-spacing: 0;
}

.login-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.login-brand span {
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.login-form h1,
.login-policy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.login-form p,
.login-policy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.login-form .field {
  width: 100%;
  min-width: 0;
}

.login-submit {
  min-height: 44px;
}

.login-error {
  border: 1px solid rgba(241, 111, 111, 0.32);
  border-radius: var(--radius);
  background: var(--red-soft);
  color: #ffc4c4;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
}

.login-policy {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(216, 171, 85, 0.12), rgba(13, 12, 10, 0.68));
}

.policy-list {
  display: grid;
  gap: 10px;
}

.policy-list span {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(242, 216, 138, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 18px;
  background: rgba(4, 4, 3, 0.64);
  border-left: 1px solid var(--line);
  box-shadow: 12px 0 46px rgba(0, 0, 0, 0.2);
  backdrop-filter: none;
}

.brand {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.brand img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 230, 165, 0.24);
  background: #0e0d0a;
}

.brand-title {
  color: var(--gold-2);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
}
.brand-text {
    display: flex;
    align-items: center;
    color: #c18a39;
}
.brand-subtitle {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.65;
}

.nav {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.nav-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 12px;
  text-align: right;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(216, 171, 85, 0.13);
  border-color: rgba(242, 216, 138, 0.28);
  color: #fff9e9;
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-button.locked {
  color: rgba(229, 216, 186, 0.5);
}

.nav-icon,
.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(242, 216, 138, 0.12);
  color: var(--gold-2);
  font-size: 13px;
  flex: 0 0 auto;
}

.source-box {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
  background: rgba(255, 255, 255, 0.045);
}

.source-box strong {
  color: var(--gold-2);
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  margin-top:14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 0 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 12, 10, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.topbar h1 {
  margin: 0;
  color: #fff6df;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0;
}

.topbar > div:first-child {
  min-width: 220px;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  min-width: 0;
  padding: 18px 18px 34px;
}

.toolbar {
 
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.toolbar-group .search {
  flex: 1 1 280px;
}

.toolbar-group .select {
  flex: 0 1 190px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.panel.flush-shadow {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 16px 16px 11px;
  border-bottom: 1px solid var(--line);
}

.panel-header > div {
  min-width: 0;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  color: #fff4dc;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.panel-body {
  padding: 16px;
}

.metric {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 15px;
}

.metric-button {
  width: 100%;
  text-align: right;
  border: 1px solid var(--line);
  color: inherit;
}

.metric-button:hover {
  border-color: rgba(242, 216, 138, 0.42);
  background: rgba(242, 216, 138, 0.08);
}

.metric.price-buy {
  border-color: rgba(49, 196, 141, 0.32);
  background: linear-gradient(180deg, rgba(49, 196, 141, 0.1), var(--glass));
}

.metric.price-sell {
  border-color: rgba(241, 111, 111, 0.3);
  background: linear-gradient(180deg, rgba(241, 111, 111, 0.1), var(--glass));
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  color: #fff6dd;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.metric-value.live-buy {
  color: #9ff0ca;
}

.metric-value.live-sell {
  color: #ffb1b1;
}

.metric-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.price-row,
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.price-row:last-child,
.kv-row:last-child {
  border-bottom: 0;
}

.price-row > *,
.kv-row > * {
  min-width: 0;
}

.price-row > :first-child,
.kv-row > :first-child {
  overflow-wrap: anywhere;
}

.label {
  color: var(--muted);
  font-size: 14px;
}

.value {
  color: #fff3d4;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
}

.grid.cols-3 > .badge {
  min-height: 34px;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.badge.green {
  color: #a8f3d2;
  background: var(--green-soft);
  border-color: rgba(49, 196, 141, 0.28);
}

.badge.red {
  color: #ffc4c4;
  background: var(--red-soft);
  border-color: rgba(241, 111, 111, 0.28);
}

.badge.amber {
  color: #ffe0a0;
  background: var(--amber-soft);
  border-color: rgba(242, 189, 77, 0.3);
}

.badge.blue {
  color: #cfe2ff;
  background: var(--blue-soft);
  border-color: rgba(136, 185, 255, 0.26);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  color: #fff4dc;
  padding: 7px 12px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn:hover {
  border-color: rgba(242, 216, 138, 0.5);
  background: rgba(242, 216, 138, 0.11);
}

.btn.primary {
  border-color: rgba(255, 225, 149, 0.54);
  background: linear-gradient(135deg, rgba(215, 173, 86, 0.95), rgba(142, 100, 35, 0.94));
  color: #11100c;
  font-weight: 800;
}

.btn.green {
  border-color: rgba(49, 196, 141, 0.42);
  background: rgba(20, 139, 94, 0.72);
  color: #effff8;
}

.btn.red {
  border-color: rgba(241, 111, 111, 0.45);
  background: rgba(180, 58, 58, 0.75);
  color: #fff2f2;
}

.btn.ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.btn.icon-only {
  min-width: 38px;
  width: 38px;
  padding: 0;
}

.field,
.select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 9, 8, 0.72);
  color: var(--ink);
  padding: 7px 10px;
  outline: none;
}

.field:focus,
.select:focus {
  border-color: rgba(242, 216, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(215, 173, 86, 0.12);
}

.field::placeholder {
  color: rgba(229, 216, 186, 0.45);
}

.field {
  min-width: 210px;
}

.field.small {
  min-width: 102px;
  width: 126px;
}

.field.date-field {
  min-width: 146px;
  width: 152px;
}

.search {
  min-width: min(340px, 100%);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 9, 8, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: right;
  vertical-align: middle;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(24, 22, 17, 0.96);
  color: #f4d994;
  font-weight: 800;
}

tr:hover td,
tr.selected td {
  background: rgba(242, 216, 138, 0.075);
}

tr[data-select-customer] {
  cursor: pointer;
}

tr[data-select-customer]:focus-visible td {
  outline: 2px solid rgba(242, 216, 138, 0.45);
  outline-offset: -2px;
}

tr:last-child td {
  border-bottom: 0;
}

.pnl-value {
  display: inline-block;
  color: #fff3d4;
  font-weight: 800;
  white-space: nowrap;
}

.pnl-value.green {
  color: #a8f3d2;
}

.pnl-value.red {
  color: #ffc4c4;
}

.pnl-value.amber {
  color: #ffe0a0;
}

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

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.pagination-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.draft-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 216, 138, 0.24);
  border-radius: var(--radius);
  background: rgba(201, 142, 43, 0.1);
}

.range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.range-value {
  color: var(--gold);
  font-size: 14px;
  white-space: nowrap;
}

.range-control {
  display: grid;
  gap: 7px;
}

.limit-range {
  width: 100%;
  min-width: 0;
  accent-color: var(--gold);
  cursor: pointer;
  background: transparent;
  -webkit-appearance: none;
}

.limit-range:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.limit-range::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(168, 243, 210, 0.44), rgba(242, 216, 138, 0.9), rgba(255, 196, 196, 0.46));
  border: 1px solid rgba(242, 216, 138, 0.2);
}

.limit-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #1b1710;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 216, 138, 0.14);
  -webkit-appearance: none;
}

.limit-range::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(168, 243, 210, 0.44), rgba(242, 216, 138, 0.9), rgba(255, 196, 196, 0.46));
  border: 1px solid rgba(242, 216, 138, 0.2);
}

.limit-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #1b1710;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 216, 138, 0.14);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 14px;
  align-items: start;
}

.side-detail {
  position: sticky;
  top: 104px;
  min-width: 0;
}

.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}

.table-empty {
  padding: 18px;
}

.balance-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.balance-card + .balance-card {
  margin-top: 10px;
}

.balance-value {
  color: #fff3d4;
  font-size: 19px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.balance-value.green,
.balance-note.green {
  color: #a8f3d2;
}

.balance-value.red,
.balance-note.red {
  color: #ffc4c4;
}

.balance-value.amber,
.balance-note.amber {
  color: #ffe0a0;
}

.balance-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

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

.activity-item {
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-soft);
  text-align: right;
}

.activity-item:hover {
  border-color: rgba(242, 216, 138, 0.32);
  background: rgba(242, 216, 138, 0.075);
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(215, 173, 86, 0.5);
}

.activity-dot.green {
  background: var(--green);
  box-shadow: 0 0 18px rgba(49, 196, 141, 0.46);
}

.activity-dot.red {
  background: var(--red);
  box-shadow: 0 0 18px rgba(241, 111, 111, 0.44);
}

.activity-dot.amber {
  background: var(--amber);
  box-shadow: 0 0 18px rgba(242, 189, 77, 0.44);
}

.activity-dot.blue {
  background: var(--blue);
  box-shadow: 0 0 18px rgba(136, 185, 255, 0.42);
}

.activity-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.activity-copy strong {
  color: #fff4dc;
  font-size: 15px;
  line-height: 1.55;
}

.activity-copy span,
.activity-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.health-list {
  display: grid;
  gap: 10px;
}

.health-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.health-item > div {
  min-width: 0;
}

.health-item strong {
  color: #fff2d0;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-line {
  display: grid;
  grid-template-columns: 112px minmax(120px, 1fr) 64px;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #94b8ff);
}

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

.form-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-row.full {
  grid-column: 1 / -1;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.switch-row:last-child {
  border-bottom: 0;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.toggle span::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  right: 3px;
  border-radius: 50%;
  background: #fff9ea;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.toggle input:checked + span {
  background: rgba(49, 196, 141, 0.62);
  border-color: rgba(49, 196, 141, 0.45);
}

.toggle input:checked + span::before {
  right: 23px;
}

.notice {
  border: 1px solid rgba(242, 216, 138, 0.22);
  background: rgba(242, 216, 138, 0.09);
  color: #f3ddb0;
  border-radius: var(--radius);
  padding: 12px;
  line-height: 1.85;
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  border: 1px solid var(--line-strong);
  background: rgba(9, 9, 8, 0.86);
  color: #fff7df;
  padding: 12px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: none;
  line-height: 1.8;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(4, 4, 3, 0.68);
  display: grid;
  place-items: center;
  padding: 18px;
  backdrop-filter: none;
}

.modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: rgba(18, 17, 14, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  color: #fff4dc;
}

.modal-body {
  padding: 16px;
}

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

.permission-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.permission-item input {
  margin-top: 6px;
  accent-color: var(--gold);
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--gold-2);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.muted {
  color: var(--muted);
}

.red-text {
  color: #ffc1c1;
}

.ltr {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .side-detail {
    position: static;
  }
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(180deg, rgba(7, 7, 6, 0.94), rgba(7, 7, 6, 0.86)),
      url("./bc-hero.png") center top / cover fixed,
      var(--page);
  }

  .login-shell {
    grid-template-columns: minmax(0, 520px);
    align-items: start;
    padding: 18px 14px 28px;
  }

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

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  .top-actions {
    justify-content: flex-start;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }

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

  .field,
  .search {
    min-width: 100%;
  }

  .toolbar-group .select,
  .toolbar-group .search {
    flex-basis: 100%;
  }

  table {
    min-width: 980px;
  }
}

/* Visual refresh: premium glass admin surface */
:root {
  --page: #050504;
  --ink: #fffaf0;
  --ink-soft: #eadfc8;
  --muted: #b5a98f;
  --line: rgba(255, 232, 174, 0.14);
  --line-strong: rgba(255, 229, 162, 0.3);
  --glass: rgba(17, 17, 15, 0.48);
  --glass-strong: rgba(20, 19, 17, 0.68);
  --glass-deep: rgba(7, 7, 6, 0.7);
  --gold: #d7ad56;
  --gold-2: #f7dc91;
  --gold-3: #9b6d27;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.12);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.12);
  --blue: #7dd3fc;
  --blue-soft: rgba(125, 211, 252, 0.11);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.22);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

body {
  background:
    linear-gradient(115deg, rgba(5, 5, 4, 0.97), rgba(5, 5, 4, 0.86) 42%, rgba(11, 9, 6, 0.92)),
    linear-gradient(180deg, rgba(255, 232, 174, 0.055), transparent 300px),
    url("./bc-hero.png") right center / cover fixed,
    var(--page);
  color: var(--ink);
  font-size: 16px;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 28%, rgba(215, 173, 86, 0.035) 68%, transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 9px);
  mix-blend-mode: screen;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.32)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
  opacity: 0.58;
}

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

.sidebar,
.topbar,
.panel,
.login-card,
.login-policy {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.026) 44%, rgba(255, 211, 130, 0.035)),
    var(--glass);
  box-shadow: var(--shadow), var(--inner-glow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(7, 7, 6, 0.68);
}

.brand,
.source-box,
.balance-card,
.activity-item,
.health-item,
.policy-list span,
.notice,
.draft-actions,
.pagination-bar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.034);
  border-color: rgba(255, 232, 174, 0.13);
  box-shadow: var(--inner-glow);
}

.brand {
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 13px;
}

.brand img,
.login-brand img {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.brand-title {
  color: #ffe6a6;
  font-size: 21px;
}

.brand-subtitle,
.source-box,
.panel-header p,
.metric-label,
.metric-note,
.activity-copy span,
.activity-copy small,
.balance-note,
.pagination-summary,
.range-scale,
.login-form p,
.login-policy p {
  color: var(--muted);
}

.nav {
  gap: 9px;
}

.nav-button {
  min-height: 48px;
  padding: 11px 12px;
  border-color: rgba(255, 232, 174, 0.08);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: var(--inner-glow);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav-button:hover {
  transform: translateX(-2px);
}

.nav-button:hover,
.nav-button.active {
  background: linear-gradient(135deg, rgba(215, 173, 86, 0.18), rgba(255, 255, 255, 0.04));
  border-color: rgba(247, 220, 145, 0.32);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--gold-2), var(--inner-glow);
}

.nav-icon,
.tool-icon {
  background: linear-gradient(145deg, rgba(247, 220, 145, 0.2), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(247, 220, 145, 0.17);
  color: #ffe8aa;
}

.main {
  position: relative;
  z-index: 1;
}

.content {
  padding: 20px 20px 38px;
}

.grid {
  gap: 16px;
}

.split {
  gap: 16px;
}

.panel {
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.panel:hover {
  border-color: rgba(247, 220, 145, 0.22);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.38), var(--inner-glow);
}

.panel.flush-shadow {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow-soft), var(--inner-glow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panel-header {
  padding: 17px 18px 12px;
  border-bottom-color: rgba(255, 232, 174, 0.11);
}

.panel-header h2,
.panel-header h3 {
  color: #fff0c8;
  font-size: 18px;
  font-weight: 850;
}

.panel-body {
  padding: 17px 18px 18px;
}

.metric {
  min-height: 140px;
  padding: 17px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
    rgba(19, 18, 16, 0.52);
}

.metric.price-buy {
  background:
    linear-gradient(145deg, rgba(52, 211, 153, 0.13), rgba(255, 255, 255, 0.028)),
    rgba(17, 17, 15, 0.5);
}

.metric.price-sell {
  background:
    linear-gradient(145deg, rgba(251, 113, 133, 0.12), rgba(255, 255, 255, 0.028)),
    rgba(17, 17, 15, 0.5);
}

.metric-value {
  color: #fff1c9;
  font-size: 27px;
  letter-spacing: 0;
}

.metric-value.live-buy {
  color: #9ff4ce;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.18);
}

.metric-value.live-sell {
  color: #ffb7c3;
  text-shadow: 0 0 20px rgba(251, 113, 133, 0.16);
}

.btn {
  min-height: 40px;
  padding: 8px 13px;
  border-color: rgba(255, 232, 174, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.026)),
    rgba(255, 255, 255, 0.04);
  color: #fff0ca;
  box-shadow: var(--inner-glow), 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(247, 220, 145, 0.46);
  background:
    linear-gradient(145deg, rgba(247, 220, 145, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.btn.primary {
  border-color: rgba(255, 234, 171, 0.6);
  background: linear-gradient(135deg, #ffe5a3, #d7ad56 48%, #8f651f);
  color: #15110a;
  box-shadow: 0 12px 26px rgba(215, 173, 86, 0.22), var(--inner-glow);
}

.btn.green {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.86), rgba(18, 120, 84, 0.82));
}

.btn.red {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.86), rgba(151, 43, 59, 0.82));
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.032);
}

.field,
.select {
  min-height: 40px;
  border-color: rgba(255, 232, 174, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.018)),
    rgba(8, 8, 7, 0.74);
  box-shadow: var(--inner-glow);
}

.field:focus,
.select:focus {
  border-color: rgba(247, 220, 145, 0.6);
  box-shadow: 0 0 0 3px rgba(215, 173, 86, 0.15), var(--inner-glow);
}

.badge {
  min-height: 26px;
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--inner-glow);
}

.table-wrap {
  border-color: rgba(255, 232, 174, 0.12);
  background: rgba(5, 5, 4, 0.3);
  box-shadow: var(--inner-glow);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #f8df9b;
  background:
    linear-gradient(180deg, rgba(26, 24, 20, 0.97), rgba(18, 17, 15, 0.94));
  border-bottom-color: rgba(247, 220, 145, 0.18);
}

td {
  background: rgba(255, 255, 255, 0.012);
}

tr:hover td,
tr.selected td {
  background: rgba(247, 220, 145, 0.08);
}

.activity-item,
.health-item {
  min-height: 74px;
}

.activity-item {
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.activity-item:hover {
  transform: translateY(-1px);
}

.activity-copy strong {
  color: #fff1cd;
  font-weight: 820;
}

.activity-stack {
  display: grid;
  gap: 12px;
}

.activity-list.collapsed {
  position: relative;
  overflow: hidden;
}

.activity-list.collapsed::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 88px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 7, 0.76));
}

.activity-item.activity-preview {
  opacity: 0.38;
  filter: none;
  transform: scale(0.992);
  border-color: rgba(255, 232, 174, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.activity-item.activity-preview:hover {
  opacity: 0.54;
  filter: none;
}

.activity-more {
  justify-self: center;
  min-width: 148px;
}

.balance-card {
  padding: 14px;
}

.balance-value {
  font-size: 20px;
}

.bar-track {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.bar-fill {
  background: linear-gradient(90deg, #f6d987, #34d399 58%, #7dd3fc);
  box-shadow: 0 0 18px rgba(247, 220, 145, 0.18);
}

.switch-row {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.toggle span {
  background: rgba(255, 255, 255, 0.12);
}

.toggle input:checked + span {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.72), rgba(247, 220, 145, 0.5));
}

.range-value {
  color: #ffe5a3;
}

.limit-range::-webkit-slider-runnable-track,
.limit-range::-moz-range-track {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.46), rgba(247, 220, 145, 0.95), rgba(251, 113, 133, 0.5));
}

.notice {
  color: #f6dfb0;
}

.toast {
  border-color: rgba(255, 232, 174, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.026)),
    rgba(10, 10, 9, 0.84);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), var(--inner-glow);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal {
  border-color: rgba(255, 232, 174, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.024)),
    rgba(15, 14, 12, 0.9);
  box-shadow: 0 28px 74px rgba(0, 0, 0, 0.42), var(--inner-glow);
}

.login-shell {
  background:
    linear-gradient(115deg, rgba(5, 5, 4, 0.34), rgba(5, 5, 4, 0.76)),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
}

.login-card,
.login-policy {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.032) 52%, rgba(215, 173, 86, 0.055)),
    rgba(13, 12, 10, 0.64);
}

.login-brand {
  background:
    linear-gradient(135deg, rgba(247, 220, 145, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.login-form h1,
.login-policy h2 {
  color: #fff0c8;
}

.login-error {
  box-shadow: var(--inner-glow);
}

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

@media (max-width: 860px) {
  body {
    font-size: 15px;
    background:
      linear-gradient(180deg, rgba(5, 5, 4, 0.96), rgba(5, 5, 4, 0.9)),
      url("./bc-hero.png") center top / cover fixed,
      var(--page);
  }

  .app-shell,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .topbar,
  .content {
    margin-left: 14px;
    margin-right: 14px;
  }

  .content {
    padding: 0 0 26px;
  }

  .panel-body {
    padding: 15px;
  }
}

@media (max-width: 520px) {
  .topbar h1 {
    font-size: 23px;
  }

  .metric-value {
    font-size: 24px;
  }

  .activity-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .activity-item > .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Current iteration: compact AKAY banner, softer reveal states, and denser admin tables */
.app-shell {
  grid-template-columns: 1fr;
}

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

.sidebar,
.brand,
.source-box {
  display: none;
}
.akay-banner {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  min-width: 106px;
  min-height: 50px;
  border: 1px solid rgba(255, 232, 174, 0.24);
  border-radius: var(--radius);
  color: #fff1c8;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.026)),
    rgba(10, 10, 9, 0.58);
  box-shadow: var(--inner-glow), 0 10px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-weight: 900;
}

.akay-banner span {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.page-heading {
  min-width: 0;
}

.page-heading h1 {
  font-size: 22px;
  line-height: 1.35;
}

.page-heading p {
  margin-top: 2px;
  font-size: 13px;
}

.banner-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.banner-nav.open {
  max-height: 190px;
  opacity: 1;
  padding-top: 10px;
  pointer-events: auto;
  transform: translateY(0);
}

.banner-nav .nav-button {
  min-height: 42px;
  justify-content: center;
  text-align: center;
  padding: 9px 12px;
}

.top-actions {
  gap: 7px;
}

.top-chip,
.admin-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 232, 174, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.028);
  color: var(--ink-soft);
  padding: 6px 10px;
  box-shadow: var(--inner-glow);
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}


.top-chip.green {
  color: #a8f3d2;
  border-color: rgba(52, 211, 153, 0.22);
  background: var(--green-soft);
}

.top-chip.red {
  color: #ffc4c4;
  border-color: rgba(251, 113, 133, 0.22);
  background: var(--red-soft);
}

.top-chip.amber {
  color: #ffe0a0;
  border-color: rgba(251, 191, 36, 0.24);
  background: var(--amber-soft);
}

.top-chip.blue {
  color: #d7f2ff;
  border-color: rgba(125, 211, 252, 0.22);
  background: var(--blue-soft);
}

.top-chip:hover,
.admin-chip:hover {
  border-color: rgba(247, 220, 145, 0.36);
  background:
    linear-gradient(145deg, rgba(247, 220, 145, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  color: #17120a;
  box-shadow: 0 0 0 1px rgba(247, 220, 145, 0.11), 0 12px 28px rgba(247, 220, 145, 0.1);
}

.admin-chip:hover small {
  color: rgba(23, 18, 10, 0.72);
}

.kpi-grid {
  gap: 10px;
}

.kpi-grid .metric {
  min-height: 98px;
  padding: 12px 13px;
  gap: 6px;
}

.kpi-grid .metric-value {
  font-size: 21px;
  line-height: 1.35;
}

.kpi-grid .metric-label,
.kpi-grid .metric-note {
  font-size: 12px;
}

.metric,
.health-item,
.balance-card,
.permission-item,
.activity-item,
tr td {
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.metric:hover,
.balance-card:hover,
.health-item:hover,
.permission-item:hover {
  border-color: rgba(247, 220, 145, 0.32);
  background:
    linear-gradient(145deg, rgba(247, 220, 145, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.042);
  box-shadow: var(--inner-glow), 0 14px 34px rgba(247, 220, 145, 0.08);
}

.btn:hover,
.nav-button:hover,
.akay-banner:hover,
.link-button:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 0 1px rgba(247, 220, 145, 0.12), 0 14px 32px rgba(247, 220, 145, 0.12), var(--inner-glow);
}

.btn:focus-visible,
.nav-button:focus-visible,
.akay-banner:focus-visible,
.link-button:focus-visible {
  outline: 2px solid rgba(247, 220, 145, 0.7);
  outline-offset: 3px;
}

.record-stack {
  position: relative;
  display: grid;
  gap: 12px;
}

.record-stack.collapsed::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 52px;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 7, 0.68));
}

tr.record-preview td,
.permission-item.record-preview {
  opacity: 0.38;
  filter: none;
}

tr.record-preview:hover td,
.permission-item.record-preview:hover {
  opacity: 0.58;
  filter: none;
}

.tx-filter-bar {
  align-items: stretch;
}

.tx-filter-grid {
  flex: 1 1 760px;
  display: grid;
  grid-template-columns: minmax(230px, 1.6fr) repeat(4, minmax(126px, 1fr));
  gap: 8px;
  width: 100%;
}

.tx-filter-grid .field,
.tx-filter-grid .select {
  width: 100%;
  min-width: 0;
}

.tx-filter-grid .search {
  min-width: 0;
}

.jalali-field {
  text-align: center;
}

.customer-detail-wide .table-wrap {
  margin-top: 0;
}

.ledger-table table {
  min-width: 1220px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .tx-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    margin: 14px;
  }

  .topbar-main,
  .top-actions {
    width: 100%;
  }

  .top-actions {
    align-items: stretch;
  }

  .top-chip,
  .admin-chip {
    flex: 1 1 132px;
    justify-content: center;
  }

  .banner-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tx-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .topbar-main {
    align-items: stretch;
    flex-direction: column;
  }

  .akay-banner {
    width: 100%;
  }

  .banner-nav,
  .kpi-grid,
  .tx-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-09-22: Frost glass palette */
:root {
  color-scheme: light;
  --page: #f4f7fa;
  --ink: #101311;
  --ink-soft: #343a40;
  --muted: #68717b;
  --line: rgba(52, 58, 64, 0.12);
  --line-strong: rgba(52, 58, 64, 0.22);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --glass-deep: rgba(244, 247, 250, 0.9);
  --gold: #3b82f6;
  --gold-2: #3b82f6;
  --gold-3: #343a40;
  --green: #14865f;
  --green-soft: rgba(20, 134, 95, 0.1);
  --red: #c43d4b;
  --red-soft: rgba(196, 61, 75, 0.09);
  --amber: #9a6700;
  --amber-soft: rgba(154, 103, 0, 0.09);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.1);
  --shadow: 0 22px 55px rgba(16, 19, 17, 0.09);
  --shadow-soft: 0 10px 28px rgba(16, 19, 17, 0.07);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

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

body {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 250, 0.92) 48%, rgba(170, 178, 189, 0.18)),
    linear-gradient(180deg, #f4f7fa, #eef2f6);
  color: var(--ink);
}

body::before {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.78), transparent 36%, rgba(59, 130, 246, 0.035) 72%, transparent),
    repeating-linear-gradient(135deg, rgba(52, 58, 64, 0.018) 0 1px, transparent 1px 12px);
  mix-blend-mode: normal;
  opacity: 0.78;
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), transparent 20%, transparent 82%, rgba(170, 178, 189, 0.12)),
    repeating-linear-gradient(90deg, rgba(52, 58, 64, 0.012) 0 1px, transparent 1px 7px);
  opacity: 0.7;
}

.sidebar,
.topbar,
.panel,
.login-card,
.login-policy {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58) 54%, rgba(170, 178, 189, 0.09)),
    var(--glass);
  box-shadow: var(--shadow), 0 0 0 1px var(--line), var(--inner-glow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panel:hover {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 24px 58px rgba(16, 19, 17, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.08), var(--inner-glow);
}

.panel.flush-shadow {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 250, 0.65)),
    var(--glass);
  box-shadow: var(--shadow-soft), 0 0 0 1px var(--line), var(--inner-glow);
}

.brand,
.source-box,
.balance-card,
.activity-item,
.health-item,
.policy-list span,
.notice,
.draft-actions,
.pagination-bar,
.permission-item {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 250, 0.62)),
    rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(16, 19, 17, 0.045), var(--inner-glow);
}

.brand img,
.login-brand img {
  box-shadow: 0 10px 24px rgba(16, 19, 17, 0.1);
}

.brand-title,
.topbar h1,
.page-heading h1,
.panel-header h2,
.panel-header h3,
.login-form h1,
.login-policy h2,
.activity-copy strong,
.health-item strong,
.metric-value,
.balance-value,
.value,
.modal-head h3 {
  color: var(--ink);
}

.brand-subtitle,
.source-box,
.topbar p,
.page-heading p,
.panel-header p,
.metric-label,
.metric-note,
.activity-copy span,
.activity-copy small,
.balance-note,
.pagination-summary,
.range-scale,
.login-form p,
.login-policy p,
.muted,
.admin-chip small {
  color: var(--muted);
}

.topbar {
  border-color: rgba(255, 255, 255, 0.9);
}

.akay-banner {
  border-color: rgba(52, 58, 64, 0.72);
  color: #f4f7fa;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), transparent 46%),
    #343a40;
  box-shadow: 0 12px 28px rgba(16, 19, 17, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.nav-button {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink-soft);
  box-shadow: var(--inner-glow);
}

.nav-button:hover,
.nav-button.active {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.09);
  color: #1d4f9b;
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--blue), var(--inner-glow);
}

.nav-button.locked {
  color: rgba(52, 58, 64, 0.48);
}

.nav-icon,
.tool-icon {
  border-color: rgba(59, 130, 246, 0.16);
  background: rgba(59, 130, 246, 0.09);
  color: #2869c7;
}

.top-chip,
.admin-chip {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 250, 0.62)),
    rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  box-shadow: 0 6px 16px rgba(16, 19, 17, 0.04), var(--inner-glow);
}

.top-chip:hover,
.admin-chip:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.09);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.1), var(--inner-glow);
}


.top-chip.green {
  color: #0e7654;
  border-color: rgba(20, 134, 95, 0.18);
  background: var(--green-soft);
}

.top-chip.red {
  color: #a92f3c;
  border-color: rgba(196, 61, 75, 0.18);
  background: var(--red-soft);
}

.top-chip.amber {
  color: #855a00;
  border-color: rgba(154, 103, 0, 0.18);
  background: var(--amber-soft);
}

.top-chip.blue {
  color: #245fb5;
  border-color: rgba(59, 130, 246, 0.2);
  background: var(--blue-soft);
}

.metric {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 250, 0.66)),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 9px 24px rgba(16, 19, 17, 0.05), var(--inner-glow);
}

.metric.price-buy {
  border-color: rgba(20, 134, 95, 0.16);
  background:
    linear-gradient(145deg, rgba(231, 248, 240, 0.86), rgba(255, 255, 255, 0.82)),
    rgba(255, 255, 255, 0.7);
}

.metric.price-sell {
  border-color: rgba(196, 61, 75, 0.14);
  background:
    linear-gradient(145deg, rgba(253, 237, 239, 0.82), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.7);
}

.metric:hover,
.balance-card:hover,
.health-item:hover,
.permission-item:hover {
  border-color: rgba(59, 130, 246, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(59, 130, 246, 0.07)),
    rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(59, 130, 246, 0.1), var(--inner-glow);
}

.metric.price-buy:hover {
  border-color: rgba(20, 134, 95, 0.3);
  box-shadow: 0 14px 34px rgba(20, 134, 95, 0.09), var(--inner-glow);
}

.metric.price-sell:hover {
  border-color: rgba(196, 61, 75, 0.28);
  box-shadow: 0 14px 34px rgba(196, 61, 75, 0.08), var(--inner-glow);
}

.metric-value.live-buy,
.balance-value.green,
.pnl-value.green,
.balance-note.green {
  color: var(--green);
  text-shadow: none;
}

.metric-value.live-sell,
.balance-value.red,
.pnl-value.red,
.balance-note.red,
.red-text {
  color: var(--red);
  text-shadow: none;
}

.balance-value.amber,
.pnl-value.amber,
.balance-note.amber,
.range-value {
  color: var(--amber);
}

.btn {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 250, 0.72)),
    rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  box-shadow: 0 7px 18px rgba(16, 19, 17, 0.06), var(--inner-glow);
}

.btn:hover,
.nav-button:hover,
.akay-banner:hover,
.link-button:hover {
  
    : none;
  border-color: rgba(59, 130, 246, 0.34);
  box-shadow: 0 11px 26px rgba(59, 130, 246, 0.12), var(--inner-glow);
}

.btn:hover {
  background: rgba(59, 130, 246, 0.09);
  color: #1d4f9b;
}

.btn.primary {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn.primary:hover {
  border-color: #2869c7;
  background: #2869c7;
  color: #ffffff;
}

.btn.green {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.btn.red {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.btn.ghost {
  background: rgba(244, 247, 250, 0.58);
}

.btn:focus-visible,
.nav-button:focus-visible,
.akay-banner:focus-visible,
.link-button:focus-visible,
tr[data-select-customer]:focus-visible td {
  outline-color: rgba(59, 130, 246, 0.78);
}

.field,
.select {
  border-color: rgba(52, 58, 64, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 4px 12px rgba(16, 19, 17, 0.035);
}

.field::placeholder {
  color: #8b95a1;
}

.field:focus,
.select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13), var(--inner-glow);
}

input:disabled,
select:disabled,
button:disabled {
  color: rgba(52, 58, 64, 0.5);
}

.badge {
  border-color: var(--line);
  background: rgba(244, 247, 250, 0.9);
  color: var(--ink-soft);
  box-shadow: var(--inner-glow);
}

.badge.green {
  color: #0e7654;
  border-color: rgba(20, 134, 95, 0.18);
  background: var(--green-soft);
}

.badge.red {
  color: #a92f3c;
  border-color: rgba(196, 61, 75, 0.18);
  background: var(--red-soft);
}

.badge.amber {
  color: #855a00;
  border-color: rgba(154, 103, 0, 0.18);
  background: var(--amber-soft);
}

.badge.blue {
  color: #245fb5;
  border-color: rgba(59, 130, 246, 0.2);
  background: var(--blue-soft);
}

.table-wrap {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--inner-glow);
}

th {
  color: #f4f7fa;
  background: #343a40;
  border-bottom-color: rgba(16, 19, 17, 0.18);
}

td {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.54);
  border-bottom-color: rgba(52, 58, 64, 0.08);
}

tr:hover td {
  background: rgba(170, 178, 189, 0.14);
}

tr.selected td {
  background: rgba(59, 130, 246, 0.1);
}

.activity-copy strong {
  font-weight: 820;
}

.activity-list.collapsed::after,
.record-stack.collapsed::after {
  background: linear-gradient(180deg, transparent, rgba(244, 247, 250, 0.94));
}

.activity-item.activity-preview,
.permission-item.record-preview,
tr.record-preview td {
  border-color: rgba(52, 58, 64, 0.08);
  background: rgba(244, 247, 250, 0.74);
}

.bar-track {
  background: rgba(170, 178, 189, 0.28);
  box-shadow: inset 0 1px 2px rgba(16, 19, 17, 0.1);
}

.bar-fill {
  background: linear-gradient(90deg, #3b82f6, #14865f);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.16);
}

.switch-row {
  border-bottom-color: rgba(52, 58, 64, 0.08);
}

.toggle span {
  background: rgba(170, 178, 189, 0.56);
}

.toggle span::before {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 19, 17, 0.18);
}

.toggle input:checked + span {
  background: #3b82f6;
}

.limit-range,
.permission-item input {
  accent-color: #3b82f6;
}

.limit-range::-webkit-slider-runnable-track,
.limit-range::-moz-range-track {
  background: linear-gradient(90deg, #aab2bd, #3b82f6);
  border-color: rgba(52, 58, 64, 0.12);
}

.limit-range::-webkit-slider-thumb,
.limit-range::-moz-range-thumb {
  border-color: #ffffff;
  background: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.notice {
  color: var(--ink-soft);
}

.toast {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 250, 0.82)),
    rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(16, 19, 17, 0.14), 0 0 0 1px var(--line), var(--inner-glow);
}

.modal-backdrop {
  background: rgba(16, 19, 17, 0.34);
}

.modal {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 250, 0.88)),
    rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 28px 74px rgba(16, 19, 17, 0.18), 0 0 0 1px var(--line), var(--inner-glow);
}

.login-shell {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.74), rgba(244, 247, 250, 0.9)),
    linear-gradient(180deg, #f4f7fa, #e9eef3);
}

.login-card,
.login-policy {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 250, 0.68)),
    rgba(255, 255, 255, 0.72);
}

.login-brand {
  border-color: var(--line);
  background: rgba(244, 247, 250, 0.74);
}

.login-brand strong {
  color: var(--ink);
}

.login-brand span {
  color: var(--muted);
}

.login-error {
  border-color: rgba(196, 61, 75, 0.18);
  background: var(--red-soft);
  color: #a92f3c;
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 250, 0.9)),
      var(--page);
  }
}

/* 2026-09-22: high-contrast glass cockpit refinement */
:root {
  --complement: #f59e0b;
  --complement-soft: rgba(245, 158, 11, 0.14);
  --glass: rgba(255, 255, 255, 0.5);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --glass-deep: rgba(223, 232, 241, 0.58);
  --line: rgba(52, 58, 64, 0.16);
  --line-strong: rgba(52, 58, 64, 0.3);
  --shadow: 0 24px 64px rgba(16, 19, 17, 0.14);
  --shadow-soft: 0 12px 32px rgba(16, 19, 17, 0.09);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body {
  background:
    linear-gradient(118deg, transparent 0 58%, rgba(59, 130, 246, 0.2) 58% 67%, transparent 67%),
    linear-gradient(142deg, rgba(16, 19, 17, 0.1) 0 13%, transparent 13% 72%, rgba(245, 158, 11, 0.11) 72% 76%, transparent 76%),
    linear-gradient(135deg, #dfe7ef 0%, #f4f7fa 42%, #e2ebf4 72%, #d8e3ee 100%);
  background-attachment: scroll;
}

body::before {
  background:
    linear-gradient(102deg, transparent 0 18%, rgba(255, 255, 255, 0.72) 18% 36%, transparent 36% 100%),
    repeating-linear-gradient(135deg, rgba(16, 19, 17, 0.024) 0 1px, transparent 1px 14px);
  opacity: 0.82;
}

body::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 26%, rgba(59, 130, 246, 0.03) 72%, rgba(16, 19, 17, 0.06)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 8px);
  opacity: 0.72;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 14px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  grid-column: 1;
  height: calc(100vh - 28px);
  margin: 14px 14px 14px 0;
  padding: 18px;
  overflow: hidden auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(16, 19, 17, 0.93), rgba(52, 58, 64, 0.87));
  box-shadow: 0 28px 70px rgba(16, 19, 17, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.13);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.app-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), transparent 44%, rgba(245, 158, 11, 0.05));
}

.sidebar-brandmark,
.side-nav,
.sidebar-status {
  position: relative;
  z-index: 1;
}

.sidebar-brandmark {
  display: flex;
  justify-content:space-between;
  padding: 7px 5px 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-brand img {
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 230, 165, 0.25);
}
.sidebar-wordmark {
    color: #f4f7fa;
    font-family: Arial, sans-serif;
    font-size: 31px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.sidebar-brand-line {
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b82f6 0 72%, #f59e0b 72% 100%);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.42);
}

.side-nav {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.side-nav .nav-button {
  position: relative;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
  color: #e9eff5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 15px;
  font-weight: 740;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.side-nav .nav-button:hover,
.side-nav .nav-button.active {
  border-color: rgba(255, 255, 255, 0.38);
  background: #3b82f6;
  color: #101311;
  transform: translateX(-4px);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.side-nav .nav-button.active::before {
  content: "";
  position: absolute;
  top: 9px;
  right: 0;
  bottom: 9px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.72);
}

.side-nav .nav-button.locked {
  color: rgba(233, 239, 245, 0.5);
  cursor: not-allowed;
}

.side-nav .nav-button.locked:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(233, 239, 245, 0.5);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.nav-arrow {
  color: rgba(255, 255, 255, 0.54);
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.nav-button:hover .nav-arrow,
.nav-button.active .nav-arrow {
  color: #101311;
  transform: translateX(-2px);
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd7df;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.sidebar-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(196, 61, 75, 0.64);
}

.sidebar-status-dot.online {
  background: #31b883;
  box-shadow: 0 0 12px rgba(49, 184, 131, 0.68);
}

.main {
  grid-column: 2;
}

.page-heading h1 {
  color: #101311;
  font-size: 24px;
}

.page-heading p {
  color: #58636e;
}

.top-chip,
.admin-chip {
  border-color: rgba(52, 58, 64, 0.14);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 7px 18px rgba(16, 19, 17, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.admin-chip {
  border-color: rgba(16, 19, 17, 0.78);
  background: #343a40;
  color: #ffffff;
  display:flex;
  flex-direction:column;
  gap:0px !important;
}

.admin-chip small,
.admin-chip:hover small {
  color: #c9d1d9;
}

.top-chip:hover,
.admin-chip:hover {
  border-color: #101311;
  background: #101311;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 19, 17, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.panel {
  overflow: hidden;
}

.panel:hover {
  border-color: rgba(59, 130, 246, 0.38);
  transform: translateY(-1px);
  box-shadow: 0 27px 68px rgba(16, 19, 17, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.12), var(--inner-glow);
}

.panel.flush-shadow {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(244, 247, 250, 0.2)),
    rgba(223, 232, 241, 0.3);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(52, 58, 64, 0.1), var(--inner-glow);
}

.panel-header {
  background: linear-gradient(90deg, rgba(52, 58, 64, 0.045), transparent 68%);
  border-bottom-color: rgba(52, 58, 64, 0.11);
}

.metric,
.balance-card,
.activity-item,
.health-item,
.permission-item,
.notice,
.draft-actions,
.pagination-bar,
.policy-list span {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.2)),
    rgba(223, 232, 241, 0.34);
  box-shadow: 0 10px 26px rgba(16, 19, 17, 0.08), 0 0 0 1px rgba(52, 58, 64, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.kpi-grid .metric:nth-child(3) {
  border-color: rgba(52, 58, 64, 0.24);
  background:
    linear-gradient(145deg, rgba(52, 58, 64, 0.13), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.34);
}

.metric.price-buy {
  background:
    linear-gradient(145deg, rgba(49, 184, 131, 0.18), rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.32);
}

.metric.price-sell {
  background:
    linear-gradient(145deg, rgba(196, 61, 75, 0.16), rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.32);
}

.metric-button {
  border-color: rgba(59, 130, 246, 0.36);
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.19), rgba(255, 255, 255, 0.26)),
    rgba(255, 255, 255, 0.32);
}

.metric-button:hover {
  border-color: #3b82f6;
  background: #101311;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(16, 19, 17, 0.26), 0 0 0 2px rgba(59, 130, 246, 0.32);
}

.metric-button:hover .metric-label,
.metric-button:hover .metric-note,
.metric-button:hover .metric-value {
  color: #ffffff;
}

.btn {
  border-color: rgba(52, 58, 64, 0.52);
  background: #343a40;
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(16, 19, 17, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn:hover,
.btn.ghost:hover,
.link-button:hover {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #101311;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(59, 130, 246, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn.primary {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #101311;
}

.btn.primary:hover {
  border-color: #101311;
  background: #101311;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 19, 17, 0.28), 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn.ghost {
  border-color: rgba(52, 58, 64, 0.18);
  background: rgba(255, 255, 255, 0.38);
  color: #343a40;
  box-shadow: var(--inner-glow), 0 7px 18px rgba(16, 19, 17, 0.06);
}

.btn:focus-visible,
.nav-button:focus-visible,
.link-button:focus-visible,
tr[data-select-customer]:focus-visible td {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.activity-item {
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.activity-item:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background: #3b82f6;
  color: #101311;
  transform: translateY(-3px);
  box-shadow: 0 17px 38px rgba(59, 130, 246, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.activity-item:hover .activity-copy strong,
.activity-item:hover .activity-copy span,
.activity-item:hover .activity-copy small,
.activity-item:hover .link-button {
  color: #101311;
}

.activity-item:hover .badge {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #101311;
}

.balance-card:hover,
.health-item:hover,
.permission-item:hover {
  border-color: rgba(59, 130, 246, 0.42);
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.17), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 15px 36px rgba(59, 130, 246, 0.13), var(--inner-glow);
}

.field,
.select {
  border-color: rgba(52, 58, 64, 0.24);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 7px 18px rgba(16, 19, 17, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.field:hover,
.select:hover {
  border-color: rgba(59, 130, 246, 0.58);
  background: rgba(255, 255, 255, 0.72);
}

.field:focus,
.select:focus {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 12px 28px rgba(59, 130, 246, 0.12);
}

.table-wrap {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 12px 30px rgba(16, 19, 17, 0.09), 0 0 0 1px rgba(52, 58, 64, 0.1), var(--inner-glow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

th {
  color: #f4f7fa;
  background: rgba(52, 58, 64, 0.96);
}

td {
  background: rgba(255, 255, 255, 0.38);
}

tr:hover td {
  background: rgba(170, 178, 189, 0.24);
}

tr[data-select-customer]:hover td,
tr[data-select-customer].selected td {
  background: #3b82f6;
  color: #101311;
}

tr[data-select-customer]:hover td *,
tr[data-select-customer].selected td * {
  color: #101311;
}

tr.selected:not([data-select-customer]) td {
  background: rgba(59, 130, 246, 0.18);
}

.badge {
  border-color: rgba(52, 58, 64, 0.16);
  background: rgba(255, 255, 255, 0.5);
}

.badge.amber {
  color: #805000;
  border-color: rgba(245, 158, 11, 0.34);
  background: var(--complement-soft);
}

.activity-list.collapsed::after,
.record-stack.collapsed::after {
  background: linear-gradient(180deg, transparent, rgba(223, 232, 241, 0.92));
}

.bar-fill {
  background: linear-gradient(90deg, #3b82f6 0 78%, #f59e0b 78% 100%);
}

.modal-backdrop {
  background: rgba(16, 19, 17, 0.46);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal,
.toast {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(244, 247, 250, 0.4)),
    rgba(223, 232, 241, 0.54);
  box-shadow: 0 30px 78px rgba(16, 19, 17, 0.24), 0 0 0 1px rgba(52, 58, 64, 0.12), var(--inner-glow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-shell {
  background:
    linear-gradient(118deg, transparent 0 58%, rgba(59, 130, 246, 0.21) 58% 67%, transparent 67%),
    linear-gradient(142deg, rgba(16, 19, 17, 0.12) 0 13%, transparent 13% 72%, rgba(245, 158, 11, 0.12) 72% 76%, transparent 76%);
}

.login-card,
.login-policy {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.24)),
    rgba(223, 232, 241, 0.42);
}

.login-brand {
  border-color: rgba(52, 58, 64, 0.2);
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .app-sidebar {
    padding: 15px;
  }
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(128deg, transparent 0 54%, rgba(59, 130, 246, 0.16) 54% 66%, transparent 66%),
      linear-gradient(145deg, #e1e9f1, #f4f7fa 48%, #dce7f1);
    background-attachment: scroll;
  }

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

  .app-sidebar {
    position: static;
    grid-column: 1;
    width: auto;
    height: auto;
    margin: 12px;
    padding: 14px;
  }

  .sidebar-brandmark {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 4px 13px;
  }

  .sidebar-brand-line {
    width: 90px;
  }

  .side-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin: 14px 0 0;
  }

  .side-nav .nav-button {
    min-height: 44px;
    justify-content: center;
    padding: 8px;
    text-align: center;
  }

  .side-nav .nav-button:hover,
  .side-nav .nav-button.active {
    transform: translateY(-2px);
  }

  .nav-arrow,
  .sidebar-status {
    display: none;
  }

  .main {
    grid-column: 1;
  }

  .topbar {
    margin-top: 0;
  }
}




@media (max-width: 620px) {
  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-nav .nav-button:last-child {
    grid-column: 1 / -1;
  }

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

  .top-actions {
    justify-content: stretch;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

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

  .toolbar,
  .toolbar-group,
  .row-actions,
  .top-actions {
    width: 100%;
    align-items: stretch;
  }

  .btn,
  .select,
  .field {
    width: 100%;
  }

  .brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .login-brand {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .login-brand img {
    width: 52px;
    height: 52px;
  }
}

/* 2026-09-22: interactive glass clarity and pagination contrast */
.pagination-actions .btn {
  min-width: 92px;
  border-color: rgba(52, 58, 64, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(223, 232, 241, 0.42)),
    rgba(255, 255, 255, 0.46);
  color: #101311;
  box-shadow:
    0 8px 22px rgba(16, 19, 17, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.pagination-actions .btn:hover:not(:disabled) {
  border-color: rgba(59, 130, 246, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(219, 233, 252, 0.76)),
    rgba(255, 255, 255, 0.82);
  color: #101311;
  transform: translateY(-2px);
  box-shadow:
    0 15px 34px rgba(59, 130, 246, 0.2),
    0 0 0 2px rgba(59, 130, 246, 0.16),
    inset 0 1px 0 #ffffff;
}

.pagination-actions .btn:active:not(:disabled) {
  border-color: #3b82f6;
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.28), rgba(255, 255, 255, 0.76)),
    rgba(219, 233, 252, 0.82);
  color: #101311;
  transform: translateY(0);
  box-shadow:
    0 7px 18px rgba(59, 130, 246, 0.18),
    inset 0 0 0 2px rgba(59, 130, 246, 0.24),
    inset 0 1px 0 #ffffff;
}

.pagination-actions .btn:focus-visible {
  color: #101311;
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.pagination-actions .btn:disabled {
  border-color: rgba(52, 58, 64, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(170, 178, 189, 0.2)),
    rgba(244, 247, 250, 0.34);
  color: rgba(16, 19, 17, 0.52);
  opacity: 1;
  box-shadow:
    0 5px 14px rgba(16, 19, 17, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.field,
.select {
  color: #101311;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.field:hover:not(:disabled),
.select:hover:not(:disabled) {
  border-color: rgba(59, 130, 246, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(219, 233, 252, 0.62)),
    rgba(255, 255, 255, 0.76);
  color: #101311;
  box-shadow:
    0 14px 32px rgba(59, 130, 246, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.16),
    inset 0 1px 0 #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.field:focus,
.field:focus-visible,
.select:focus,
.select:focus-visible {
  border-color: #3b82f6;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(214, 230, 252, 0.78)),
    rgba(255, 255, 255, 0.9);
  color: #101311;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.24),
    0 16px 38px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.field:disabled,
.select:disabled {
  border-color: rgba(52, 58, 64, 0.12);
  background: rgba(244, 247, 250, 0.38);
  color: rgba(16, 19, 17, 0.48);
  opacity: 1;
}

.form-row:focus-within .label,
.range-control:focus-within .label {
  color: #245fb5;
  font-weight: 800;
}

.range-control,
.permission-item,
.switch-row {
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.range-control:hover,
.permission-item:hover,
.permission-item:focus-within,
.switch-row:hover,
.switch-row:focus-within {
  border-color: rgba(59, 130, 246, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(219, 233, 252, 0.5)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    0 14px 32px rgba(59, 130, 246, 0.13),
    0 0 0 1px rgba(59, 130, 246, 0.12),
    inset 0 1px 0 #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.toggle:hover span,
.toggle input:focus-visible + span {
  background: rgba(59, 130, 246, 0.32);
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.toggle input:checked + span,
.toggle:hover input:checked + span {
  background: #3b82f6;
  box-shadow:
    0 8px 20px rgba(59, 130, 246, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.limit-range:hover,
.limit-range:focus-visible {
  filter: saturate(1.28) contrast(1.08);
}

.top-chip.green:hover,
.badge.green:hover {
  border-color: rgba(20, 134, 95, 0.52);
  background: rgba(20, 134, 95, 0.2);
  color: #085b40;
  box-shadow: 0 12px 28px rgba(20, 134, 95, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.top-chip.red:hover,
.badge.red:hover {
  border-color: rgba(196, 61, 75, 0.5);
  background: rgba(196, 61, 75, 0.18);
  color: #8f2531;
  box-shadow: 0 12px 28px rgba(196, 61, 75, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.top-chip.amber:hover,
.badge.amber:hover {
  border-color: rgba(245, 158, 11, 0.58);
  background: rgba(245, 158, 11, 0.22);
  color: #744800;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.top-chip.blue:hover,
.badge.blue:hover {
  border-color: rgba(59, 130, 246, 0.58);
  background: rgba(59, 130, 246, 0.2);
  color: #153f7d;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn.green:hover {
  border-color: #14865f;
  background: #14865f;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(20, 134, 95, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn.red:hover {
  border-color: #c43d4b;
  background: #c43d4b;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(196, 61, 75, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 480px) {
    .auth-register-prompt {
        flex-wrap: wrap;
        margin-top: 18px;
        padding-top: 15px;
        font-size: 0.85rem;
    }
}
