﻿:root {
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #172033;
  --text: #253047;
  --muted: #6b768a;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --brand-3: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #16a34a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 256px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 12px clamp(16px, 5vw, 72px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  max-width: 100vw;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background:
    linear-gradient(#fff, #fff) 9px 7px / 12px 16px no-repeat,
    linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav a,
.nav button,
.tab,
.btn {
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.nav a,
.nav button,
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  background: transparent;
  color: var(--muted);
}

.nav a:hover,
.nav button:hover,
.tab:hover {
  background: #eef4ff;
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), #0ea5e9);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.btn:hover {
  color: #fff;
  transform: translateY(-1px);
}

.btn.secondary {
  background: #a1bdff57;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}

.btn.success {
  background: var(--success);
}

.btn.warning {
  background: var(--warning);
}

.btn.danger {
  background: var(--danger);
}

.btn.small {
  min-height: 3px;
  padding: 7px 7px;
  font-size: 0.84rem;
}

.mobile-menu-btn,
.drawer-backdrop,
.mobile-side-link {
  display: none;
}

.mobile-menu-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: currentColor;
  transition: 0.18s ease;
}

.mobile-menu-btn span + span {
  margin-top: 4px;
}

.nav-open .mobile-menu-btn span:nth-child(1),
.side-open .mobile-menu-btn span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .mobile-menu-btn span:nth-child(2),
.side-open .mobile-menu-btn span:nth-child(2) {
  opacity: 0;
}

.nav-open .mobile-menu-btn span:nth-child(3),
.side-open .mobile-menu-btn span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(44px, 7vw, 90px) clamp(16px, 6vw, 90px);
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.13), transparent 30rem),
    radial-gradient(circle at 88% 22%, rgba(6, 182, 212, 0.16), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 900;
}

.hero h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.metric,
.hero-panel,
.card,
.panel,
.auth-box,
.page-head,
.summary-grid article,
.mini-stats div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric {
  min-height: 112px;
  padding: 16px;
}

.metric b {
  display: block;
  color: var(--brand);
  font-size: 1.55rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-panel {
  padding: 26px;
}

.hero-panel h2,
.section h2,
.panel h2,
.card h3 {
  margin-top: 0;
  color: var(--ink);
}

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

.hero-panel .grid > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.section {
  padding: 58px clamp(16px, 6vw, 90px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card,
.panel {
  padding: 20px;
}

.card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(6px);
  box-shadow: var(--shadow);
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.sidebar-code {
  display: flex;
  align-items: center;
  min-height: 46px;
  margin-bottom: 10px;
  padding: 0 12px;
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 950;
}

.sidebar .tab {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.sidebar .tab.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.08));
  color: var(--brand);
}

.tab-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 0.62rem;
  font-weight: 950;
}

.content {
  width: 100%;
  max-width: 1480px;
  padding: 24px;
  overflow-x: hidden;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px;
}

.page-head h1 {
  margin: 4px 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.app-page,
.admin-page {
  background:
    linear-gradient(180deg, #f8fbff 0%, var(--page) 40%),
    var(--page);
}

.app-page .topbar,
.admin-page .topbar {
  min-height: 62px;
  padding: 10px 18px;
}

.icon-btn {
  width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: #eef4ff;
  color: var(--brand);
  font-size: 1.28rem;
}

.lang-pill,
.user-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--ink);
  font-size: 0.9rem;
}

.lang-pill {
  padding: 0 12px;
}

.user-pill {
  position: relative;
  gap: 8px;
  padding: 6px 12px 6px 42px;
}

.user-pill::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #93c5fd 0 4px, transparent 5px),
    radial-gradient(circle at 50% 82%, #93c5fd 0 8px, transparent 9px),
    #dbeafe;
}

.user-pill span {
  color: var(--muted);
  font-size: 0.72rem;
}

.user-pill b,
.user-pill a {
  color: var(--ink);
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: #eef4ff;
  color: var(--brand);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.breadcrumb a,
.breadcrumb span:first-child {
  color: var(--brand);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: start;
}

.profile-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  grid-template-areas:
    "primary side"
    "forms side";
  gap: 18px;
  align-items: start;
}

.profile-primary {
  grid-area: primary;
  display: grid;
  gap: 18px;
}

.profile-forms {
  grid-area: forms;
  display: grid;
  gap: 18px;
}

.profile-side {
  grid-area: side;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.profile-identity {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-identity h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.profile-identity p {
  margin: 4px 0 10px;
  color: var(--muted);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.balance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.24), transparent 12rem),
    linear-gradient(135deg, #1d4ed8, #0891b2);
  color: #fff;
  overflow: hidden;
}

.balance-hero span,
.balance-hero small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
}

.balance-hero strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.balance-hero .btn {
  flex: 0 0 auto;
  background: #fff;
  color: #1d4ed8;
  box-shadow: none;
}

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

.profile-stats article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.profile-stats span,
.section-title p {
  color: var(--muted);
}

.profile-stats span,
.profile-stats b {
  display: block;
}

.profile-stats b {
  margin-top: 5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.section-title {
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.12rem;
}

.section-title p {
  margin: 0;
}

.profile-card {
  padding: 0;
  overflow: hidden;
}

.profile-head {
  display: grid;
  justify-items: center;
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 1.6rem;
  font-weight: 950;
}

.avatar span {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--success);
}

.profile-head h2 {
  margin: 0;
}

.profile-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-section h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.94rem;
}

.info-grid,
.summary-grid,
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-chip {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: #eef4ff;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

.info-chip.success {
  background: #dcfce7;
  color: #166534;
}

.info-chip.info {
  background: #e0f2fe;
  color: #075985;
}

.profile-edit-btn {
  width: 100%;
  margin-top: 12px;
}

.token-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

code {
  padding: 3px 7px;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--ink);
}

.token-row code {
  overflow: hidden;
  color: var(--brand);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
}

.copy-btn {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.split-actions,
.payment-tabs,
.activity-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inline-form {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: #f8fafc;
}

.inline-form.show {
  display: block;
}

.payment-tabs {
  padding: 16px 18px 0;
}

.payment-tabs button,
.activity-tabs button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.payment-tabs button.active,
.activity-tabs button.active {
  background: #eef4ff;
  color: var(--brand);
}

.deposit-cta {
  width: calc(100% - 36px);
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 18px 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
  text-align: left;
}

.deposit-cta span {
  font-weight: 950;
}

.deposit-cta small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.8);
}

.deposit-cta b {
  font-size: 1.8rem;
}

