/* ============================================================
   EvoTrust Company — application styles (auth, dashboard, admin)
   ============================================================ */

/* ---------- auth ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-shell--wide { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }

.auth-aside {
  position: relative; padding: clamp(28px, 4vw, 52px); padding-bottom: clamp(28px, 4vw, 52px);
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-3) 78%);
  display: flex; flex-direction: column; overflow: hidden;
}
.auth-aside::before {
  content: ''; position: absolute; width: 540px; height: 540px; right: -220px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(248,250,252,.24), transparent 66%);
}
.auth-aside::after {
  content: ''; position: absolute; width: 360px; height: 360px; left: -160px; bottom: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside-body { margin-top: auto; margin-bottom: auto; padding: 40px 0; }
.auth-points { list-style: none; display: grid; gap: 16px; margin-top: 28px; }
.auth-points li { display: flex; gap: 11px; align-items: flex-start; color: rgba(255,255,255,.78); font-size: .92rem; }
.auth-points svg { flex: none; margin-top: 3px; color: var(--gold); }

.auth-quote { border-top: 1px solid rgba(255,255,255,.14); padding-top: 22px; }
.auth-quote p { color: rgba(255,255,255,.8); font-family: var(--font-display); font-size: 1rem; line-height: 1.5; margin-bottom: 16px; }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 4vw, 56px); background: var(--paper-2);
}
.auth-main--wide { align-items: flex-start; padding-top: clamp(28px, 5vw, 64px); padding-bottom: 64px; }
.auth-card {
  width: 100%; max-width: 460px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 3.4vw, 40px); box-shadow: var(--shadow);
}
.auth-main--wide .auth-card { max-width: 640px; }
.auth-back { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); margin-bottom: 20px; }
.auth-back:hover { color: var(--ink); }

.form-success { text-align: center; padding: 10px 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--success) 12%, var(--paper)); color: var(--success); display: grid; place-items: center; margin: 0 auto 20px; }
.acct-chip {
  display: inline-block; font-size: 1.3rem; font-weight: 700; letter-spacing: .1em;
  padding: 14px 24px; border-radius: 14px; background: var(--paper-2); border: 1px dashed var(--line-strong);
  margin: 14px 0 26px; color: var(--ink);
}

/* ---------- dashboard shell ---------- */
body.app-body { background: var(--paper-2); }
.app-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.app-scrim { position: fixed; inset: 0; background: rgba(10,20,15,.5); z-index: 190; opacity: 0; visibility: hidden; transition: all .3s; }

.app-sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--forest-3); color: rgba(255,255,255,.72);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin;
}
.app-sidebar .brand { margin: 0 8px 24px; }
.app-sidebar .brand .brand-text { color: #fff; }
.side-label { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.36); margin: 16px 12px 8px; }
.side-nav { list-style: none; display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px;
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.72); transition: all .18s;
}
.side-nav a svg { flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.is-active { background: rgba(248,250,252,.16); color: #fff; font-weight: 600; }
.side-nav a.is-active svg { color: var(--gold); opacity: 1; }
.side-nav .side-badge {
  margin-left: auto; font-size: .68rem; font-weight: 700; min-width: 19px; height: 19px; padding: 0 6px;
  border-radius: 999px; display: inline-grid; place-items: center; background: var(--gold); color: #14201a;
}
.side-nav .side-divider { height: 1px; background: rgba(255,255,255,.1); margin: 12px 6px; }
.side-foot { margin-top: auto; padding-top: 14px; }
.side-card {
  border-radius: 14px; padding: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; color: rgba(255,255,255,.7);
}
.side-card strong { display: block; color: #fff; font-size: .84rem; margin-bottom: 4px; }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 2.4vw, 34px); min-height: 72px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.app-topbar h1 { font-size: 1.12rem; margin: 0; letter-spacing: -.02em; }
.app-topbar .sub { font-size: .78rem; color: var(--muted); }
.app-topbar-spacer { flex: 1; }
.app-content { padding: clamp(18px, 2.6vw, 34px); display: grid; gap: clamp(16px, 2vw, 24px); align-content: start; }

.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-soft); display: inline-grid; place-items: center; cursor: pointer;
  transition: all .18s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid var(--paper); }

.avatar-ring { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); flex: none; display: grid; place-items: center; background: var(--forest); color: #fff; font-size: .8rem; font-weight: 700; }
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.3rem; border-width: 3px; }

.sidebar-toggle { display: none; }

/* notifications panel */
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  z-index: 60; overflow: hidden;
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.notif-head strong { font-size: .9rem; }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.notif-item:last-child { border-bottom: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex: none; }
.notif-item p { margin: 0; color: var(--ink); }
.notif-item small { color: var(--muted); font-size: .72rem; }
.notif-empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: .84rem; }

