/* Transtik console (seller + sys) — sidebar layout, dark theme */
:root {
  --bg: #070a12; --bg2: #0b101c; --panel: #101728; --panel2: #151d33;
  --line: #1f2942; --line2: #2a3556;
  --text: #e8edf7; --muted: #8b95ad; --dim: #5b657e;
  --accent: #22d3ee; --accent2: #6366f1;
  --good: #34d399; --warn: #fbbf24; --bad: #f87171;
  --grad: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }
img { max-width: 100%; }

.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { font-size: 19px; font-weight: 800; color: var(--text); display: block; padding: 4px 10px 2px; }
.side .logo b { color: var(--accent); }
.side .sub { color: var(--dim); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; padding: 0 10px; margin-bottom: 18px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 2px;
}
.side nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.side nav a.active { background: var(--panel2); color: var(--text); font-weight: 600; }
.side nav a.active .ico { filter: none; }
.side .foot { margin-top: 22px; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.side .foot a { color: var(--muted); display: block; padding: 6px 0; }
.side .foot a:hover { color: var(--text); }

.main { padding: 26px 32px 60px; max-width: 1160px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; }
.page-head .sub { color: var(--dim); font-size: 13.5px; margin-top: 3px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; padding: 20px; }
.panel + .panel, .panel + .spacer, .spacer { margin-top: 18px; }
.panel h3 { font-size: 15px; margin: 0 0 12px; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat b { font-size: 21px; display: block; letter-spacing: -.3px; }
.stat span { color: var(--dim); font-size: 12.5px; }

/* forms & buttons */
label { display: block; font-size: 12.5px; color: var(--muted); margin: 13px 0 5px; }
input, select, textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent2); }
textarea { min-height: 100px; resize: vertical; }
.hint { font-size: 12px; color: var(--dim); margin-top: 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--grad); color: #fff; border: 0; cursor: pointer; padding: 9px 17px;
  border-radius: 10px; font-size: 14px; font-weight: 600; font-family: inherit; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #f97316); }
.btn.good { background: linear-gradient(135deg, #059669, #34d399); }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row .btn { flex: 0 0 auto; }

/* badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.good { background: rgba(52,211,153,.14); color: var(--good); }
.badge.warn { background: rgba(251,191,36,.15); color: var(--warn); }
.badge.bad { background: rgba(248,113,113,.15); color: var(--bad); }
.badge.info { background: rgba(99,102,241,.18); color: #a5b4fc; }
.badge.dim { background: rgba(139,149,173,.13); color: var(--muted); }

/* tables */
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th { text-align: left; color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:hover td { background: rgba(255,255,255,.015); }
.empty { text-align: center; color: var(--dim); padding: 40px 16px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* steps / checklist */
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 13px; background: var(--bg2); }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--panel2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.step.done .n { background: var(--grad); color: #fff; }
.step b { display: block; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.step .right { margin-left: auto; align-self: center; white-space: nowrap; }

/* kyc image viewer */
.kyc-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kyc-imgs figure { margin: 0; }
.kyc-imgs img { width: 100%; border-radius: 10px; border: 1px solid var(--line2); background: #fff; min-height: 110px; object-fit: contain; }
.kyc-imgs figcaption { font-size: 12px; color: var(--dim); margin-top: 5px; text-align: center; }

/* tiers */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tier { border: 2px solid var(--line); border-radius: 13px; padding: 16px; cursor: pointer; text-align: center; background: var(--bg2); }
.tier:hover { border-color: var(--line2); }
.tier.selected { border-color: var(--accent); }
.tier b { font-size: 19px; display: block; }
.tier span { font-size: 12px; color: var(--dim); }

/* toast / modal */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel2); border: 1px solid var(--line2); color: var(--text);
  padding: 11px 20px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 300; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-mask { position: fixed; inset: 0; background: rgba(4,6,12,.72); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-mask.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 16px; padding: 26px; max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }

/* auth */
.auth-wrap { max-width: 400px; margin: 10vh auto; padding: 0 20px; }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .logo { font-size: 24px; font-weight: 800; color: var(--text); }
.auth-head .logo b { color: var(--accent); }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .main { padding: 20px 16px 50px; }
}