.deposit-box {
  margin: 0 18px 18px;
}

.dashboard-main {
  display: grid;
  gap: 18px;
}

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.wallet-card {
  position: relative;
  min-height: 136px;
  padding: 18px;
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
}

.wallet-card.green {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.wallet-card.cyan {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.wallet-card.yellow {
  background: linear-gradient(135deg, #d97706, #facc15);
}

.wallet-card span,
.wallet-card small,
.wallet-card em {
  display: block;
}

.wallet-card b {
  display: block;
  margin: 8px 0;
  font-size: 1.35rem;
}

.wallet-card i {
  display: block;
  height: 5px;
  margin-top: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.9);
}

.wallet-card em {
  margin-top: 6px;
  text-align: right;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
}

.activity-panel {
  max-height: 520px;
  overflow: auto;
}

.activity-tabs {
  margin-bottom: 14px;
}

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

.activity-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.activity-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 950;
}

.activity-icon {
  width: 40px;
  height: 40px;
  background: #e0ecff;
  color: var(--brand);
}

.activity-item b,
.activity-item strong,
.activity-item span {
  display: block;
}

.activity-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.amount-plus {
  color: var(--success);
}

.amount-minus {
  color: var(--danger);
}

.product-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.product-grid,
.rental-grid,
.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.product-card,
.rental-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-stats div,
.summary-grid article {
  padding: 14px;
  background: #f8fbff;
}

.mini-stats b,
.summary-grid b {
  display: block;
  color: var(--brand);
  font-size: 1.25rem;
}

.mini-stats span,
.summary-grid span {
  color: var(--muted);
  font-size: 0.85rem;
}

.device-specs {
  color: var(--muted);
  font-size: 0.9rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.price-line b {
  color: var(--brand);
  font-size: 1.1rem;
}

.price-line span {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 900;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
}

.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.field {
  margin-bottom: 14px;
}

label,
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

input,
select,
textarea,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea,
.field textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.search-field {
  max-width: 440px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 950;
}

tr:hover td {
  background: #fbfdff;
}

.notice,
.alert {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #f8fbff;
}

.notice.error,
.alert.danger {
  border-left-color: var(--danger);
  background: #fff7f7;
  color: #991b1b;
}

.empty-state,
.loading {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(37, 99, 235, 0.74)),
    url("https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1800&q=82") center/cover no-repeat;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 64px);
}

.auth-brand {
  color: #fff;
}

.auth-brand .brand {
  margin-bottom: 42px;
  color: #fff;
}