/* dashboard cards */
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(18px, 2.2vw, 26px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h2 { font-size: 1rem; margin: 0; letter-spacing: -.01em; }
.panel-head .link-arrow { font-size: .8rem; }

.balance-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-3) 82%);
  color: #fff; padding: clamp(22px, 2.8vw, 32px); display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-lg);
}
.balance-hero::after {
  content: ''; position: absolute; width: 380px; height: 380px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(248,250,252,.3), transparent 66%);
}
.balance-hero > * { position: relative; }
.balance-top { display: flex; align-items: center; gap: 14px; }
.balance-top .who strong { display: block; font-size: .95rem; color: #fff; }
.balance-top .who span { font-size: .78rem; color: rgba(255,255,255,.6); }
.balance-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.balance-amount { font-family: var(--font-display); font-size: clamp(2rem, 4.4vw, 2.9rem); letter-spacing: -.03em; color: #fff; line-height: 1; }
.balance-meta { display: flex; gap: 26px; flex-wrap: wrap; }
.balance-meta div strong { display: block; font-size: .95rem; color: #fff; }
.balance-meta div span { font-size: .74rem; color: rgba(255,255,255,.55); }
.balance-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .label { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.stat-card .label span.ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-soft); }
.stat-card .value { font-family: var(--font-display); font-size: 1.65rem; letter-spacing: -.02em; color: var(--ink); }
.stat-card .value.credit { color: var(--success); }
.stat-card .value.debit { color: var(--danger); }
.stat-card .foot { font-size: .74rem; color: var(--muted); margin-top: 4px; }

.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.quick-action {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper); transition: all .2s; color: var(--ink);
}
.quick-action:hover { border-color: var(--gold); background: var(--gold-soft); transform: translateY(-2px); }
.quick-action .qa-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--forest); }
[data-theme="night"] .quick-action .qa-ic { color: var(--gold); background: rgba(248,250,252,.14); }
.quick-action strong { font-size: .85rem; font-weight: 600; }
.quick-action small { font-size: .72rem; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 620px; }
table.data thead th {
  text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; padding: 13px 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--paper-2); }
table.data td strong { color: var(--ink); font-weight: 600; }
table.data .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.data .amt.credit { color: var(--success); }
table.data .amt.debit { color: var(--danger); }
.tx-party { display: flex; align-items: center; gap: 10px; }
.tx-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-3); color: var(--ink-soft); font-size: .74rem; font-weight: 700; flex: none; }
.tx-party strong { display: block; font-size: .86rem; }
.tx-party small { color: var(--muted); font-size: .74rem; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .7rem; font-weight: 600; text-transform: capitalize; }
.pill-ok { background: color-mix(in srgb, var(--success) 12%, var(--paper)); color: var(--success); }
.pill-warn { background: color-mix(in srgb, var(--warning) 14%, var(--paper)); color: var(--warning); }
.pill-bad { background: color-mix(in srgb, var(--danger) 12%, var(--paper)); color: var(--danger); }
.pill-muted { background: var(--paper-3); color: var(--muted); }
.pill-info { background: color-mix(in srgb, var(--info) 12%, var(--paper)); color: var(--info); }

.empty-state { text-align: center; padding: 44px 18px; color: var(--muted); font-size: .88rem; }
.empty-state svg { opacity: .35; margin-bottom: 12px; }

/* tabs */
.tabs { display: inline-flex; gap: 3px; padding: 4px; background: var(--paper-2); border-radius: 999px; border: 1px solid var(--line); }
.tabs a, .tabs button { padding: 8px 18px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--muted); border: 0; background: transparent; cursor: pointer; }
.tabs a.is-active, .tabs button.is-active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

