:root {
  --bg: #f9fbfe;
  --navy: #12214e;
  --blue: #2b76bd;
  --tab: #252525;
  --text: #324253;
  --muted: #7b8794;
  --line: #e2e8f0;
  --danger: #e93455;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, sans-serif;
  font-size: 16px;
}

a { color: #2b82d8; text-decoration: none; font-weight: 700; }

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: linear-gradient(#12214e, #12214e, #0866ff);
  color: #fff;
  padding: 20px;
  transform: translateX(-270px);
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 22px; margin-bottom: 26px; }
.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #0b1838;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.brand-logo.compact {
  width: 62px;
  height: 62px;
  border-color: #d8a943;
}
.coin-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffd21f;
  color: #fff;
  font-weight: 900;
  box-shadow: 14px 0 0 -8px #ffd21f, 25px 0 0 -16px #ffd21f;
}
.coin-mark.small { width: 52px; height: 52px; font-size: 30px; }

.side-link { display: block; padding: 13px 14px; color: #fff; border-radius: 5px; font-weight: 700; }
.side-link.active, .side-link:hover { background: rgba(255,255,255,.14); }

.main { width: 100%; overflow: hidden; }

.topbar {
  height: 93px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 20px 24px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(18, 33, 78, .06);
}

.hamburger {
  width: 43px;
  height: 43px;
  display: grid;
  gap: 5px;
  place-content: center;
  border: 0;
  background: transparent;
  margin-right: 18px;
}
.hamburger span { display: block; width: 30px; height: 3px; background: #8c9bae; border-radius: 2px; }

.wallet-btn, .login-btn {
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid #2b76bd;
  border-radius: 6px;
  background: #fff;
  color: #2b76bd;
  font-weight: 900;
  box-shadow: 0 5px 11px rgba(0,0,0,.03);
}
.login-btn { border-color: #d94966; color: #e93455; margin-left: 0; font-size: 18px; }
.customer-chip {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 900;
  text-decoration: none;
}

.intro-box {
  width: calc(100% - 40px);
  margin: 80px 20px 56px;
  min-height: 330px;
  padding: 86px 52px 30px;
  background: #fff;
  border: 2px solid #2b76bd;
  border-radius: 4px;
  font-size: 22px;
  line-height: 1.25;
  color: #2b2f37;
}

.brand-stamp {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 42px;
  color: #15223a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.intro-box h1 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 24px;
  line-height: 1.22;
  white-space: nowrap;
  font-weight: 900;
}

.intro-box h2 {
  margin: 72px 0 22px;
  font-size: 24px;
}
.intro-box p { margin: 20px 0; }
.intro-box .links { margin-top: 70px; }

.product-tabs { width: calc(100% - 40px); margin: 0 20px 60px; }
.tabs-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; width: 940px; max-width: none; }

.nav-tab {
  height: 61px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  background: var(--tab);
  color: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  font: 900 22px/1 Roboto, sans-serif;
  box-shadow: 0 5px 10px rgba(0,0,0,.22);
  cursor: pointer;
}
.nav-tab:first-child { min-width: 343px; }
.nav-tab img { width: 25px; height: 25px; object-fit: cover; }
.nav-tab.active {
  background: rgba(180,180,180,.38);
  color: #3a6b8f;
  box-shadow: 0 5px 10px rgba(0,0,0,.12);
}

.product-pane { display: none; }
.product-pane.active { display: block; }

.table-wrap { width: 100%; overflow-x: auto; }
.product-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}
.product-table th {
  height: 69px;
  background: #102052;
  color: #fff;
  border-right: 2px solid rgba(255,255,255,.9);
  padding: 12px 20px;
  text-align: center;
  font-size: 21px;
  font-weight: 900;
}
.product-table th img { width: 30px; height: 33px; vertical-align: middle; margin-right: 9px; object-fit: cover; }
.product-table .name-head { text-align: left; width: 54%; }
.product-table tr:nth-child(odd) { background: var(--bg); }
.product-table td {
  min-height: 112px;
  padding: 14px 20px;
  color: #000;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f7;
}
.product-name { display: flex; gap: 16px; align-items: center; line-height: 1.35; }
.product-name > img { width: 40px; max-height: 55px; object-fit: cover; flex: 0 0 auto; }
.name-product { font-weight: 400; }
.product-name span { display: block; margin-top: 7px; }
.flag-emoji {
  width: 30px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
}
.flag-image {
  width: 30px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6dee8;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}
.flag-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flag-fallback { letter-spacing: 0; }
.buy-btn {
  width: 112px;
  height: 31px;
  border: 0;
  border-radius: 4px;
  background: #0d6efd;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.buy-btn.disabled { background: #d13c4b; cursor: not-allowed; }
.empty { text-align: center; padding: 40px; }

.admin-body { background: #eef3f8; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-sidebar { background: #102052; color: #fff; padding: 24px 18px; }
.admin-sidebar h1 { font-size: 22px; margin: 0 0 24px; display: flex; align-items: center; gap: 10px; }
.admin-sidebar h1 .brand-logo { width: 46px; height: 46px; }
.admin-sidebar a { display: block; color: #fff; padding: 11px 12px; border-radius: 5px; font-weight: 700; }
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 4px 0 0 #ffd21f;
}
.admin-main { padding: 24px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-top h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stats div, .admin-panel, .login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18,33,78,.05);
}
.stats div { padding: 20px; }
.stats b { display: block; font-size: 30px; color: #102052; }
.stats span { color: var(--muted); }
.admin-panel { padding: 18px; margin-bottom: 18px; overflow-x: auto; }
.admin-panel.priority-panel { border: 1px solid #bfdbfe; box-shadow: 0 10px 26px rgba(37,99,235,.10); }
.admin-panel h3 { margin-top: 0; }
.admin-form { display: grid; gap: 10px; }
.admin-form.inline { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
.admin-form.grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.admin-form .wide-field { grid-column: 1 / -1; }
.admin-form input, .admin-form select, .admin-form textarea, .login-card input {
  min-height: 42px;
  border: 1px solid #cad5e1;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}
.admin-form textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}
.admin-form label { display: grid; gap: 6px; font-weight: 700; }
.admin-form .searchable-select span { font-size: 13px; }
.admin-form .searchable-select input,
.admin-form .searchable-select select { width: 100%; }
.admin-form button, .login-card button, .admin-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #0d6efd;
  color: #fff;
  padding: 0 16px;
  font-weight: 900;
}
.admin-button { display: inline-flex; align-items: center; justify-content: center; }
.muted-button { background: #64748b; color: #fff; }
.danger-row { margin-top: 10px; }
.danger-row button { background: #dc3545; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid #e8edf3; text-align: left; }
.admin-table small { display: block; color: var(--muted); margin-top: 4px; }
.admin-product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18,33,78,.05);
  padding: 18px;
  margin-bottom: 18px;
}
.product-edit-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  align-items: end;
}
.category-edit-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1.2fr) 90px 90px 80px;
  align-items: center;
}
.upload-field {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.upload-field img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #d6dee8;
}
.upload-field input[type="file"] {
  min-height: 0;
  padding: 7px;
}
.product-edit-grid .wide { grid-column: span 3; }
.inventory-state {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.inventory-state b { font-size: 24px; color: #102052; }
.inventory-state span, .inventory-state small { color: var(--muted); }
.country-select {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 8px;
}
.flag-preview {
  width: 34px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6dee8;
  border-radius: 4px;
  background: #fff;
  font-size: 18px;
}
.revenue-chart {
  height: 260px;
  display: grid;
  grid-template-columns: repeat(7, minmax(70px, 1fr));
  gap: 12px;
  align-items: end;
}
.chart-bar {
  height: 220px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  text-align: center;
  color: #334155;
  font-size: 13px;
}
.chart-fill {
  align-self: end;
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #0d6efd, #1f9d75);
}
.chart-bar b { font-size: 12px; color: #102052; }
.inventory-import {
  grid-template-columns: 1fr 150px;
  align-items: end;
  margin-top: 12px;
}
.inventory-panel { display: grid; gap: 14px; }
.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.inventory-toolbar p { margin: 6px 0 0; }
.inventory-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inventory-action-form {
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
}
.inventory-action-form select,
.inventory-action-form button {
  min-height: 36px;
}
.inventory-manager {
  display: grid;
  gap: 14px;
}
.inventory-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.inventory-page-head h2 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  font-weight: 500;
}
.inventory-page-head div {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #64748b;
}
.inventory-page-head a {
  color: #0d6efd;
  text-decoration: none;
}
.inventory-page-head b { font-weight: 500; }
.inventory-product-picker {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: flex-start;
}
.inventory-product-picker label {
  display: grid;
  gap: 5px;
  min-width: min(620px, 100%);
  font-weight: 700;
}
.inventory-product-picker select,
.inventory-product-picker button {
  min-height: 38px;
  border: 1px solid #cad5e1;
  border-radius: 5px;
  padding: 0 10px;
  font: inherit;
}
.inventory-product-picker button,
.btn-cyan {
  border: 0;
  background: #17a2b8;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inventory-card {
  background: #fff;
  border: 1px solid #d5dce6;
  border-top: 3px solid #22c55e;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(15,23,42,.14);
  overflow: hidden;
}
.inventory-card-red { border-top-color: #ff3154; }
.inventory-card-yellow { border-top-color: #ffc107; }
.inventory-card-head {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #e5eaf0;
}
.inventory-card-head h3 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 900;
}
.inventory-card-tools {
  display: flex;
  gap: 6px;
}
.inventory-card-tools button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.inventory-card-tools button:nth-child(1) { background: #16a34a; }
.inventory-card-tools button:nth-child(2) { background: #ffc107; color: #111827; }
.inventory-card-tools button:nth-child(3) { background: #dc3545; }
.inventory-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.inventory-card-body label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.inventory-card-body select,
.inventory-card-body textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 10px 12px;
  font: inherit;
}
.inventory-card-body select {
  min-height: 42px;
  background: #e9edf2;
}
.inventory-card-body textarea {
  min-height: 150px;
  resize: vertical;
}
.inventory-card-body textarea[readonly] {
  min-height: 230px;
  background: #e8ecf1;
  font: 14px/1.45 Consolas, monospace;
}
.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px !important;
}
.check-row input { margin-top: 3px; }
.inventory-card-foot {
  margin: 0 -18px -18px;
  padding: 14px 18px;
  background: #f7f7f7;
}
.btn-cyan {
  min-height: 38px;
  border-radius: 5px;
  padding: 0 14px;
}
.count-badge {
  display: inline-flex;
  min-width: 22px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  padding: 0 5px;
}
.count-badge.green { background: #22c55e; }
.count-badge.red { background: #dc3545; }
.count-badge.yellow { background: #ffc107; color: #111827; }
.inventory-detail-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #0d6efd;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}
.inventory-card.is-collapsed .inventory-card-body { display: none; }
.inventory-card.is-hidden { display: none; }
.inventory-card.is-maximized {
  position: fixed;
  z-index: 50;
  inset: 14px;
  overflow: auto;
}
.sr-label { font-size: 0; }
.sr-label textarea { font-size: 14px; }
.recharge-box {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 14px;
}
.muted { color: var(--muted); }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); padding: 26px; }
.login-card label { display: grid; gap: 7px; margin-bottom: 13px; font-weight: 700; }
.alert { padding: 10px 12px; background: #ffe8ec; color: #b4233b; border-radius: 6px; margin: 12px 0; }
pre { white-space: pre-wrap; background: #0b1220; color: #d8f0ff; border-radius: 6px; padding: 14px; }

@media (min-width: 1100px) {
  .sidebar { transform: none; }
  .main { margin-left: 270px; }
  .intro-box { margin-top: 42px; }
}

@media (max-width: 700px) {
  .topbar { height: 82px; padding: 15px 20px; }
  .wallet-btn, .login-btn { min-height: 46px; font-size: 15px; padding: 0 12px; }
  .login-btn { font-size: 16px; }
  .customer-chip { display: none; }
  .intro-box {
    width: calc(100% - 28px);
    margin: 52px 14px 44px;
    padding: 62px 20px 26px;
    font-size: 18px;
  }
  .brand-stamp { justify-content: center; margin-bottom: 34px; }
  .intro-box h1 { font-size: 20px; white-space: normal; }
  .intro-box h2 { font-size: 21px; }
  .product-tabs { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
  .tabs-grid { gap: 10px; width: 100%; }
  .nav-tab { flex-basis: 100%; font-size: 18px; padding: 0 18px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .stats, .admin-form.inline, .admin-form.grid { grid-template-columns: 1fr; }
  .profile-grid, .api-docs-grid, .api-endpoints { grid-template-columns: 1fr; }
  .profile-head, .api-docs-hero { display: grid; }
  .inventory-grid { grid-template-columns: 1fr; }
  .inventory-page-head { display: grid; }
  .inventory-product-picker { display: grid; }
  .product-edit-grid, .inventory-import { grid-template-columns: 1fr; }
  .category-edit-form { grid-template-columns: 1fr; }
  .product-edit-grid .wide { grid-column: auto; }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 34, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}
.sidebar { z-index: 50; overflow-y: auto; transition: transform .24s ease; }
body.menu-open .sidebar { transform: translateX(0); }
body.menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
.side-select, .side-balance {
  min-height: 38px;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 7px 14px;
  color: rgba(255,255,255,.88);
  border-radius: 5px;
}
.side-select span { font-size: 12px; opacity: .75; }
.side-select b, .side-balance { font-size: 14px; }
.side-balance { margin: 10px 0; background: rgba(255,255,255,.12); font-weight: 900; }
.side-link { width: 100%; border: 0; background: transparent; text-align: left; font: 700 15px/1.2 Roboto, sans-serif; cursor: pointer; }
.side-heading { margin: 18px 14px 8px; font-size: 12px; opacity: .68; font-weight: 900; letter-spacing: .5px; }
.side-submenu { display: none; padding: 0 0 4px 18px; }
.side-submenu.open { display: block; }
.side-sublink { display: block; color: rgba(255,255,255,.88); padding: 8px 12px; font-size: 14px; font-weight: 500; border-radius: 5px; }
.side-sublink:hover { background: rgba(255,255,255,.1); color: #fff; }
.site-footer { padding: 30px 20px 50px; text-align: center; color: #7b8794; }
.site-footer a { color: #526273; margin: 0 8px; }

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, .45);
  z-index: 100;
}
.modal.show { display: grid; }
body.modal-open { overflow: hidden; }
.modal-dialog { width: min(520px, 100%); }
.notification-dialog { width: min(560px, 100%); }
.bought-dialog { width: min(620px, 100%); }
.modal-card {
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 20px 55px rgba(0,0,0,.25);
  overflow: hidden;
  color: #243142;
}
.modal-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #edf1f5;
}
.modal-header h3 { margin: 0; font-size: 20px; color: #102052; }
.modal-close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: #5d6876; }
.modal-body { padding: 18px; display: grid; gap: 12px; }
.modal-body.compact { gap: 6px; }
.modal-body label { display: grid; gap: 6px; font-weight: 700; }
.danger-text { color: #b4233b; font-weight: 700; }
.form-control, .simple-form input {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 12px;
  font: inherit;
  width: 100%;
}
.coupon-row { display: none !important; }
.coupon-row.show { display: grid !important; }
.pay-total { padding: 12px; background: #f7fafc; border-radius: 5px; font-weight: 700; }
.pay-total b { color: #e93455; font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 18px; flex-wrap: wrap; }
.btn-primary, .btn-danger, .btn-secondary {
  min-height: 31px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  padding: 7px 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background: #0d6efd; }
.btn-danger { background: #dc3545; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-block { width: 100%; min-height: 42px; }
.btn-sm { min-height: 30px; font-size: 14px; }
.success-dialog { width: min(1000px, calc(100% - 16px)); }
.success-dialog .modal-card { position: relative; border-radius: 6px; }
.success-close {
  position: absolute;
  right: -16px;
  top: -18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
  font-size: 25px;
  cursor: pointer;
}
.success-body { justify-items: center; padding: 30px 30px 8px; }
.success-check {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #b8f0cf;
  background: #ecfff4;
  color: #22b86a;
  font-size: 34px;
  font-weight: 900;
}
.success-body h3 { margin: 6px 0 2px; color: #263142; font-size: 20px; }
.success-order-pill {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #8ef0bd;
  background: #edfff5;
  color: #08965a;
  font-size: 13px;
}
#orderAccounts {
  width: 100%;
  min-height: 228px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  background: #f8f8f9;
  font: 15px/1.55 Consolas, monospace;
  white-space: pre;
  overflow: auto;
}
.success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px 30px 34px;
}
.success-actions > * { min-height: 43px; border-radius: 10px; }
.blue-action { background: #18a8dc; }
.light-action { background: #f0f1f4; color: #111827; }
.status-pill {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eafaf1;
  color: #13804b;
  font-weight: 900;
}
.order-history-shell { display: grid; gap: 14px; text-align: left; }
.order-history-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-history-head h2 { margin: 0; color: #102052; }
.order-history-table small { display: block; color: #64748b; margin-top: 4px; }
.order-detail-page {
  min-height: 100vh;
  padding: 18px max(24px, calc((100vw - 1040px) / 2)) 44px;
  background: #f4f4f5;
  color: #0f1f2f;
}
.order-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.order-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.transaction-line { margin: 8px 0 16px; }
.order-product-card, .order-detail-card {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 6px 14px rgba(0,0,0,.16);
}
.order-product-card h1 { margin: 0 0 8px; font-size: 22px; font-weight: 500; }
.qty-badge, .pay-badge {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.qty-badge { background: #bc31c4; }
.pay-badge { background: #00a6c8; }
.order-product-card p { margin: 26px 0 0; font-size: 40px; line-height: 1.15; }
.order-section-title {
  margin: 56px 0 12px;
  padding: 13px 18px;
  border-radius: 7px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, #c12ab6, #070707);
  box-shadow: 0 4px 10px rgba(0,0,0,.22);
}
.order-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}
.show-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 8px 0 20px; }
.show-row select { min-width: 140px; min-height: 34px; border: 1px solid #cbd5e1; border-radius: 4px; }
.account-table { width: 100%; border-collapse: collapse; }
.account-table th {
  background: #bd35ad;
  color: #fff;
  padding: 10px;
  text-align: center;
}
.account-table td {
  border-bottom: 1px solid #202020;
  padding: 8px;
  vertical-align: middle;
  text-align: center;
}
.account-table textarea {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: #ececec;
  padding: 8px;
  font: 12px/1.35 Consolas, monospace;
}

.auth-page, .simple-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 18px;
}
.auth-page {
  background:
    linear-gradient(120deg, rgba(10, 24, 44, .72), rgba(21, 52, 94, .58)),
    url("/static/logo_clonetraucho.png") center / cover no-repeat fixed;
}
.simple-page { background: linear-gradient(120deg, rgba(18,33,78,.08), rgba(8,102,255,.08)), #f9fbfe; }
.auth-card, .simple-panel {
  width: min(512px, 100%);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 44px 40px 36px;
  box-shadow: 0 18px 42px rgba(8,18,39,.22);
}
.simple-panel { width: min(980px, 100%); }
.profile-panel { display: grid; gap: 18px; }
.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.profile-head h1 { margin-bottom: 4px; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.profile-grid section,
.profile-alert {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  background: #f8fafc;
}
.profile-grid h3 { margin-top: 0; }
.profile-grid p { margin: 8px 0; }
.profile-api, .api-status, .profile-alert { display: grid; gap: 10px; }
.profile-alert { background: #ecfdf5; border-color: #86efac; }
.profile-alert textarea {
  width: 100%;
  min-height: 84px;
  border: 1px solid #86efac;
  border-radius: 5px;
  padding: 10px;
  font: 13px/1.4 Consolas, monospace;
}
.api-docs-page {
  min-height: 100vh;
  padding: 28px;
  background: #f3f7fb;
  color: #172033;
}
.api-docs-hero,
.api-docs-grid,
.api-endpoints,
.api-errors {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
}
.api-docs-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.api-docs-hero h1 { margin: 0 0 6px; font-size: 32px; }
.api-docs-hero p { margin: 0; color: var(--muted); }
.api-docs-grid,
.api-endpoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.api-docs-page article,
.api-errors {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(18,33,78,.05);
}
.api-docs-page h2 { margin-top: 0; font-size: 19px; }
.api-docs-page pre {
  max-height: 360px;
  overflow: auto;
  font-size: 13px;
}
.deposit-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 16px;
  align-items: start;
}
.qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  background: #fff;
}
code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf2f7;
  color: #102052;
  overflow-wrap: anywhere;
}
.bank-page {
  min-height: 100vh;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 22px 18px 46px;
  background: #fff;
  border-top: 1px solid #d8d8d8;
}
.bank-contact {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #000;
  font-size: 15px;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}
.bank-card {
  width: min(768px, 100%);
  display: grid;
  grid-template-columns: 252px 1fr;
  border-radius: 5px;
  box-shadow: 0 14px 34px rgba(15,23,42,.14);
  overflow: hidden;
  background: #fff;
}
.bank-info-panel {
  background: #242424;
  color: #fff;
  padding: 58px 24px 30px;
}
.bank-brand-card {
  display: grid;
  place-items: center;
  min-height: 82px;
  margin-bottom: 16px;
  background: #fff;
}
.bank-brand-card .auth-brand { margin: 0; gap: 7px; }
.bank-brand-card .coin-badge { width: 36px; height: 36px; }
.bank-info-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.bank-info-item:first-of-type { border-top: 0; }
.bank-info-item > span {
  text-align: center;
  filter: grayscale(1) brightness(2);
}
.bank-info-item b {
  display: block;
  font-size: 16px;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 5px;
}
.bank-info-item strong {
  display: block;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.green-text { color: #9dff18 !important; }
.cyan-text { color: #00f3ff !important; }
.yellow-text { color: #fff500 !important; }
.copy-mini {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 2px;
  cursor: pointer;
  font-size: 14px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f6b037;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.bank-qr-panel {
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 22px 34px 28px;
  text-align: center;
}
.bank-qr-panel h1 {
  margin: 0 0 10px;
  color: #2490a6;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0;
}
.bank-qr-panel p {
  width: min(430px, 100%);
  margin: 0 0 4px;
  color: #111;
  font-size: 16px;
  line-height: 1.35;
}
.vietqr-logo {
  margin: 4px 0 10px;
  color: #e51f30;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
}
.vietqr-logo b { color: #2260a8; }
.bank-qr-image {
  width: min(335px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border: 2px solid #234377;
  background: #fff;
}
.bank-network {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  color: #157e73;
  font-size: 34px;
}
.bank-network b:first-child {
  color: #1f5591;
  font-size: 25px;
  font-style: italic;
}
.bank-network span { color: #273d6d; }
.bank-note {
  margin: 0;
  color: #64748b;
  font-weight: 900;
  text-align: center;
}
.bank-auto-note {
  margin: -4px 0 0;
  color: #64748b;
  font-weight: 700;
  text-align: center;
}
.bank-actions {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.bank-actions input {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0 12px;
  font: inherit;
}
.bank-history {
  width: min(980px, 100%);
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.bank-history summary {
  cursor: pointer;
  font-weight: 900;
  color: #102052;
}
.bank-back {
  color: #c01875;
  font-weight: 500;
}
.auth-brand {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.coin-badge {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffd21f;
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}
.coin-badge::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 9px;
  width: 30px;
  height: 14px;
  border-top: 3px solid #ffd21f;
  border-bottom: 3px solid #ffd21f;
}
.auth-social {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #374151;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
.social-mark {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.fb-mark { background: #2f66bd; font-family: Georgia, serif; }
.tk-mark { background: #111827; color: #fff; }
.auth-card h1, .simple-panel h1 { margin: 0 0 18px; color: #102052; }
.auth-card h1 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 31px;
  line-height: 1.1;
  letter-spacing: 0;
}
.auth-card label {
  display: grid;
  gap: 9px;
  color: #8a98b8;
  font-weight: 500;
  margin-bottom: 16px;
}
.auth-card label a { justify-self: end; font-size: 16px; font-weight: 500; }
.auth-card p { text-align: center; margin: 18px 0 0; color: #102052; }
.auth-card .form-control {
  min-height: 46px;
  border-color: #bcc8d6;
  border-radius: 5px;
  color: #475569;
  padding: 0 20px;
}
.auth-card .form-control::placeholder { color: #5f6f86; opacity: 1; }
.auth-card .btn-block {
  min-height: 46px;
  margin-top: 24px;
  border-radius: 5px;
  font-size: 16px;
}
.label-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.terms-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 14px !important;
  margin: 28px 0 6px !important;
  color: #102052 !important;
  font-weight: 400 !important;
}
.terms-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: #0d6efd;
}
.terms-row a { font-size: 16px !important; justify-self: auto !important; }
.simple-form { display: grid; gap: 10px; margin: 16px 0; }
.simple-panel pre { text-align: left; }
.toast-host { position: fixed; top: 18px; right: 18px; z-index: 200; display: grid; gap: 8px; }
.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: .2s ease;
  font-weight: 700;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #198754; }
.toast.error { background: #dc3545; }
.toast.warning { background: #f59e0b; }

@media (min-width: 1100px) {
  body:not(.menu-open) .sidebar-backdrop { display: none; }
}

@media (max-width: 700px) {
  .toast-host { left: 12px; right: 12px; }
  .toast { min-width: 0; max-width: none; }
  .modal-actions { justify-content: stretch; }
  .modal-actions > * { flex: 1 1 auto; }
  .deposit-grid { grid-template-columns: 1fr; }
  .qr-image { width: 100%; height: auto; max-height: 280px; }
  .bank-card { grid-template-columns: 1fr; }
  .bank-info-panel { padding: 24px; }
  .bank-qr-panel { padding: 22px 18px 26px; }
  .bank-qr-panel h1 { font-size: 21px; }
  .bank-network { font-size: 25px; gap: 12px; }
  .bank-network b:first-child { font-size: 19px; }
  .bank-actions { grid-template-columns: 1fr; }
  .success-actions, .order-filter-row { grid-template-columns: 1fr; }
  .success-body { padding-left: 16px; padding-right: 16px; }
  .success-actions { padding-left: 16px; padding-right: 16px; }
  .order-detail-page { padding: 14px; }
  .order-toolbar, .order-history-head { align-items: stretch; flex-direction: column; }
  .order-product-card p { font-size: 28px; }
}
.mini-form { display: flex; gap: 6px; align-items: center; }
.mini-form input, .mini-form select { width: 110px; min-height: 34px; border: 1px solid #cad5e1; border-radius: 5px; padding: 0 8px; }
.mini-form button { min-height: 34px; border: 0; border-radius: 5px; background: #0d6efd; color: #fff; font-weight: 900; padding: 0 10px; }
.wrap-form { flex-wrap: wrap; align-items: flex-start; }
.wrap-form input { width: 150px; }
.wrap-form select { width: 120px; }
.admin-table .mini-form { margin-bottom: 8px; }
.admin-table .mini-form:last-child { margin-bottom: 0; }