.auth-brand h1 {
  max-width: 700px;
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.auth-brand p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-points span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.auth-box {
  width: 100%;
  padding: 28px;
}

.auth-box h1 {
  margin: 0 0 8px;
  color: var(--ink);
}

.auth-switch {
  margin-bottom: 0;
  text-align: center;
}

.auth-switch a {
  color: var(--brand);
  font-weight: 900;
}

.social-login {
  margin-top: 12px;
}

.error {
  margin: 12px 0 0;
  color: var(--danger);
  white-space: pre-wrap;
}

.ok {
  color: var(--success);
}

pre {
  max-width: 100%;
  overflow: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
}

.modal.show {
  display: flex;
}

.modal-content {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.close-btn {
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.text-right {
  text-align: right;
}

.mt-20 {
  margin-top: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.mb-20 {
  margin-bottom: 20px;
}

.gap-20 {
  gap: 20px;
}

@media (max-width: 1180px) {
  .profile-layout,
  .profile-v2,
  .hero {
    grid-template-columns: 1fr;
  }

  .profile-v2 {
    grid-template-areas:
      "primary"
      "forms"
      "side";
  }

  .profile-side {
    position: static;
    max-height: none;
  }
}

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

  .auth-brand {
    display: none;
  }

  .auth-box {
    justify-self: center;
    max-width: 480px;
  }
}

@media (max-width: 900px) {
  .app-page.side-open,
  .admin-page.side-open {
    overflow: hidden;
  }

  .app-page .mobile-menu-btn,
  .admin-page .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

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

  .app-page .sidebar,
  .admin-page .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(290px, 86vw);
    overflow-y: auto;
    box-shadow: 20px 0 48px rgba(15, 23, 42, 0.2);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .side-open .sidebar {
    transform: translateX(0);
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15, 23, 42, 0.42);
  }

  .side-open .drawer-backdrop {
    display: block;
  }

  .admin-page .topbar .nav {
    display: none;
  }

  .mobile-side-link {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 10px 14px;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  body:not(.app-page):not(.admin-page) .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

  body:not(.app-page):not(.admin-page) .topbar .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-open .topbar .nav {
    display: flex !important;
  }

  .topbar .nav a,
  .topbar .nav button,
  .topbar .nav .btn {
    width: 100%;
  }

  .hero {
    padding: 38px 16px;
  }

  .metrics,
  .wallet-grid,
  .info-grid,
  .summary-grid,
  .mini-stats,
  .profile-stats,
  .hero-panel .grid {
    grid-template-columns: 1fr;
  }

  .balance-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    width: 100%;
    padding: 16px;
    overflow-x: clip;
  }

  .page-head,
  .price-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-grid,
  .rental-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .lang-pill,
  .icon-btn {
    display: none;
  }

  .user-pill {
    flex: 0 1 auto;
    min-width: 42px;
    max-width: 132px;
    overflow: hidden;
  }

  .user-pill b {
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 1.05rem;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .section,
  .auth-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .token-row,
  .split-actions,
  .payment-tabs,
  .activity-tabs {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    grid-template-columns: 1fr;
    justify-items: start;
  }

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

}

/* Responsive hardening for tablet and mobile */
body,
.content,
.panel,
.card,
.page-head,
.profile-primary,
.profile-side,
.profile-forms,
.table-wrap {
  min-width: 0;
}

img,
video,
canvas {
  max-width: 100%;
}

@media (max-width: 1024px) {
  :root {
    --sidebar: 232px;
  }

  .content {
    padding: 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .product-grid,
  .rental-grid,
  .admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .profile-v2 {
    gap: 16px;
  }

  .balance-hero strong {
    font-size: clamp(1.9rem, 6vw, 3rem);
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 60px;
  }

  .app-page .topbar,
  .admin-page .topbar {
    min-height: 60px;
    padding: 8px 12px;
  }

  .app-page .brand,
  .admin-page .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-page .mobile-menu-btn,
  .admin-page .mobile-menu-btn {
    order: 2;
    margin-left: 0;
  }

  .app-page .topbar .nav,
  .admin-page .topbar .nav {
    order: 3;
    margin-left: 0;
  }

  .user-pill {
    max-width: 180px;
  }

  .user-pill span {
    display: none;
  }

  .page-head {
    padding: 16px;
  }

  .page-head h1 {
    font-size: 1.35rem;
  }

  .profile-primary,
  .profile-forms .panel,
  .profile-side {
    padding: 16px;
  }

  .profile-identity {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .balance-hero {
    padding: 18px;
  }

  .activity-panel,
  .profile-side {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 10px;
  }

  .brand {
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero,
  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: clamp(2rem, 11vw, 2.65rem);
  }

  .hero p {
    font-size: 0.98rem;
  }

  .actions,
  .profile-tags {
    width: 100%;
  }

  .actions .btn,
  .actions a,
  .balance-hero .btn,
  .profile-forms .btn,
  .deposit-box .btn {
    width: 100%;
  }

  .content {
    width: 100%;
    padding: 12px;
    overflow-x: clip;
  }

  .panel,
  .card,
  .auth-box {
    padding: 16px;
    border-radius: 12px;
  }

  .profile-primary {
    padding: 14px;
  }

  .profile-v2,
  .profile-primary,
  .profile-forms,
  .profile-side,
  .balance-hero {
    width: 100%;
    max-width: 100%;
  }

  .profile-identity {
    grid-template-columns: 1fr;
  }

  .profile-stats article,
  .summary-grid article,
  .mini-stats div {
    padding: 12px;
  }

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

  .activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .table-wrap {
    margin-left: -4px;
    margin-right: -4px;
    width: calc(100% + 8px);
    border-radius: 10px;
  }

  table {
    min-width: 620px;
  }
}

@media (max-width: 420px) {
  .brand::before {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;
  }

  .user-pill {
    max-width: 48px;
    padding-left: 36px;
    font-size: 0.82rem;
  }

  .user-pill b,
  .user-pill a {
    display: none;
  }

  .user-pill::before {
    left: 8px;
    width: 22px;
    height: 22px;
  }

  .page-head p,
  .section-title p,
  .balance-hero small {
    font-size: 0.9rem;
  }

  .balance-hero strong {
    font-size: 1.9rem;
  }

  input,
  select,
  textarea,
  .field input,
  .field select,
  .field textarea {
    min-height: 42px;
  }
}
.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.55);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.popup-box{
  width:min(680px,100%);
  max-height:90vh;
  overflow:auto;
  animation:popupIn .18s ease;
}

@keyframes popupIn{
  from{transform:scale(.96);opacity:0}
  to{transform:scale(1);opacity:1}
}
.switch-line{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  white-space:nowrap;
}

.switch-line input{
  width:18px;
  height:18px;
  cursor:pointer;
}

.table-wrap table td{
  vertical-align:middle;
}
#appNotice{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  width: 360px;
  max-width: calc(100vw - 24px);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.notice-item{
  padding:14px 16px;
  border-radius:12px;
  color:#fff;
  font-weight:600;
  box-shadow:0 10px 30px rgba(0,0,0,.18);
  animation: slideIn .22s ease;
}

.notice-success{ background:#16a34a; }
.notice-error{ background:#dc2626; }
.notice-info{ background:#2563eb; }

@keyframes slideIn{
  from{
    opacity:0;
    transform:translateX(30px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}
.action-group{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.action-group .btn{
  margin:0;
}

.btn-renew{
  background:linear-gradient(135deg,#f59e0b,#ea580c);
  color:#fff;
  border:none;
  font-weight:700;
  box-shadow:0 6px 18px rgba(234,88,12,.35);
  transition:.18s;
}

.btn-renew:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(234,88,12,.45);
}

.btn-renew:active{
  transform:translateY(0);
}
.tab{
  display:flex;
  align-items:center;
  gap:12px;
}

.tab-icon-wrap{
  width:38px;
  height:38px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f3f6fb;
  border:1px solid #e5e7eb;
  flex:none;
  transition:.2s;
}

.tab-icon-wrap i{
  font-size:18px;
  color:#334155;
}

.tab:hover .tab-icon-wrap{
  background:#eef4ff;
  border-color:#bfd4ff;
  transform:translateY(-1px);
}

.tab.active .tab-icon-wrap,
.admin-link .tab-icon-wrap{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  border-color:transparent;
  box-shadow:0 8px 20px rgba(37,99,235,.25);
}

.tab.active .tab-icon-wrap i,
.admin-link .tab-icon-wrap i{
  color:#fff;
}

.admin-link{
  text-decoration:none;
}
/* desktop */
.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.nav{
    display:flex;
    align-items:center;
    gap:12px;
}

.user-pill{
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
}

/* tablet */
@media (max-width: 1024px){
    .topbar{
        display:grid;
        grid-template-columns: 1fr auto auto;
        align-items:center;
        gap:10px;
    }

    .brand{
        order:1;
    }

    .nav{
        order:2;
        justify-self:end;
    }

    .mobile-menu-btn{
        order:3;
        justify-self:end;
    }

    /* Xin chÃ o Ä‘á»©ng trÆ°á»›c nÃºt menu */
    .user-pill{
        margin-right:6px;
        font-size:14px;
    }
}

/* mobile */
@media (max-width: 830px){
    /* áº©n Xin chÃ o user */
    .user-pill{
        display:none !important;
    }

    .topbar{
        display:flex;
        justify-content:space-between;
    }

    .mobile-menu-btn{
        margin-left:auto;
    }
}
.product-shop-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
  gap:20px;
}

.shop-product-card{
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 8px 28px rgba(15,23,42,.08);
  border:1px solid #e5e7eb;
}

.product-img-box{
  position:relative;
  height:260px;
  background:#eef2f7;
  display:flex;
  align-items:center;
  justify-content:center;
}

.product-img-box img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.stock-badges{
  position:absolute;
  left:12px;
  bottom:12px;
  display:flex;
  gap:8px;
}

.stock-badge{
  min-width:44px;
  height:30px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  font-size:13px;
  font-weight:800;
  color:#111827;
}

.stock-badge.red{
  background:#ef476f;
  color:#fff;
}

.stock-badge.yellow{
  background:#ffca3a;
}

.shop-product-body{
  padding:18px;
}

.shop-product-body h3{
  margin:0 0 4px;
  font-size:20px;
  font-weight:800;
  color:#1f2937;
}

.shop-product-body p{
  margin:0 0 14px;
  color:#6b7280;
  font-size:14px;
}

.spec-box{
  border:1px solid #c7d2fe;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:14px;
}

.spec-title{
  background:#4f46e5;
  color:#fff;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}

.spec-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
}

.spec-grid div{
  padding:12px;
  border-right:1px solid #e5e7eb;
  border-bottom:1px solid #e5e7eb;
}

.spec-grid span{
  display:block;
  font-size:11px;
  color:#64748b;
  text-transform:uppercase;
  margin-bottom:4px;
}

.spec-grid b{
  font-size:14px;
  color:#1e293b;
}

.price-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:14px;
}

.price-box div{
  padding:14px;
}

.price-box div:first-child{
  border-right:1px solid #bfdbfe;
}

.price-box span{
  display:block;
  font-size:12px;
  color:#64748b;
  text-transform:uppercase;
  margin-bottom:6px;
}

.price-box b{
  color:#0ea5e9;
  font-size:18px;
}

.rent-action{
  display:flex;
  gap:10px;
}

.rent-action input{
  width:80px;
}

.rent-btn{
  flex:1;
}

.soldout-btn{
  width:100%;
  background:#9ca3af !important;
  color:#fff;
  cursor:not-allowed;
  font-weight:800;
}

.terms-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:14px 0;
  font-size:14px;
  color:#334155;
}

.terms-check input{
  margin-top:3px;
  width:18px;
  height:18px;
}

.rent-btn{
  width:100%;
  justify-content:center;
  font-weight:800;
}
.rent-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.rent-phone-qty{
  grid-column:1 / -1;
}

.rent-check input{
  width:18px;
  height:18px;
  flex:none;
  margin:0;
}

@media(max-width:768px){
  .rent-form-grid{
    grid-template-columns:1fr;
  }

  .rent-phone-qty{
    grid-column:auto;
  }
}
.rent-check-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:5px 0;
}

.rent-check{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid #dbe3ef;
  border-radius:12px;
  background:#f8fafc;
  cursor:pointer;
  font-size:10px;
  font-weight:400;
  color:#334155;
  margin:0;
}

.rent-check:hover{
  background:#eef4ff;
  border-color:#bfd4ff;
}

.rent-check input{
  width:18px;
  height:18px;
  margin:0;
  flex:none;
}

@media(max-width:768px){
  .rent-check-row{
    grid-template-columns:1fr;
  }
}
.rent-price-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:16px 0;
}

.rent-price-box div{
  background:#f8fafc;
  border:1px solid #dbe3ef;
  border-radius:12px;
  padding:12px 14px;
}

.rent-price-box span{
  display:block;
  font-size:12px;
  color:#64748b;
  margin-bottom:4px;
}

.rent-price-box b{
  font-size:16px;
  color:#0f172a;
}

@media(max-width:768px){
  .rent-price-box{
    grid-template-columns:1fr;
  }
}

.rent-check-row-pro{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin:16px 0;
}

.rent-check-pro{
  align-items:flex-start;
  padding:12px 14px;
}

.rent-check-pro span{
  display:block;
}

.rent-check-pro b{
  display:block;
  font-size:14px;
  color:#0f172a;
  margin-bottom:4px;
}

.rent-check-pro small{
  display:block;
  font-size:12px;
  color:#64748b;
  line-height:1.4;
}

.rent-actions-pro{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
}

.rent-pay-btn{
  width:100%;
  justify-content:center;
  font-weight:800;
  font-size:16px;
  padding:14px 18px;
}

@media(max-width:768px){
  .rent-check-row-pro,
  .rent-actions-pro{
    grid-template-columns:1fr;
  }
}
.phone-summary-grid{
  grid-template-columns:repeat(4,1fr);
}

.stat-card{
  border-radius:16px;
  padding:18px;
  border:1px solid transparent;
}

.stat-card b{
  font-size:30px;
  display:block;
  margin-bottom:4px;
}

.stat-card span{
  font-size:14px;
  font-weight:700;
}

.stat-total{
  background:#eef2ff;
  border-color:#c7d2fe;
}

.stat-total b,
.stat-total span{
  color:#3730a3;
}

.stat-online{
  background:#ecfdf5;
  border-color:#bbf7d0;
}

.stat-online b,
.stat-online span{
  color:#047857;
}

.stat-empty{
  background:#fffbeb;
  border-color:#fde68a;
}

.stat-empty b,
.stat-empty span{
  color:#b45309;
}

.stat-rented{
  background:#eff6ff;
  border-color:#bfdbfe;
}

.stat-rented b,
.stat-rented span{
  color:#1d4ed8;
}

@media(max-width:900px){
  .phone-summary-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media(max-width:520px){
  .phone-summary-grid{
    grid-template-columns:1fr;
  }
}
.custom-card {
    margin-top:20px;
}
/* Gmail verification and action feedback */
.btn.is-loading {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.btn:disabled {
  opacity: 0.78;
  transform: none;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  display: inline-block;
  animation: btnSpin .7s linear infinite;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}


.view-password-layout,
.security-password-layout {
  display: grid;
  gap: 14px;
}

.view-password-actions,
.security-password-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.view-password-actions .btn,
.security-password-actions .btn {
  min-width: 126px;
}

.gmail-verify-layout {
  display: grid;
  gap: 14px;
}

.otp-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.otp-line .btn {
  white-space: nowrap;
}

.otp-status {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

.otp-status.active {
  color: var(--brand);
}

.gmail-verify-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.gmail-verify-actions .btn {
  min-width: 118px;
}

.otp-actions {
  align-items: center;
}

@media (max-width: 640px) {
  .otp-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .otp-line .btn {
    width: auto;
    padding-left: 12px;
    padding-right: 12px;
  }
  .gmail-verify-actions {
    justify-content: flex-end;
  }
  .view-password-actions,
  .security-password-actions {
    justify-content: flex-end;
  }
  .view-password-actions .btn,
  .security-password-actions .btn {
    width: auto;
  }

}

/* Profile information popup */
.profile-info-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-address-field {
  grid-column: 1 / -1;
}

.locked-input,
.field input.locked-input:disabled {
  background: #eef2f7;
  color: #64748b;
  border-color: #d6dee9;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.profile-info-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.profile-info-actions .btn {
  min-width: 118px;
}

@media (max-width: 640px) {
  .profile-info-layout {
    grid-template-columns: 1fr;
  }
  .profile-info-actions {
    justify-content: flex-end;
  }
  .profile-info-actions .btn {
    width: auto;
  }
}

.rotate-token-actions { justify-content: flex-end; margin-top: 10px; }
.rotate-token-actions .btn { min-width: 112px; }

/* v0.6 - rental device table refinements */
.rental-alias-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}
.rental-alias-input {
  min-width: 150px;
  height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.device-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.device-id-text {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
}
.copy-icon-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4ff;
  color: var(--brand);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.copy-icon-btn:hover {
  transform: translateY(-1px);
  background: #dbeafe;
}
@media (max-width: 760px) {
  .rental-alias-box {
    min-width: 190px;
  }
  .rental-alias-input {
    min-width: 120px;
  }
  .device-id-text {
    font-size: .98rem;
  }
}

/* v0.7 - rental actions menu and device password */
.rental-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.rental-menu-wrap {
  position: relative;
  display: inline-flex;
}
.icon-menu-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
}
.icon-menu-btn:hover {
  background: #eef4ff;
  color: var(--brand);
}
.rental-menu {
  display: none;
  position: fixed;
  top: auto;
  left: auto;
  z-index: 9999;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  max-height: min(280px, calc(100vh - 24px));
  overflow-y: auto;
}
.rental-menu.show {
  display: grid;
  gap: 6px;
}
.rental-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.rental-menu button:hover {
  background: #eef4ff;
  color: var(--brand);
}

/* v0.22: stable clean-url home mobile navigation */
body:not(.app-page):not(.admin-page) .topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible !important;
}
body:not(.app-page):not(.admin-page) .mobile-menu-btn {
  display: none;
}
@media (max-width: 760px) {
  body:not(.app-page):not(.admin-page) .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 0 0 auto;
  }
  body:not(.app-page):not(.admin-page) .topbar .nav {
    position: fixed !important;
    top: 68px !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 1200 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18) !important;
  }
  body.nav-open:not(.app-page):not(.admin-page) .topbar .nav {
    display: flex !important;
  }
  body:not(.app-page):not(.admin-page) .topbar .nav a,
  body:not(.app-page):not(.admin-page) .topbar .nav .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* v0.23: home mobile menu hard fix + remember login */
.remember-login-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.remember-login-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
body:not(.app-page):not(.admin-page) #homeMenuBtn {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1401 !important;
}
@media (max-width: 760px) {
  body:not(.app-page):not(.admin-page) .topbar {
    overflow: visible !important;
  }
  body:not(.app-page):not(.admin-page) #homeMenuBtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    margin-left: auto !important;
  }
  body:not(.app-page):not(.admin-page) #siteNav {
    position: fixed !important;
    top: 68px !important;
    left: 14px !important;
    right: 14px !important;
    z-index: 1400 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 22px 60px rgba(15,23,42,.18) !important;
  }
  body.nav-open:not(.app-page):not(.admin-page) #siteNav {
    display: flex !important;
  }
  body:not(.app-page):not(.admin-page) #siteNav a,
  body:not(.app-page):not(.admin-page) #siteNav .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-title-row h3 { margin: 0 0 4px; }
.product-editor-card { margin-bottom: 16px; border-color: rgba(37, 99, 235, .25); }
@media (max-width: 720px) {
  .section-title-row { flex-direction: column; align-items: stretch; }
}

/* v0.26 - product create/edit popup */
.product-list-head {
  align-items: center;
}
.product-editor-popup {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(37, 99, 235, .22);
}
@media (max-width: 720px) {
  .product-list-head .btn {
    width: 100%;
  }
}


/* v0.27 - lock page behind popup */
html.popup-scroll-lock,
body.popup-scroll-lock {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
body.popup-scroll-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  touch-action: none;
}
.popup-overlay {
  overscroll-behavior: contain;
  touch-action: none;
}
.popup-box {
  overscroll-behavior: contain;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}

/* v0.28 - popup danh sÃ¡ch device theo model ADB */
.adb-devices-popup {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding-top: 24px;
}
.popup-close-icon {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(15, 23, 42, .08);
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.popup-close-icon:hover {
  background: rgba(239, 68, 68, .12);
  color: #dc2626;
  border-color: rgba(239, 68, 68, .3);
}
.popup-title-with-close {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 42px;
}
.adb-devices-popup code {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .06);
  font-weight: 800;
}
.icon-copy-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
}

/* v0.29 - Ä‘á»“ng bá»™ icon Ä‘Ã³ng popup trang user */
.user-popup-box {
  position: relative;
}
.user-popup-box > .popup-close-icon {
  position: sticky;
  top: 0;
  float: right;
  margin: -6px -6px 8px 12px;
  background: rgba(255,255,255,.9);
}
.user-popup-box .section-title {
  clear: both;
}

/* v0.30 support links and footers */
.support-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.support-float a {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255,255,255,.35);
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease;
}
.support-float a:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 18px 40px rgba(15,23,42,.28); }
.support-float a span { line-height: 1; font-size: 18px; }
.site-footer {
  margin-top: 48px;
  padding: 42px clamp(18px, 5vw, 76px) 22px;
  background: #0f172a;
  color: #e2e8f0;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.site-footer h3,.site-footer h4 { margin: 0 0 10px; color: #fff; }
.site-footer p { margin: 0; color: #cbd5e1; }
.site-footer-bottom {
  max-width: 1180px;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(148,163,184,.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}
.mini-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 28px);
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.75);
}
.config-save-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
@media (max-width: 780px) {
  .site-footer-grid { grid-template-columns: 1fr; }
  .site-footer-bottom, .mini-footer { flex-direction: column; align-items: flex-start; }
  .support-float a { width: 42px; height: 42px; }
}