/* transfer flow */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 26px; overflow-x: auto; padding-bottom: 4px; }
.stepper-item { display: flex; align-items: center; gap: 10px; flex: none; }
.stepper-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: .78rem; font-weight: 700; border: 1.5px solid var(--line-strong); color: var(--muted); background: var(--paper);
}
.stepper-item.is-done .stepper-num { background: var(--forest); border-color: var(--forest); color: #fff; }
[data-theme="night"] .stepper-item.is-done .stepper-num { background: var(--gold); border-color: var(--gold); color: #14201a; }
.stepper-item.is-current .stepper-num { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.stepper-label { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.stepper-item.is-current .stepper-label, .stepper-item.is-done .stepper-label { color: var(--ink); }
.stepper-line { width: clamp(18px, 3vw, 48px); height: 1.5px; background: var(--line-strong); margin: 0 12px; flex: none; }

.transfer-card { max-width: 720px; margin: 0 auto; width: 100%; }
.transfer-head { margin-bottom: 24px; }
.transfer-head h2 { font-size: 1.4rem; margin-bottom: 6px; }
.transfer-head p { font-size: .88rem; margin: 0; }

.otp-group { display: flex; gap: 10px; justify-content: center; margin: 22px 0; }
.otp-box {
  width: 54px; height: 64px; text-align: center; font-size: 1.6rem; font-weight: 700;
  border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans);
}
.otp-box:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }

.review-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.review-row:last-child { border-bottom: 0; }
.review-row span:first-child { color: var(--muted); }
.review-row span:last-child { font-weight: 600; text-align: right; color: var(--ink); word-break: break-word; }
.review-row.total { background: var(--paper-2); }
.review-row.total span:last-child { font-size: 1.1rem; }

/* payment slip */
.slip-wrap { max-width: 620px; margin: 0 auto; }
.slip {
  background: #fff; color: #16231c; border-radius: 18px; overflow: hidden;
  border: 1px solid #e3e7e3; box-shadow: var(--shadow-lg);
}
.slip-head { background: var(--forest); color: #fff; padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.slip-brand { display: flex; align-items: center; gap: 12px; }
.slip-brand strong { font-family: var(--font-display); font-size: 1.1rem; display: block; letter-spacing: -.02em; }
.slip-brand span { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.slip-status { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(142,224,182,.16); color: #8ee0b6; }
.slip-body { padding: 26px; }
.slip-amount { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: -.03em; color: #16231c; margin: 0 0 4px; }
.slip-ref { font-size: .78rem; color: #8b948d; }
.slip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 24px; padding-top: 22px; border-top: 1px dashed #d9ded9; }
.slip-grid div span { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8b948d; margin-bottom: 3px; }
.slip-grid div strong { font-size: .88rem; color: #16231c; word-break: break-word; }
.slip-foot { padding: 16px 26px; background: #f7f8f6; border-top: 1px solid #e9ece9; font-size: .72rem; color: #8b948d; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* settings / account details */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.detail-item span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.detail-item strong { font-size: .95rem; color: var(--ink); font-weight: 600; word-break: break-word; }
.profile-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: var(--radius); padding: 20px; background: color-mix(in srgb, var(--danger) 5%, var(--paper)); }
.danger-zone h3 { font-size: .95rem; color: var(--danger); margin-bottom: 6px; }
.danger-zone p { font-size: .84rem; margin-bottom: 14px; }

.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--forest); }

/* admin */
.admin-shell .app-sidebar { background: #101a15; }
.admin-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi .k-label { font-size: .78rem; color: var(--muted); }
.kpi .k-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--paper-2); color: var(--forest); }
.kpi .k-val { font-family: var(--font-display); font-size: 1.9rem; letter-spacing: -.02em; color: var(--ink); }
.kpi .k-foot { font-size: .74rem; color: var(--muted); margin-top: 4px; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); font-size: .82rem; color: var(--ink-soft); background: var(--paper);
}
.pagination a:hover { border-color: var(--line-strong); color: var(--ink); }
.pagination .is-current { background: var(--forest); color: #fff; border-color: var(--forest); }
[data-theme="night"] .pagination .is-current { background: var(--gold); color: #14201a; border-color: var(--gold); }

.select-bank { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.select-card {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; transition: all .2s; color: var(--ink);
}
.select-card:hover { border-color: var(--gold); background: var(--gold-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 200;
    transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg);
  }
  .app-sidebar.is-open { transform: none; }
  .sidebar-toggle { display: inline-grid; }
  .app-scrim { position: fixed; inset: 0; background: rgba(10,20,15,.5); z-index: 190; opacity: 0; visibility: hidden; transition: all .3s; }
  .app-scrim.is-visible { opacity: 1; visibility: visible; }
}
@media (max-width: 900px) {
  .auth-shell, .auth-shell--wide { grid-template-columns: 1fr; }
  .auth-aside { min-height: 200px; padding: 26px; }
  .auth-aside-body { padding: 18px 0; }
  .auth-aside-body .display { font-size: 1.7rem !important; }
  .auth-quote { display: none; }
  .auth-aside--compact .auth-points { display: none; }
  .opacity-aside { display: none; }
}
@media (max-width: 640px) {
  .app-content { padding: 14px; }
  .app-topbar { padding: 10px 14px; min-height: 62px; gap: 10px; }
  .app-topbar h1 { font-size: .98rem; }
  .app-topbar .sub { display: none; }
  .balance-meta { gap: 18px; }
  .otp-box { width: 44px; height: 54px; font-size: 1.3rem; }
  .slip-grid { grid-template-columns: 1fr; gap: 14px; }
  .panel { padding: 16px; }
  .review-row { font-size: .84rem; padding: 11px 14px; }
  .stepper-label { display: none; }
  .stepper-line { margin: 0 6px; }
  .auth-card { border: 0; box-shadow: none; background: transparent; padding: 4px; }
  .auth-main { background: var(--paper); padding: 18px; }
}

/* ---------- client notification count ---------- */
.notif-count {
  position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--paper); box-sizing: content-box;
}
.notif-mark {
  border: 0; background: transparent; color: var(--danger); font: inherit; font-size: .76rem;
  font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.notif-mark:hover { background: var(--gold-soft); }
.notif-item.is-unread { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.notif-item.is-unread p { font-weight: 600; }
.notif-item .notif-dot { opacity: 0; }
.notif-item.is-unread .notif-dot { opacity: 1; }