/* v0.31 colorful support, footer links, config media and save effect */
.support-float-colorful { gap: 12px; }
.support-float-colorful a {
  position: relative;
  width: 54px;
  height: 54px;
  overflow: visible;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
  box-shadow: 0 16px 38px rgba(15,23,42,.25), inset 0 1px 0 rgba(255,255,255,.25);
}
.support-float-colorful a::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  background: inherit;
  opacity: .18;
  filter: blur(8px);
  z-index: -1;
}
.support-float-colorful a span { font-size: 21px; font-weight: 1000; letter-spacing: -.5px; }
.support-float-colorful a em {
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(15,23,42,.92);
  color: white;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(15,23,42,.22);
  transition: opacity .16s ease, transform .16s ease;
}
.support-float-colorful a:hover em { opacity: 1; transform: translateY(-50%) translateX(0); }
.support-zalo { background: linear-gradient(135deg,#0ea5e9,#2563eb) !important; }
.support-facebook { background: linear-gradient(135deg,#2563eb,#1d4ed8) !important; }
.support-youtube { background: linear-gradient(135deg,#ef4444,#dc2626) !important; }
.support-tiktok { background: linear-gradient(135deg,#111827,#ec4899) !important; }
.support-phone { background: linear-gradient(135deg,#f59e0b,#f97316) !important; animation: supportPulse 1.8s ease-in-out infinite; }
@keyframes supportPulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.06); } }
.site-footer-rich .site-footer-grid { grid-template-columns: 1.35fr .9fr .95fr; }
.site-footer .footer-links a {
  color: #e0f2fe;
  text-decoration: none;
  display: inline-block;
  margin: 2px 0;
  font-weight: 700;
}
.site-footer .footer-links a:hover { color: #fff; text-decoration: underline; }
.media-config-row { align-items: stretch; }
.image-config-field { min-width: 260px; }
.image-config-preview {
  height: 116px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(14,165,233,.08));
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 10px;
}
.image-config-preview img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.image-config-field input[type=file] { height: auto; padding: 10px; background: white; }
.image-config-field .btn { margin-top: 8px; }
.save-success-toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-width: 260px;
  border-radius: 18px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  box-shadow: 0 24px 60px rgba(21,128,61,.28);
  transform: translateY(-14px) scale(.96);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.save-success-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.save-success-toast .save-check {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.45);
  font-weight: 1000;
  font-size: 20px;
}
.save-success-toast b { display:block; line-height: 1.1; }
.save-success-toast small { display:block; opacity: .88; margin-top: 2px; }
@media (max-width: 780px) {
  .support-float-colorful a { width: 48px; height: 48px; }
  .support-float-colorful a em { display: none; }
  .site-footer-rich .site-footer-grid { grid-template-columns: 1fr; }
  .save-success-toast { left: 14px; right: 14px; top: 14px; min-width: 0; }
}

/* v0.32 settings blocks and built-in policy pages */
.settings-stack { display: grid; gap: 18px; }
.admin-config-block { padding: 22px; overflow: hidden; }
.admin-config-block .row { margin-top: 14px; }
.settings-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(148,163,184,.18); }
.settings-block-head h3 { margin: 4px 0 6px; font-size: 20px; }
.settings-block-head p { margin: 0; color: #64748b; line-height: 1.45; }
.policy-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.settings-save-bar { position: sticky; bottom: 14px; z-index: 20; display: flex; justify-content: flex-end; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.82); border: 1px solid rgba(148,163,184,.22); box-shadow: 0 18px 50px rgba(15,23,42,.12); backdrop-filter: blur(16px); }
.policy-page { min-height: 100vh; background: linear-gradient(180deg,#f8fbff 0%,#eef6ff 52%,#f8fafc 100%); color: #0f172a; }
.policy-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(18px,4vw,58px); background: rgba(255,255,255,.86); border-bottom: 1px solid rgba(148,163,184,.18); backdrop-filter: blur(16px); }
.policy-brand { font-size: 20px; font-weight: 1000; color: #0f172a; text-decoration: none; }
.policy-topbar nav { display: flex; gap: 12px; flex-wrap: wrap; }
.policy-topbar nav a { color: #2563eb; font-weight: 800; text-decoration: none; }
.policy-shell { width: min(980px, calc(100% - 28px)); margin: 0 auto; padding: 42px 0 80px; }
.policy-hero { padding: 36px; border-radius: 30px; color: #fff; background: radial-gradient(circle at 20% 0%, rgba(96,165,250,.42), transparent 24rem), linear-gradient(135deg,#1d4ed8,#0f172a); box-shadow: 0 30px 80px rgba(37,99,235,.22); }
.policy-hero h1 { margin: 8px 0 12px; font-size: clamp(30px,5vw,54px); line-height: 1.04; letter-spacing: -1.2px; }
.policy-hero p { margin: 0; max-width: 760px; color: #dbeafe; font-size: 17px; line-height: 1.65; }
.policy-card { margin-top: 22px; padding: clamp(22px,4vw,38px); border-radius: 28px; background: rgba(255,255,255,.92); border: 1px solid rgba(148,163,184,.18); box-shadow: 0 20px 60px rgba(15,23,42,.08); }
.policy-card h2 { margin: 22px 0 8px; font-size: 22px; color: #0f172a; }
.policy-card h2:first-child { margin-top: 0; }
.policy-card p { margin: 0; color: #334155; line-height: 1.72; }
@media (max-width: 720px) {
  .settings-block-head { flex-direction: column; }
  .policy-shortcuts { justify-content: flex-start; }
  .settings-save-bar { bottom: 8px; }
  .policy-topbar { align-items: flex-start; flex-direction: column; }
  .policy-hero { padding: 26px; border-radius: 24px; }
}

/* v0.33 responsive header, logo, footer and settings guides */
.brand.has-logo::before { display: none; }
.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  margin-right: 9px;
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
}
.brand span,
.policy-brand span { vertical-align: middle; }
.brand:has(.brand-logo-img)::before,
.policy-brand:has(.brand-logo-img)::before { display: none; }
.policy-brand .brand-logo-img { width: 32px; height: 32px; }

.config-guide {
  margin: 14px 0 0;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(37,99,235,.16);
  background: linear-gradient(135deg, rgba(37,99,235,.07), rgba(6,182,212,.06));
  color: #334155;
  line-height: 1.55;
  font-size: 13px;
}
.config-guide b { color: #0f172a; }

.profile-email-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gmail-check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(34,197,94,.28);
}
.rent-check a { color: var(--brand); text-decoration: none; font-weight: 800; }
.rent-check a:hover { text-decoration: underline; }

.support-float {
  right: max(28px, calc(env(safe-area-inset-right) + 22px));
  bottom: max(30px, calc(env(safe-area-inset-bottom) + 24px));
}
.site-footer h3 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.04em;
}
.site-footer .footer-links a,
.site-footer .footer-links {
  font-weight: 500;
}
.site-footer .footer-links a { color: #dbeafe; }
.site-footer .footer-links a:hover { color: #fff; }
.site-footer-bottom,
.mini-footer { text-align: left; }

@media (max-width: 867px) {
  .topbar .nav a[href="/"],
  .topbar .nav .header-home-link { display: none !important; }
}
@media (max-width: 1024px) {
  .site-footer-bottom,
  .mini-footer {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}
@media (max-width: 780px) {
  .support-float {
    right: max(22px, calc(env(safe-area-inset-right) + 18px));
    bottom: max(28px, calc(env(safe-area-inset-bottom) + 22px));
  }
  .site-footer-bottom,
  .mini-footer { align-items: center !important; }
}

/* v0.34 footer typography and homepage polish */
.site-footer h3 {
  font-size: clamp(34px, 3vw, 50px);
  line-height: .95;
  letter-spacing: -.055em;
}
.site-footer .footer-links,
.site-footer .footer-links a,
.site-footer p,
.site-footer li {
  font-weight: 400 !important;
}
.site-footer-bottom {
  gap: 0 !important;
}
body:not(.app-page):not(.admin-page) .topbar {
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 18px 60px rgba(15,23,42,.06);
  backdrop-filter: blur(18px);
}
body:not(.app-page):not(.admin-page) .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 12%, rgba(37,99,235,.18), transparent 28rem),
    radial-gradient(circle at 84% 18%, rgba(14,165,233,.22), transparent 27rem),
    radial-gradient(circle at 74% 82%, rgba(34,197,94,.10), transparent 24rem),
    linear-gradient(180deg,#ffffff 0%,#f4f8ff 52%,#eef6ff 100%);
}
body:not(.app-page):not(.admin-page) .hero::before,
body:not(.app-page):not(.admin-page) .hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}
body:not(.app-page):not(.admin-page) .hero::before {
  width: 440px;
  height: 440px;
  right: -160px;
  top: 86px;
  background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(6,182,212,.12));
  filter: blur(8px);
}
body:not(.app-page):not(.admin-page) .hero::after {
  width: 310px;
  height: 310px;
  left: -140px;
  bottom: 70px;
  background: linear-gradient(135deg, rgba(34,197,94,.13), rgba(37,99,235,.10));
  filter: blur(10px);
}
body:not(.app-page):not(.admin-page) .eyebrow {
  background: rgba(239,246,255,.88);
  border-color: rgba(37,99,235,.22);
  box-shadow: 0 12px 30px rgba(37,99,235,.10);
}
body:not(.app-page):not(.admin-page) .hero h1 {
  letter-spacing: -.055em;
  text-wrap: balance;
}
body:not(.app-page):not(.admin-page) .hero p {
  line-height: 1.72;
}
body:not(.app-page):not(.admin-page) .hero .btn,
body:not(.app-page):not(.admin-page) .section .btn {
  box-shadow: 0 16px 34px rgba(37,99,235,.20);
}
body:not(.app-page):not(.admin-page) .hero-panel,
body:not(.app-page):not(.admin-page) .metric,
body:not(.app-page):not(.admin-page) .section .card {
  background: rgba(255,255,255,.82);
  border-color: rgba(148,163,184,.20);
  box-shadow: 0 22px 70px rgba(15,23,42,.08);
  backdrop-filter: blur(14px);
}
body:not(.app-page):not(.admin-page) .hero-panel {
  position: relative;
  overflow: hidden;
}
body:not(.app-page):not(.admin-page) .hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg,#2563eb,#06b6d4,#22c55e);
}
body:not(.app-page):not(.admin-page) .metric {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
body:not(.app-page):not(.admin-page) .metric:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 28px 80px rgba(37,99,235,.13);
}
body:not(.app-page):not(.admin-page) .section {
  background: linear-gradient(180deg,#eef6ff 0%,#ffffff 100%);
}
body:not(.app-page):not(.admin-page) .section h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.045em;
  text-wrap: balance;
}
body:not(.app-page):not(.admin-page) .section .card {
  border-radius: 26px;
}
body:not(.app-page):not(.admin-page) .section .card h3 {
  font-size: 21px;
  letter-spacing: -.02em;
}
@media (max-width: 780px) {
  .site-footer-bottom {
    gap: 0 !important;
  }
  body:not(.app-page):not(.admin-page) .hero {
    padding-top: 38px;
  }
  body:not(.app-page):not(.admin-page) .metrics {
    gap: 10px;
  }
}

/* v0.35 auth security layout */
.auth-box #captchaBox,
.auth-box .social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.auth-box .social-login > div,
.auth-box #captchaBox > div {
  margin-left: auto;
  margin-right: auto;
}
.auth-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.auth-form-actions .btn {
  min-width: 138px;
}
.password-rule-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: -6px;
}
.auth-password-popup {
  z-index: 9999;
}
.auth-password-card {
  max-width: 480px;
}
.auth-password-card h2 {
  margin-top: 0;
}
.anti-ip-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
@media (max-width: 760px) {
  .auth-form-actions { justify-content: stretch; }
  .auth-form-actions .btn { width: 100%; }
  .anti-ip-form { grid-template-columns: 1fr; }
}

/* v0.37 auth form layout polish */
.auth-form-modern .field {
  margin-bottom: 14px;
}
.auth-field label {
  margin-bottom: 7px;
}
.auth-input-wrap {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-input-wrap:focus-within {
  border-color: rgba(37, 99, 235, .45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.auth-input-icon {
  width: 42px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  flex: 0 0 42px;
}
.auth-input-wrap input {
  width: 100%;
  height: 46px;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 12px !important;
  outline: none;
}
.password-wrap input {
  padding-right: 8px !important;
}
.password-toggle {
  width: 42px;
  height: 46px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 42px;
  font-size: 16px;
}
.password-toggle:hover,
.password-toggle.showing {
  color: var(--brand);
  background: rgba(37, 99, 235, .06);
}
.auth-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  margin-bottom: 12px;
}
.auth-row-actions.register-actions {
  justify-content: flex-end;
}
.remember-login-row.compact {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-weight: 600;
}
.auth-main-btn {
  min-width: 190px;
  height: 44px;
  justify-content: center;
}
.auth-msg {
  margin: 4px 0 12px;
  white-space: pre-wrap;
}
.auth-msg:empty {
  display: none;
}
.auth-captcha,
.auth-google {
  margin-top: 12px;
  margin-bottom: 0;
}
.auth-google {
  padding-top: 2px;
}
.auth-box #captchaBox,
.auth-box .social-login {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.auth-box .social-login > div,
.auth-box #captchaBox > div {
  margin-left: auto;
  margin-right: auto;
}
.auth-google iframe,
.auth-google > div {
  max-width: 100%;
}
.auth-terms-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.auth-terms-row input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
.auth-terms-row a {
  color: var(--brand);
  font-weight: 600;
}
@media (max-width: 760px) {
  .auth-row-actions,
  .auth-row-actions.register-actions {
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;
  }
  .auth-row-actions.register-actions span {
    display: none;
  }
  .auth-main-btn {
    width: 100%;
    min-width: 0;
  }
}

/* v0.38: auth form layout alignment */
.auth-form-modern .auth-msg {
  margin: -4px 0 12px;
  white-space: pre-wrap;
}
.auth-form-modern .auth-captcha {
  margin: 4px 0 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.auth-form-modern .auth-captcha:empty {
  display: none;
}
.auth-form-modern .auth-main-btn {
  width: 100%;
  min-width: 100%;
  height: 48px;
  border-radius: 14px;
  justify-content: center;
  font-weight: 900;
}
.auth-form-modern .auth-google {
  width: 100%;
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.auth-form-modern .auth-google > div,
.auth-form-modern .auth-google iframe {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 14px !important;
}
.auth-check-row,
.auth-form-modern .remember-login-row.compact,
.auth-form-modern .auth-terms-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  column-gap: 10px;
  width: 100%;
  margin: 2px 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.45;
}
.auth-check-row input,
.auth-form-modern .remember-login-row.compact input,
.auth-form-modern .auth-terms-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand);
}
.auth-check-row span,
.auth-check-row label,
.auth-form-modern .remember-login-row.compact span,
.auth-form-modern .remember-login-row.compact label,
.auth-form-modern .auth-terms-row span {
  min-width: 0;
}
.auth-form-modern .auth-terms-row a {
  font-weight: 600;
}
.auth-form-modern .auth-row-actions {
  margin: 0;
  display: block;
}
@media (max-width: 760px) {
  .auth-form-modern .auth-main-btn,
  .auth-form-modern .auth-google > div,
  .auth-form-modern .auth-google iframe {
    width: 100% !important;
    min-width: 100% !important;
  }
}


/* v0.51 ATM deposit/admin config */
.deposit-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.deposit-bank-grid article {
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, .04);
}
.deposit-bank-grid article span {
  display: block;
  font-size: 12px;
  opacity: .75;
  margin-bottom: 6px;
}
.deposit-bank-grid article b {
  display: block;
  word-break: break-word;
}
.deposit-bank-grid .deposit-code {
  margin-top: 5px;
  grid-column: 1 / -1;
}
.deposit-result .btn.small {
  margin-top: 8px;
}


/* v0.52 ATM QR popup */
.deposit-modal .modal-content,
.deposit-modal-content {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
}
.deposit-qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0 16px;
}
.deposit-qr-img {
  width: min(280px, 78vw);
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: #fff;
  padding: 10px;
}
.deposit-admin-note {
  white-space: pre-wrap;
  margin-top: 12px;
}

/* v0.59 ATM popup/layout refinements */
.notice.warning,
.alert.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.notice.success,
.alert.success {
  border-left-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}
.notice-item.notice-warning { background:#f59e0b; color:#fff; }
.notice-item.notice-danger { background:#dc2626; color:#fff; }

.deposit-bank-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  text-align: center;
}
.deposit-bank-row {
  width: min(100%, 460px);
  display: flex;
  align-items: center;
  justify-content: center;
  
}
.deposit-bank-row span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.deposit-bank-row b {
  word-break: break-word;
}
.deposit-bank-row.deposit-code b {
  font-size: 1.18rem;
  color: var(--brand);
}
.deposit-bank-row .btn.small {
  margin-top: 2px;
}
.deposit-account-row {
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.deposit-account-row .btn.small {
  margin-top: 0;
}
.deposit-qr-img {
  width: min(364px, 90vw);
}
.deposit-admin-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(235, 37, 37, 0.25);
  border-left: 5px solid #eb2525;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #fd3c3c;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
  box-shadow: 0 10px 24px rgba(235, 37, 37, 0.08);
}
.deposit-account-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.deposit-account-row span,
.deposit-account-row b {
  line-height: 1;
}

.deposit-copy-btn {
  align-self: flex-end;
}
.deposit-actions,
.deposit-modal .actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.deposit-actions .btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}
.deposit-bank-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 2px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.deposit-bank-row span {
  flex: 0 0 auto;
}

.deposit-bank-row b {
  flex: 0 1 auto;
}

.deposit-copy-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  border-color: rgba(220, 38, 38, .18);
}
.deposit-account-row .deposit-account-number {
  font-size: 1.0rem;
  font-weight: 700;
}
.deposit-account-row .deposit-copy-btn svg {
  color: inherit;
}
.deposit-important-box {
  border: 1px solid #f2b8b5;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-top: 12px;
}

.deposit-important-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(180deg, #e53935, #c62828);
  color: #fff;
  padding: 10px 14px;
}

.deposit-important-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
}

.deposit-important-head-icon {
  font-size: 15px;
  line-height: 1;
}

.deposit-important-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.deposit-important-body {
  padding: 12px 14px;
  background: #fffaf9;
}

.deposit-important-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #d8433e;
  font-size: 14px;
  line-height: 1.55;
}

.deposit-important-item + .deposit-important-item {
  margin-top: 6px;
}

.deposit-important-item-icon {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1.4;
}

.deposit-important-item-text {
  flex: 1;
}
/* v0.011 admin member action popup */
.admin-user-action-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
}
.compact-summary article{min-width:0;}

/* v0.013 admin user search/activity improvements */
.admin-user-search-row{
  display:grid;
  grid-template-columns:minmax(0,4fr) minmax(180px,1fr);
  gap:12px;
  align-items:end;
}
.popup-box.wide-popup{
  width:min(1380px,96vw);
  max-width:96vw;
}
.activity-wide-body{
  overflow-x:auto;
}
.activity-wide-body table{
  min-width:980px;
}
.stock-badges-text{
  align-items:flex-start;
}
.stock-badges-text .stock-badge{
  width:max-content;
  max-width:calc(100% - 16px);
}
@media(max-width:720px){
  .admin-user-search-row{grid-template-columns:1fr;}
  .popup-box.wide-popup{width:96vw;}
}


/* v0.014 */
.anti-ip-switch{align-items:center;gap:10px}
.anti-ip-switch input{width:42px;height:22px;accent-color:#2563eb}
.activity-popup-xl{width:min(1320px,96vw)!important;max-width:96vw!important}
.activity-wide-body .table-wrap{max-height:340px;overflow:auto}
#adminLogTable .table-wrap{max-height:70vh;overflow:auto}
@media (max-width:720px){.admin-user-search-row{grid-template-columns:1fr!important}.activity-popup-xl{width:96vw!important}}
