:root {
  --blue: #6943ff;
  --blue-dark: #5634dd;
  --blue-deep: #17172f;
  --blue-soft: #eee9ff;
  --blue-faint: #f6f6fa;
  --white: #ffffff;
  --line: #e5def7;
  --line-strong: #c9bbff;
  --text: #17172f;
  --muted: #8f899f;
  --shadow: 0 18px 50px rgba(73, 55, 139, .12);
  --radius: 18px;
  --max: 1184px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--blue-faint);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 420px;
  background: var(--blue-soft);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; font-weight: 500; }
select:not([multiple]) {
  appearance:none;
  padding-right:38px !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 10px center !important;
  background-size:16px 16px !important;
}
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong, b { font-weight: 600; }
.container { width: min(calc(100% - 40px), var(--max)); margin: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.gradient { color: var(--blue); }
.ui-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ui-icon-large { width: 24px; height: 24px; flex-basis: 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

.btn,
.mobile-toggle,
.admin-tab,
.auth-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--blue);
  border-radius: 11px;
  background: var(--white);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover,
.mobile-toggle:hover,
.admin-tab:hover,
.auth-switch button:hover { border-color: var(--blue-dark); box-shadow: 0 8px 22px rgba(23, 105, 217, .13); transform: translateY(-1px); }
.btn:focus-visible,
.mobile-toggle:focus-visible,
.admin-tab:focus-visible,
.auth-switch button:focus-visible { outline: 3px solid rgba(23, 105, 217, .18); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.btn-primary,
.admin-tab.active,
.auth-switch button.active { border-color: var(--blue); background: var(--blue); color: var(--white); }
.btn-secondary,
.btn-ghost,
.btn-danger { border-color: var(--blue); background: var(--white); color: var(--blue); }
.btn-small { min-height: 36px; padding: 7px 11px; font-size: 12px; }

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--blue-deep); font-size: 20px; font-weight: 600; letter-spacing: -.035em; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: var(--blue); color: var(--white); font-size: 14px; font-weight: 600; }
.brand-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 13px; background: var(--blue); color: var(--white); box-shadow: 0 9px 22px rgba(21,110,232,.20); }
.brand-icon .ui-icon, .brand-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-accent { color: var(--blue); }
.brand strong { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 13px; font-weight: 600; }
.nav-links a { padding: 9px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { border-color: var(--blue); color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--blue-dark); font-size: 12px; font-weight: 600; }
.mobile-toggle { display: none; width: 42px; padding: 0; }

.hero { padding: 84px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 54px; }
.hero h1 { margin: 24px 0 22px; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.06; letter-spacing: -.05em; }
.hero p { max-width: 570px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; color: var(--blue-dark); font-size: 12px; }
.hero-points span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }

.strip { border-block: 1px solid var(--line); background: var(--white); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 22px 18px; border-right: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 12px; }
.strip-item:last-child { border-right: 0; }
.strip-item b { display: block; margin-bottom: 5px; color: var(--blue); font-size: 21px; }
.section { padding: 82px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-head h2 { margin: 11px 0; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.04em; }
.section-head p { max-width: 570px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.cards, .plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.card, .plan, .panel, .auth-card, .stat, .rental { border: 1px solid var(--line); background: var(--white); box-shadow: 0 10px 30px rgba(28, 91, 164, .07); }
.card { padding: 23px; border-radius: 17px; }
.card h3 { margin: 0 0 9px; font-size: 17px; }
.card p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.icon-box { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 19px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.plan { position: relative; padding: 25px; border-radius: 18px; }
.plan.featured { border-color: var(--blue); box-shadow: var(--shadow); }
.plan-badge { position: absolute; top: -12px; right: 18px; padding: 6px 10px; border: 1px solid var(--blue); border-radius: 20px; background: var(--blue); color: var(--white); font-size: 10px; font-weight: 600; }
.plan .price { margin: 18px 0 5px; color: var(--blue-dark); font-size: 32px; font-weight: 600; letter-spacing: -.035em; }
.plan .duration { color: var(--muted); font-size: 12px; }
.plan .btn { width: 100%; margin-top: 22px; }

.page-hero { padding: 58px 0 34px; }
.page-hero h1 { margin: 12px 0; font-size: clamp(36px, 5vw, 56px); letter-spacing: -.045em; }
.page-hero p { max-width: 700px; color: var(--muted); line-height: 1.75; }
.panel { padding: 23px; border-radius: 18px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.panel-title h2, .panel-title h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.form { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 7px; }
.field label { color: var(--blue-dark); font-size: 12px; font-weight: 600; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--white); color: var(--text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 217, .12); }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--blue); }
.message { min-height: 18px; color: var(--muted); font-size: 12px; }
.message.error { color: var(--blue-deep); }
.message.success { color: var(--blue-dark); }
.auth-shell { min-height: calc(100vh - 75px); display: grid; place-items: center; padding: 45px 20px; }
.auth-card { width: min(100%, 470px); padding: 29px; border-radius: 22px; box-shadow: var(--shadow); }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 23px; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--blue-faint); }
.auth-switch button { min-height: 40px; border-color: transparent; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px; border-radius: 15px; }
.stat span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 8px; color: var(--blue-dark); font-size: 28px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--white); }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 12px; }
.table th { background: var(--blue-faint); color: var(--blue-dark); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--blue-dark); font-size: 10px; font-weight: 600; }
.badge.good { border-color: var(--blue); background: var(--blue); color: var(--white); }
.badge.warn { border-style: dashed; background: var(--blue-soft); color: var(--blue-dark); }
.badge.bad { border-color: var(--blue-dark); background: var(--white); color: var(--blue-deep); }
.rental-list { display: grid; gap: 13px; }
.rental { display: grid; grid-template-columns: minmax(0, 1.5fr) 1fr auto; align-items: center; gap: 18px; padding: 17px; border-radius: 15px; }
.rental h3 { margin: 0 0 6px; font-size: 15px; }
.rental-meta { color: var(--muted); font-size: 11px; line-height: 1.65; }
.rental-time { color: var(--blue-dark); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rental-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.admin-tab { min-height: 40px; padding: 8px 13px; font-size: 12px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.code { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--blue-faint); color: var(--blue-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--blue-faint); color: var(--muted); font-size: 12px; line-height: 1.7; }
.notice strong { color: var(--blue-dark); }
.footer { margin-top: 70px; padding: 36px 0; border-top: 1px solid var(--line); background: var(--white); }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer .brand-logo { width: 112px; height: 64px; display: block; object-fit: contain; object-position: left center; }
.footer p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.footer-links { display: flex; gap: 20px; color: var(--blue-dark); font-size: 12px; }
.auth-legal-consent{display:flex;align-items:flex-start;gap:10px;color:var(--muted);font-size:12px;line-height:1.55}.auth-legal-consent input{width:16px;height:16px;flex:0 0 16px;margin-top:2px;accent-color:#6841ff}.auth-legal-consent a{color:#5537d4;text-decoration:underline;text-underline-offset:2px}
.legal-shell{max-width:900px;margin:0 auto;padding:112px 20px 70px}.legal-hero{padding:30px;border-radius:24px;background:linear-gradient(135deg,#17172f,#5537d4);color:#fff}.legal-hero p{margin:10px 0 0;color:#ddd8ff;line-height:1.7}.legal-document{margin-top:22px;padding:30px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:var(--shadow-soft)}.legal-document section+section{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}.legal-document h2{margin:0 0 10px;font-size:20px;font-weight:600}.legal-document p,.legal-document li{color:var(--muted);font-size:14px;line-height:1.8}.legal-document ul{margin:8px 0 0;padding-left:20px}.legal-updated{font-size:12px;color:#ddd8ff}.legal-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}.legal-links a{padding:10px 14px;border:1px solid #ddd6ff;border-radius:10px;color:#5537d4;background:#fff;font-size:13px;font-weight:600}
@media(max-width:600px){.legal-shell{padding:88px 14px 45px}.legal-hero,.legal-document{padding:22px;border-radius:18px}}
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: 360px; padding: 14px 17px; border: 1px solid var(--blue); border-radius: 12px; background: var(--blue); color: var(--white); box-shadow: var(--shadow); font-size: 12px; line-height: 1.6; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .22s; }
.toast.show { opacity: 1; transform: none; }

.view-shell { padding: 24px 0 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.view-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; }
.view-meta span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.view-opening { min-height: 180px; display: grid; place-items: center; padding: 24px; color: var(--blue-dark); font-size: 13px; text-align: center; }
.view-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.worker-setup { margin-top: 18px; }
.worker-config { margin: 0 0 12px; padding: 14px; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; background: var(--blue-faint); color: var(--blue-dark); font: 500 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.connection-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

@media (max-width: 920px) {
  .nav-links { display: none; position: absolute; top: 73px; left: 0; right: 0; padding: 10px 20px 18px; border-bottom: 1px solid var(--line); background: var(--white); flex-direction: column; align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px; }
  .mobile-toggle { display: inline-flex; }
  .nav-actions .user-chip { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .cards, .plans { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .rental { grid-template-columns: 1fr; }
  .rental-actions { justify-content: flex-start; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .nav { gap: 10px; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn:first-child { display: none; }
  .brand { font-size: 17px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { padding: 54px 0; }
  .hero h1 { font-size: 40px; }
  .section { padding: 58px 0; }
  .section-head, .panel-title, .view-head { align-items: flex-start; flex-direction: column; }
  .cards, .plans, .stats, .strip-grid, .form-row { grid-template-columns: 1fr; }
  .strip-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .strip-item:last-child { border-bottom: 0; }
  .panel, .auth-card { padding: 18px; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .view-opening { min-height: 140px; }
}

/* ===== Khu vực tài khoản ===== */
body[data-page="dashboard"] { background: #f4f8fe; }
body[data-page="dashboard"]::before { display: none; }
body[data-page="dashboard"] .site-header {
  width: calc(100% - 260px);
  height: 68px;
  margin-left: 260px;
}
body[data-page="dashboard"] .site-header .header-inner {
  width: calc(100% - 48px);
  max-width: none;
}
body[data-page="dashboard"] .site-header .brand { display: none; }
body[data-page="dashboard"] .site-header .nav-links,
body[data-page="dashboard"] .site-header .btn.btn-primary.desktop-cta { display: none; }
.account-shell {
  width: 100%;
  min-height: calc(100vh - 68px);
  margin: 0;
  padding: 0 0 0 260px;
}
.account-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: 260px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 16px 18px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #d9e6f8;
  border-radius: 0;
  background: #fff;
  box-shadow: 3px 0 18px rgba(31,86,154,.07);
}
.account-sidebar-brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 68px;
  margin: 0 -16px;
  padding: 0 20px;
  border-bottom: 1px solid #e3edfb;
  color: #17335b;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.055em;
}
.account-sidebar-brand > span:last-child > span { color: #1768ee; }
.account-sidebar-brand-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  flex: 0 0 41px;
  border-radius: 13px;
  background: #1768ee;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23,104,238,.14);
}
.account-sidebar-brand-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-user { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 18px 4px; border-bottom: 1px solid #e4edf9; }
.account-user > div:last-child { min-width: 0; }
.account-user strong, .account-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-user strong { color: #17335b; font-size: 13px; font-weight: 600; }
.account-user span { margin-top: 4px; color: #6c84a5; font-size: 10px; }
.account-avatar { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border-radius: 14px; background: #1768ee; color: #fff; }
.account-avatar svg, .account-nav-item svg, .account-logout svg, .account-panel-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-nav { display: flex; flex: 1; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 12px 6px 18px; overflow-y: auto; }
.account-nav-heading { padding: 8px 12px 5px; color: #8aa0bc; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.account-nav-heading:not(:first-child) { margin-top: 8px; }
.account-nav-item, .account-logout {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #fff;
  color: #496887;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.account-nav-item:hover, .account-logout:hover { border-color: #1768ee; color: #1768ee; }
.account-nav-item.active { border-color: #1768ee; background: #1768ee; color: #fff; box-shadow: 0 8px 18px rgba(23,104,238,.16); }
.account-logout { margin-top: auto; }
.account-content { min-width: 0; padding: 24px 28px 48px; }
.account-backdrop { display: none; }
.account-view { display: none; }
.account-view.active { display: block; animation: account-view-in .2s ease both; }
@keyframes account-view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.account-heading {
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid #d4e5f9;
  border-radius: 22px;
  background: linear-gradient(122deg,#fbfdff 0%,#f2f8ff 42%,#e2efff 100%);
  box-shadow: 0 14px 38px rgba(31,86,154,.07);
}
.account-heading span { color: #1768ee; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.account-heading h1 { margin: 8px 0 6px; color: #17335b; font-size: clamp(27px,3vw,40px); letter-spacing: -.04em; }
.account-heading h1 strong { color: #1768ee; }
.account-heading p { margin: 0; color: #6c84a5; font-size: 12px; }
.account-stats { margin-bottom: 20px; }
.account-stats .stat { min-width: 0; }
.account-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.account-summary-card { display: flex; align-items: center; gap: 17px; min-height: 134px; }
.account-panel-icon { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 50px; border-radius: 15px; background: #1768ee; color: #fff; }
.account-summary-card span, .profile-detail span { display: block; color: #6c84a5; font-size: 11px; }
.account-summary-card strong { display: block; margin: 5px 0; color: #17335b; font-size: 23px; font-weight: 600; }
.account-summary-card button, .account-summary-card a { padding: 0; border: 0; background: #fff; color: #1768ee; font-size: 11px; font-weight: 600; text-decoration: none; }
.profile-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 8px; overflow: hidden; }
.account-profile-details { margin-top: 20px; }
.profile-detail { min-width: 0; padding: 22px; border-bottom: 1px solid #e4edf9; }
.profile-detail:nth-child(odd) { border-right: 1px solid #e4edf9; }
.profile-detail:nth-last-child(-n+2) { border-bottom: 0; }
.profile-detail strong { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #17335b; font-size: 14px; font-weight: 600; }
.account-table-panel { padding: 0; overflow: hidden; }
.account-table-panel .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
body[data-page="dashboard"] .rental-list { display: grid; gap: 14px; }

@media (max-width: 1040px) {
  .account-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  body[data-page="dashboard"] .site-header { width: 100%; height: 68px; margin-left: 0; }
  body[data-page="dashboard"] .site-header .header-inner { width: min(100% - 48px, 1200px); }
  body[data-page="dashboard"] .site-header .brand { display: inline-flex; }
  .account-shell { min-height: calc(100vh - 68px); padding-left: 0; }
  .account-sidebar { z-index: 110; transform: translateX(-102%); transition: transform .22s ease; }
  body.account-sidebar-open { overflow: hidden; }
  body.account-sidebar-open .account-sidebar { transform: translateX(0); }
  .account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(12,42,78,.34);
  }
  body.account-sidebar-open .account-backdrop { display: block; }
  .account-content { padding: 16px 20px 40px; }
  .account-heading { min-height: 132px; padding: 23px; }
}
@media (max-width: 580px) {
  body[data-page="dashboard"] .site-header { height: 68px; }
  body[data-page="dashboard"] .site-header .header-inner { width: calc(100% - 32px); }
  .account-sidebar { width: min(280px, calc(100vw - 44px)); }
  .account-sidebar-brand { height: 68px; flex-basis: 68px; }
  .account-content { padding: 12px 14px 32px; }
  .account-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .account-heading .btn { width: 100%; }
  .account-stats, .account-overview-grid, .profile-details { grid-template-columns: 1fr; }
  .profile-detail:nth-child(odd) { border-right: 0; }
  .profile-detail:nth-last-child(2) { border-bottom: 1px solid #e4edf9; }
}

/* ===== JARPLAY visual refresh 2026-10 ===== */
:root {
  --blue: #6943ff;
  --blue-dark: #5634dd;
  --blue-deep: #17172f;
  --blue-soft: #eee9ff;
  --blue-faint: #f6f6fa;
  --white: #ffffff;
  --line: #e5def7;
  --line-strong: #c9bbff;
  --text: #17172f;
  --muted: #8f899f;
  --shadow: 0 18px 50px rgba(73, 55, 139, .10);
  --shadow-soft: 0 8px 28px rgba(73, 55, 139, .07);
  --radius: 20px;
  --max: 1240px;
}

html { background: #f6f6fa; }
body {
  background:
    radial-gradient(circle at 82% 8%, rgba(105,67,255,.08), transparent 26rem),
    linear-gradient(180deg, #fbfaff 0, #f6f6fa 460px, #fbfaff 100%);
  color: var(--text);
  overflow-x: hidden;
}
body::before { display: none; }

.container { width: min(calc(100% - 48px), var(--max)); }

.header {
  border-bottom: 1px solid rgba(185, 211, 242, .78);
  background: rgba(255,255,255,.88);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(18px) saturate(145%);
}
.nav { min-height: 68px; gap: 28px; }
.brand { gap: 11px; font-size: 19px; letter-spacing: -.025em; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  box-shadow: 0 9px 22px rgba(21,110,232,.20);
}
.nav-links { gap: 8px; }
.nav-links a {
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  transition: background .16s ease, color .16s ease;
}
.nav-links a:hover,
.nav-links a.active { background: var(--blue-soft); color: var(--blue-dark); }
.mobile-account-link { display: none; }
.nav-actions { gap: 9px; }
.user-chip {
  padding: 9px 13px;
  border-color: var(--line);
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(31,86,154,.05);
}

.btn,
.mobile-toggle,
.admin-tab,
.auth-switch button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 11px;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover,
.mobile-toggle:hover,
.admin-tab:hover,
.auth-switch button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(21,110,232,.12);
}
.btn-primary,
.admin-tab.active,
.auth-switch button.active {
  background: linear-gradient(180deg, #8f73ff, #6943ff);
  border-color: var(--blue);
  color: #fff;
}
.btn-secondary,
.btn-ghost,
.btn-danger {
  background: #fff;
  border-color: #d4c9fa;
  color: var(--blue-dark);
}
.btn-small { min-height: 35px; padding: 7px 11px; }

.eyebrow {
  gap: 8px;
  padding: 6px 10px;
  border-color: #bfd8f4;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(31,86,154,.04);
  letter-spacing: .11em;
}

.hero { padding: 72px 0 74px; }
.hero-grid { grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr); gap: 72px; }
.hero h1 {
  max-width: 720px;
  margin: 22px 0 20px;
  font-size: clamp(46px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -.052em;
}
.hero p { max-width: 620px; font-size: 16px; line-height: 1.8; }
.hero-actions { margin-top: 28px; }
.hero-points { margin-top: 24px; gap: 8px; }
.hero-points span {
  padding: 7px 11px;
  border-color: #d1e2f5;
  background: rgba(255,255,255,.72);
  color: var(--muted);
}

.hero-copy { position: relative; z-index: 2; }
.game-showcase {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 24px;
  border: 1px solid #b9d7f7;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(21,110,232,.16), transparent 18rem),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(238,246,255,.96));
  box-shadow: 0 28px 80px rgba(17,75,145,.15);
}
.game-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(21,110,232,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,110,232,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(145deg,#000,transparent 78%);
}
.game-showcase-head,
.game-showcase-foot,
.game-grid { position: relative; z-index: 1; }
.game-showcase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.game-showcase-head h2 { max-width: 360px; margin: 7px 0 0; color: var(--blue-deep); font-size: 24px; line-height: 1.16; letter-spacing: -.03em; }
.game-kicker { color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 7px 10px; border: 1px solid #bcd7f6; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--blue-dark); font-size: 10px; }
.live-pill i,
.game-showcase-foot i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(21,110,232,.10); }
.game-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.game-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d5e5f7;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 7px 20px rgba(36,87,150,.055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-2px); border-color: #99c1ef; box-shadow: 0 14px 28px rgba(36,87,150,.10); }
.game-card-main { grid-column: 1 / -1; grid-template-columns: 68px minmax(0,1fr) auto; padding: 14px; border-color: #9ec7f4; background: linear-gradient(135deg,#fff,#edf6ff); }
.game-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #bcd8f6;
  border-radius: 15px;
  background: #eef6ff;
  color: var(--blue-deep);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 16px rgba(21,110,232,.10);
}
.game-card-main .game-icon { width: 68px; height: 68px; }
.game-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.game-icon.nso { background: linear-gradient(145deg,#dcecff,#b9d8ff); color: #0d4e9e; }
.game-icon.nro { background: linear-gradient(145deg,#fff,#dfeeff); color: #1769d9; }
.game-icon.nro svg path { fill: currentColor; stroke-width: 1.7; }
.game-icon.hso { background: linear-gradient(145deg,#edf5ff,#cfe4ff); color: #174f91; }
.game-icon.avatar { background: linear-gradient(145deg,#f8fbff,#d8eaff); color: #2b6fbe; }
.game-icon.mobi { background: linear-gradient(145deg,#eaf4ff,#c4ddfb); color: #145aa9; }
.game-icon.more { background: #fff; color: var(--blue); border-style: dashed; }
.game-info { min-width: 0; }
.game-info strong { display: block; overflow: hidden; color: #173c67; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.game-info span { display: block; margin-top: 4px; color: #7890a9; font-size: 9px; letter-spacing: .07em; }
.game-arrow { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 15px; }
.game-showcase-foot { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #d8e6f6; color: #7089a5; font-size: 10px; }
.game-showcase-foot span { display: inline-flex; align-items: center; gap: 8px; }

.strip {
  border: 1px solid var(--line);
  border-inline: 0;
  background: rgba(255,255,255,.84);
  box-shadow: 0 8px 30px rgba(31,86,154,.04);
}
.strip-grid { gap: 0; }
.strip-item { padding: 24px 18px; }
.strip-item b { margin-bottom: 6px; font-size: 22px; }

.section { padding: 72px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { margin: 12px 0 10px; font-size: clamp(30px, 3.2vw, 43px); }
.cards, .plans { gap: 18px; }
.card, .plan, .panel, .auth-card, .stat, .rental {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.card {
  padding: 25px;
  border-radius: 19px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #bfd7f3;
  box-shadow: 0 18px 40px rgba(31,86,154,.10);
}
.card h3 { font-size: 16px; }
.icon-box {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-color: #c3d9f3;
  border-radius: 14px;
  background: linear-gradient(145deg,#f7fbff,#e7f2ff);
}
.plan {
  padding: 26px;
  border-radius: 20px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.plan-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #d7e6f8;
  border-radius: 16px;
  background: linear-gradient(145deg,#f8fbff,#eaf4ff);
}
.plan-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plan:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(31,86,154,.10); }
.plan.featured {
  border-color: #8db9ec;
  box-shadow: 0 20px 45px rgba(21,110,232,.13);
}
.plan .price { font-size: 34px; }

.page-hero { padding: 48px 0 26px; }
.page-hero .container {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 20%, rgba(21,110,232,.10), transparent 20rem),
    rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
}
.page-hero h1 {
  margin: 13px 0 10px;
  font-size: clamp(34px, 4.2vw, 50px);
}
.page-hero p { margin-bottom: 0; }

.panel {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
}
.panel-title { margin-bottom: 18px; }
.panel-title h2 { font-size: 19px; }
.panel-title h3 { font-size: 16px; }

.stats { gap: 15px; }
.stat {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg,#fff,#f7fbff);
}
.stat::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: -24px;
  bottom: -32px;
  border-radius: 50%;
  background: var(--blue-soft);
}
.stat span { position: relative; z-index: 1; text-transform: none; letter-spacing: .02em; font-size: 12px; }
.stat strong { position: relative; z-index: 1; margin-top: 10px; font-size: 30px; letter-spacing: -.035em; }

.form { gap: 16px; }
.field { gap: 8px; }
.field label { color: #315a85; font-size: 12px; }
.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 11px 13px;
  border-color: #ddd4fa;
  border-radius: 11px;
  background: #fbfaff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field textarea { min-height: 96px; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #c9bbff; background: #fff; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(105,67,255,.12);
}

.auth-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  padding: 54px 20px;
  background: linear-gradient(122deg,#fcfbff 0%,#f8f6ff 36%,#eee9ff 70%,#e7ddff 100%);
  box-shadow: inset 0 -30px 80px rgba(105,67,255,.045);
}
.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(148deg,transparent 0 38%,rgba(255,255,255,.58) 38% 54%,transparent 54%),
    linear-gradient(128deg,transparent 0 62%,rgba(105,67,255,.10) 62% 78%,transparent 78%);
  clip-path: polygon(0 0,100% 0,100% 88%,70% 100%,35% 88%,0 100%);
  pointer-events: none;
}
.auth-shell::after {
  content: '';
  position: absolute;
  width: 58%;
  height: 125%;
  right: -10%;
  top: -12%;
  z-index: 0;
  background: linear-gradient(145deg,rgba(143,115,255,.06),rgba(105,67,255,.20) 48%,rgba(255,255,255,.34));
  clip-path: polygon(24% 0,100% 0,100% 100%,0 82%,12% 34%);
  transform: skewX(-7deg);
  filter: blur(5px);
  pointer-events: none;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 590px);
  padding: 32px;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 70px rgba(73,55,139,.13);
}
.auth-card h1 { font-size: 32px; letter-spacing: -.03em; }
.auth-switch {
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 12px;
}
.auth-switch button { border-radius: 9px; }
.password-input { position: relative; }
.password-input input { padding-right: 48px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 38px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  color: var(--blue);
}
.password-toggle:hover { border-color: var(--line); background: var(--blue-soft); }
.password-toggle:focus-visible { outline: 3px solid rgba(21,110,232,.14); outline-offset: 1px; }
.password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.remember-login { display: inline-flex; align-items: center; gap: 9px; width: fit-content; color: #315a85; font-size: 12px; font-weight: 600; cursor: pointer; }
.remember-login input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-options a, .auth-help a, .auth-back { color: var(--blue); font-size: 12px; font-weight: 600; }
.auth-options a:hover, .auth-help a:hover, .auth-back:hover { text-decoration: underline; }
.auth-help { text-align: center; }
.auth-back { width: fit-content; margin-inline: auto; }
.auth-description { margin: 0 0 2px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-result { display: grid; justify-items: center; gap: 18px; padding: 14px 0 4px; text-align: center; }
.auth-result-icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--blue); border-radius: 50%; background: var(--blue); color: #fff; }
.auth-result-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-result .message { max-width: 360px; margin: 0; font-size: 13px; line-height: 1.65; }
.auth-register-success-copy { display:grid; gap:8px; max-width:380px; }
.auth-register-success-copy h2 { margin:0; color:#141429; font-size:22px; font-weight:700; }
.auth-register-success-copy p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.auth-register-success-copy strong { color:var(--blue-dark); font-weight:600; overflow-wrap:anywhere; }
.auth-register-success-actions { display:grid; gap:10px; width:min(100%,360px); }
.auth-register-success-actions .btn { width:100%; justify-content:center; }
.auth-recovery-verification { display:grid; justify-items:center; gap:16px; margin-bottom:2px; text-align:center; }
.auth-recovery-verification h2 { margin:0; color:#141429; font-size:22px; font-weight:700; }
.auth-form.is-verification { justify-items:center; text-align:center; }
.auth-form.is-verification .field, .auth-form.is-verification .auth-verify, .auth-form.is-verification > .btn { width:100%; text-align:left; }
.auth-form.is-verification .auth-description { max-width:380px; text-align:center; }
.auth-verify { min-height: 68px; display: grid; place-items: center; }
.turnstile-slot { width: 100%; display: grid; place-items: center; }
.auth-service-note { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.google-button-wrap { min-height: 44px; display: grid; place-items: center; }
.google-button-wrap.is-locked { opacity: .58; pointer-events: none; }
.google-placeholder {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--blue);
  border-radius: 11px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.google-placeholder svg { width: 19px; height: 19px; fill: currentColor; }
.google-placeholder[hidden] { display: none; }

.rental-list { gap: 12px; }
.rental {
  gap: 20px;
  padding: 19px 20px;
  border-radius: 17px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rental-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: #466788;
  font-size: 12px;
  font-weight: 600;
}
.rental-view-switch { display: flex; gap: 8px; }
.rental-list[data-view="cards"] {
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  align-items: stretch;
  gap: 16px;
}
.rental-list[data-view="cards"] .rental {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.rental-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e7f7;
  background: linear-gradient(145deg,#f8fbff,#eaf4ff);
}
.rental-thumb img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: 50% 50%;
}
.rental-thumb img.is-live { object-fit:cover; background:#071425; }
.rental-list[data-view="cards"] .rental-thumb {
  width: calc(100% - 14px);
  aspect-ratio: 16 / 10;
  margin: 7px 7px 0;
  border: .5px solid #d2e3f6;
  border-radius: 14px;
  box-shadow: 0 3px 9px rgba(31,86,154,.035);
}
.rental-card-main { min-width: 0; }
.rental-device-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rental-device-title h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rental-status {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.rental-status-active { border-color: #a8dfbd; background: #edf9f1; color: #17743a; }
.rental-status-offline { border-color: #f1ce92; background: #fff7e8; color: #9a5a08; }
.rental-status-provisioning { border-color: #acd0f7; background: #eef6ff; color: #1764b0; }
.rental-status-restarting { border-color: #c8b8f4; background: #f5f1ff; color: #6541a5; }
.rental-status-powered_off { border-color: #cfd7e2; background: #f3f5f8; color: #58677b; }
.rental-status-powering_on { border-color: #acd0f7; background: #eef6ff; color: #1764b0; }
.rental-status-powering_off { border-color: #f1ce92; background: #fff7e8; color: #9a5a08; }
.rental-status-launch_error { border-color: #f4bd9a; background: #fff4ec; color: #a84a12; }
.rental-status-provision_failed { border-color: #f1aaaa; background: #fff0f0; color: #b42323; }
.rental-status-failed { border-color: #e6a9c0; background: #fff1f6; color: #9d2452; }
.rental-status-stopped { border-color: #cfd7e2; background: #f3f5f8; color: #58677b; }
.rental-status-expired { border-color: #bbc7d4; background: #eef2f6; color: #48596d; }
.rental-status-pending { border-color: #9fdbe4; background: #ecfbfd; color: #137184; }
.rental-status-cancelled { border-color: #d2c2df; background: #f8f2fb; color: #77518d; }
.rental-status-unknown { border-color: #d6d9df; background: #f6f6f7; color: #6a6f78; }
.rental-name-edit {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #c9dcf3;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
}
.rental-name-edit:hover { border-color: #8db9ec; background: #f5f9ff; }
.rental-name-edit .ui-icon { width: 14px; height: 14px; }
.rental-machine-line { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rental-machine-line code { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.rental-network-line { display:flex; align-items:center; gap:7px; min-width:0; margin-top:6px; }
.rental-network-address { min-width:0; overflow:hidden; color:#52657b; font-size:10px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.rental-proxy-state { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #cbd9e8; border-radius: 999px; background: #f8fbff; color: #52657b; font-size: 9px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.rental-proxy-state.alive { border-color: #a8dfbd; background: #edf9f1; color: #17743a; }
.rental-proxy-state.checking { border-color: #acd0f7; background: #eef6ff; color: #1764b0; }
.rental-proxy-state.dead { border-color: #efb7b7; background: #fff0f0; color: #a12b2b; }
.rental-proxy-state.disabled { color: #687a8d; }
.rental-list[data-view="cards"] .rental-card-main { padding: 18px 18px 10px; }
.rental-list[data-view="cards"] .rental-countdown { padding: 0 18px 4px; }
.rental-list[data-view="cards"] .rental-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-top: auto;
  padding: 10px 18px 18px;
}
.rental-list[data-view="cards"] .rental-actions .btn { justify-content: center; }
.rental-open { position: relative; width: 100%; }
.rental-open-btn { width: 100%; }
.rental-open-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 22;
  display: none;
  padding: 6px;
  border: 1px solid #d4e2f2;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31,86,154,.15);
}
.rental-open.open .rental-open-menu { display: grid; gap: 4px; }
.rental-open-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.rental-open-menu button:hover { background: #f2f7fd; }
.rental-open-menu .ui-icon { width: 16px; height: 16px; color: var(--blue); }
.rental-open-menu span { display: grid; gap: 2px; min-width: 0; }
.rental-open-menu strong { font-size: 12px; }
.rental-open-menu small { color: var(--muted); font-size: 10px; }
.rental-action-row { display: grid; grid-template-columns: minmax(0,9fr) minmax(34px,1fr); gap: 7px; width: 100%; }
.rental-action-row > .btn { width: 100%; }
.rental-action-row .btn-danger {
  border-color: #dc2626;
  background: #fff;
  color: #dc2626;
}
.rental-action-row .btn-danger:hover {
  border-color: #b91c1c;
  background: #fff5f5;
  color: #b91c1c;
}
.rental-more { position: relative; min-width: 0; }
.rental-more-btn { width: 100%; height: 100%; min-height: 34px; padding: 0; }
.rental-more-btn .ui-icon { width: 17px; height: 17px; }
.rental-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 20;
  display: none;
  min-width: 148px;
  padding: 6px;
  border: 1px solid #d4e2f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(31,86,154,.14);
}
.rental-more.open .rental-more-menu { display: block; }
.rental-more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b42323;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.rental-more-menu button:hover { background: #eef6ff; color: #1769d9; }
.rental-more-menu button:disabled { cursor: wait; opacity: .6; }
.rental-extension-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 18px; }
.sync-page #syncProxyModal { z-index:500; }
.rental-extension-modal.hidden { display: none; }
.rental-extension-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(12,31,53,.56); }
.rental-extension-dialog { position: relative; width: min(460px,100%); padding: 0; overflow: hidden; border: 1px solid #d7e4f2; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(11,38,70,.24); }
.rental-extension-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #e5edf6; }
.rental-extension-dialog header h2 { margin: 0; font-size: 20px; font-weight: 600; }
.rental-extension-dialog header button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #eef4fb; color: #35516e; font-size: 22px; cursor: pointer; }
.rental-extension-dialog header button svg { width:16px; height:16px; display:block; margin:auto; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.rental-extension-fields { display: grid; grid-template-columns: 1fr 140px; gap: 12px; padding: 18px 20px 10px; }
.rental-extension-fields label { display: grid; gap: 6px; color: #52657b; font-size: 12px; font-weight: 600; }
.rental-extension-fields select,.rental-extension-fields input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #cbd9e8; border-radius: 9px; background: #fff; color: #19324d; font: inherit; }
.rental-extension-summary { margin: 8px 20px 0; padding: 13px 14px; border-radius: 10px; background: #eef6ff; color: #244968; font-size: 13px; line-height: 1.65; }
.rental-extension-dialog .message { min-height: 20px; margin: 8px 20px 0; }
.rental-extension-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 20px; }
@media (max-width: 560px) { .rental-extension-fields { grid-template-columns: 1fr; } .rental-extension-dialog footer { display: grid; grid-template-columns: 1fr 1fr; } }
.rental-proxy-dialog { width: min(560px,100%); }
.rental-proxy-dialog header > div { min-width: 0; }
.rental-proxy-dialog header span { display: block; margin-bottom: 3px; font-size: 11px; }
.rental-proxy-status { margin: 18px 20px 0; padding: 12px 14px; border: 1px solid #d7e4f2; border-radius: 10px; background: #f8fbff; color: #35516e; font-size: 12px; line-height: 1.6; }
.rental-proxy-status.alive { border-color: #bfe6ca; background: #f2fbf5; color: #17633a; }
.rental-proxy-status.checking { border-color: #bad8f7; background: #f2f8ff; color: #175f9f; }
.rental-proxy-status.dead { border-color: #efc1c1; background: #fff4f4; color: #8f2828; }
.rental-proxy-toggle { display: flex; align-items: flex-start; gap: 10px; margin: 15px 20px 0; padding: 12px 14px; border: 1px solid #d7e4f2; border-radius: 10px; cursor: pointer; }
.rental-proxy-toggle input,.rental-proxy-clear input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.rental-proxy-toggle span { display: grid; gap: 3px; }
.rental-proxy-toggle strong { color: #19324d; font-size: 12px; }
.rental-proxy-toggle small,.rental-proxy-clear { color: #6a7f95; font-size: 11px; }
.rental-proxy-fields { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 12px; padding: 14px 20px 0; }
.rental-proxy-fields label { display: grid; gap: 6px; color: #52657b; font-size: 12px; font-weight: 600; }
.rental-proxy-fields label:nth-child(3),.rental-proxy-fields label:nth-child(4) { grid-column: span 1; }
.rental-proxy-fields input { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #cbd9e8; border-radius: 9px; background: #fff; color: #19324d; font: inherit; }
.rental-proxy-fields small { color: #7b8da0; font-size: 10px; font-weight: 500; }
.rental-proxy-clear { display: flex; align-items: center; gap: 8px; margin: 12px 20px 0; cursor: pointer; }
@media (max-width: 560px) { .rental-proxy-fields { grid-template-columns: 1fr; } }
.rp-option-list { display: grid; margin: 15px 20px 0; border: 1px solid #d7e4f2; border-radius: 10px; overflow: hidden; }
.rp-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; cursor: pointer; }
.rp-switch-row + .rp-switch-row { border-top: 1px solid #e3ecf5; }
.rp-switch-row.is-disabled { opacity: .5; cursor: default; }
.rp-switch-text { display: grid; gap: 3px; min-width: 0; }
.rp-switch-text strong { color: #19324d; font-size: 13px; }
.rp-switch-text small { color: #6a7f95; font-size: 11px; line-height: 1.4; }
.rental-proxy-dialog input.rp-switch { appearance:none; -webkit-appearance:none; flex:0 0 42px; position:relative; width:42px; min-width:42px; max-width:42px; height:24px; min-height:24px; margin:0; padding:0; border:0; border-radius:999px; background:#cfd9e4; cursor:pointer; transition:background .15s; }
.rp-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.rental-proxy-dialog input.rp-switch:checked { background:#6841ff; }
.rp-switch:checked::after { transform: translateX(18px); }
.rp-switch:disabled { cursor: default; }
.rental-proxy-dialog input.rp-switch:focus-visible { outline:2px solid #6841ff; outline-offset:2px; }
.proxy-custom-fields { grid-template-columns:130px minmax(0,1fr); align-items:start; }
.proxy-custom-fields.hidden { display: none; }
.proxy-custom-fields > label { grid-template-rows:18px 42px auto; align-content:start; }
.proxy-custom-fields select { width:100%; height:42px; min-height:42px; padding:8px 10px; border:1px solid #cbd9e8; border-radius:9px; background:#fff; color:#19324d; font:inherit; }
.proxy-address-input { display:flex; align-items:stretch; gap:8px; height:42px; }
.proxy-address-input input { flex:1 1 auto; min-width:0; height:42px; min-height:42px; font-family:ui-monospace,Consolas,monospace; }
.proxy-address-input .btn { flex:0 0 auto; height:42px; min-height:42px; padding:0 14px; }
@media (max-width: 560px) { .proxy-custom-fields { grid-template-columns: 1fr; } }
.rental-more-menu .ui-icon { width: 14px; height: 14px; }
.rental-screen-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10,30,55,.28);
}
body.rental-screen-open { overflow: hidden; }
.rental-screen-dialog {
  display: flex;
  flex-direction: column;
  width: min(calc(100vw - 16px),450px);
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid #cbddee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(11,55,111,.24);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.rental-screen-dialog input,.rental-screen-dialog textarea,.rental-screen-dialog select,.rental-screen-dialog [contenteditable="true"]{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}
.rental-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px solid #dbe7f3;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.rental-screen-head span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; }
.rental-screen-head h2 { margin: 0; font-size: 16px; }
.rental-screen-close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0 0 2px;
  border: 1px solid #d4e1ee;
  border-radius: 9px;
  background: #fff;
  color: #45627f;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.rental-screen-close:hover { border-color: #aabfd4; background: #f6f9fc; }
.rental-screen-body {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 7px;
  overflow: hidden;
  background: #eef3f8;
}
.rental-screen-stage {
  --j2me-screen-ratio: 2 / 3;
  --j2me-screen-scale: .6666667;
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  aspect-ratio: var(--j2me-screen-ratio);
  overflow: hidden;
  border: 1px solid #aab8c7;
  border-radius: 8px;
  background: #101418;
  box-shadow: 0 8px 22px rgba(9,28,48,.13);
  touch-action:none;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
.rental-screen-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  touch-action: none;
  cursor: default;
}
.rental-jar-chooser {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  color: var(--text);
}
.rental-jar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid #dbe7f3;
  background: #f7fbff;
}
.rental-jar-head > div { display: grid; gap: 2px; min-width: 0; }
.rental-jar-head span { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.rental-jar-head strong { color: var(--blue-dark); font-size: 14px; font-weight: 600; }
.rental-jar-head button,
.rental-jar-tabs button,
.rental-jar-upload button,
.rental-jar-card button {
  min-height: 34px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}
.rental-jar-tabs {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid #dbe7f3;
  background: #fff;
}
.rental-jar-tabs button.active { background: var(--blue); color: #fff; }
.rental-jar-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 12px 12px; }
.rental-jar-pane { display: grid; gap: 9px; }
.rental-jar-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rental-jar-pane-head span { color: var(--blue-dark); font-size: 13px; font-weight: 600; }
.rental-jar-pane-head small { color: var(--muted); font-size: 10px; font-weight: 600; }
.rental-jar-list { display: grid; gap: 7px; }
.rental-jar-card {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d5e4f2;
  border-radius: 9px;
  background: #fff;
}
.rental-jar-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #a9ccef;
  border-radius: 9px;
  background: #eef6ff;
  color: var(--blue);
}
.rental-jar-card-icon .ui-icon { width: 19px; height: 19px; }
.rental-jar-card-icon img { width: 28px; height: 28px; border-radius: 5px; object-fit: contain; }
.rental-jar-card-info { display: grid; gap: 2px; min-width: 0; }
.rental-jar-card-info strong { overflow: hidden; color: var(--blue-dark); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rental-jar-card-info small { color: var(--muted); font-size: 10px; }
.rental-jar-card button { min-width: 56px; }
.rental-jar-empty { padding: 18px 10px; border: 1px dashed #a9ccef; border-radius: 9px; color: var(--muted); font-size: 11px; text-align: center; }
.rental-jar-upload { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 8px; border: 1px dashed #9fc4ef; border-radius: 9px; background: #f7fbff; }
.rental-jar-upload > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rental-jar-upload button:disabled { opacity: .5; cursor: wait; }
.rental-jar-limit { color: var(--muted); font-size: 10px; }
.rental-jar-message { min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.rental-jar-message.error { color: #9b2c2c; }
.rental-screen-stage.native-ui-active canvas { pointer-events: none; }
.rental-screen-stage.native-transitioning::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  border-radius: inherit;
  background: #fff;
  pointer-events: auto;
}
.rental-screen-stage:focus-visible { outline: 2px solid rgba(23,105,217,.38); outline-offset: 2px; }
.rental-midp-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  overflow: hidden;
  padding: 0;
  background: #fff;
  color: var(--text);
}
.rental-midp-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.rental-midp-title {
  flex: 0 0 auto;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #dbe7f3;
  background: #f7fbff;
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.rental-midp-body {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  background: #fff;
}
.rental-midp-item { display: grid; gap: 6px; margin: 0; }
.rental-midp-label {
  display: block;
  margin: 0;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.rental-midp-input,
.rental-midp-textarea,
.rental-midp-select {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #b8cee5;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: none;
}
.rental-midp-input:focus,
.rental-midp-textarea:focus,
.rental-midp-select:focus { border-color: var(--blue); outline: 2px solid rgba(23,105,217,.10); }
.rental-midp-textarea { min-height: 88px; resize: vertical; }
.rental-midp-string { margin: 0; color: var(--muted); white-space: pre-wrap; font-size: 13px; line-height: 1.5; }
.rental-midp-choice { display: grid; gap: 7px; padding: 9px; border: 1px solid #d7e5f3; border-radius: 9px; background: #f7fbff; }
.rental-midp-choice label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.rental-midp-gauge { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 2px 1px 6px; }
.rental-midp-gauge input,
.rental-midp-gauge progress { width: 100%; }
.rental-midp-list { display: grid; gap: 1px; }
.rental-midp-list-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 5px 7px;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  color: #111;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  text-align: left;
}
.rental-midp-list-option:hover { background: #f1f5f9; }
.rental-midp-list-option:focus-visible { background: #f1f5f9; outline: 2px solid rgba(23,105,217,.22); outline-offset: -2px; }
.rental-midp-list-option.selected { background: #dcecff; color: #0b57b7; font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.rental-midp-list-option.selected .rental-midp-list-marker { background: var(--blue); color: #fff; }
.rental-midp-list-option input { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--blue); }
.rental-midp-list-icon { width: 24px; height: 24px; object-fit: contain; }
.rental-midp-list-marker { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #edf2f7; color: #36506b; font-size: 11px; }
.rental-midp-list-label { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; line-height: 1.4; }
.rental-midp-list-state { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transform: scale(.75); transition: opacity .12s ease, transform .12s ease; }
.rental-midp-list-option.selected .rental-midp-list-state { opacity: 1; transform: scale(1); }
.rental-midp-actions {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  flex: 0 0 auto;
  gap: 6px;
  padding: 10px 14px 12px;
  border-top: 1px solid #dbe7f3;
  background: #f7fbff;
}
.rental-midp-actions:empty { display: none; }
.rental-midp-actions > button {
  width: 100%;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #a9ccef;
  border-radius: 9px;
  background: #fff;
  color: #254b73;
  font-size: 12px;
  font-weight: 600;
}
.rental-midp-softkey-spacer { min-width: 0; }
.rental-midp-command-menu {
  position: absolute;
  left: 14px;
  bottom: calc(100% + 6px);
  z-index: 8;
  display: grid;
  gap: 2px;
  width: min(240px,calc(100% - 28px));
  max-height: min(280px,60vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid #b8cee5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20,54,93,.18);
}
.rental-midp-command-menu button {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #254b73;
  text-align: left;
}
.rental-midp-command-menu button:hover,
.rental-midp-command-menu button:focus-visible { background: #eaf4ff; outline: none; }
.rental-midp-actions button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.rental-midp-actions button:disabled { opacity: .55; cursor: wait; }

/* Popup J2ME giữ kích thước chuẩn ở 320px và chỉ thu nhỏ khi khung hẹp hơn. */
.rental-midp-title {
  padding: calc(12px * var(--rental-midp-scale,1)) calc(14px * var(--rental-midp-scale,1)) calc(10px * var(--rental-midp-scale,1));
  font-size: calc(15px * var(--rental-midp-scale,1));
}
.rental-midp-body {
  gap: calc(10px * var(--rental-midp-scale,1));
  padding: calc(12px * var(--rental-midp-scale,1)) calc(14px * var(--rental-midp-scale,1));
}
.rental-midp-item { gap: calc(6px * var(--rental-midp-scale,1)); }
.rental-midp-label,
.rental-midp-input,
.rental-midp-textarea,
.rental-midp-select,
.rental-midp-string,
.rental-midp-choice label,
.rental-midp-list-option { font-size: calc(13px * var(--rental-midp-scale,1)); }
.rental-midp-input,
.rental-midp-textarea,
.rental-midp-select {
  min-height: calc(38px * var(--rental-midp-scale,1));
  padding: calc(8px * var(--rental-midp-scale,1)) calc(10px * var(--rental-midp-scale,1));
  border-radius: calc(9px * var(--rental-midp-scale,1));
}
.rental-midp-textarea { min-height: calc(88px * var(--rental-midp-scale,1)); }
.rental-midp-choice {
  gap: calc(7px * var(--rental-midp-scale,1));
  padding: calc(9px * var(--rental-midp-scale,1));
  border-radius: calc(9px * var(--rental-midp-scale,1));
}
.rental-midp-choice label,
.rental-midp-gauge,
.rental-midp-list-option { gap: calc(7px * var(--rental-midp-scale,1)); }
.rental-midp-list-option {
  min-height: calc(34px * var(--rental-midp-scale,1));
  padding: calc(5px * var(--rental-midp-scale,1)) calc(7px * var(--rental-midp-scale,1));
}
.rental-midp-list-option input {
  width: calc(17px * var(--rental-midp-scale,1));
  height: calc(17px * var(--rental-midp-scale,1));
}
.rental-midp-list-icon {
  width: calc(24px * var(--rental-midp-scale,1));
  height: calc(24px * var(--rental-midp-scale,1));
}
.rental-midp-list-marker {
  flex-basis: calc(24px * var(--rental-midp-scale,1));
  width: calc(24px * var(--rental-midp-scale,1));
  height: calc(24px * var(--rental-midp-scale,1));
  font-size: calc(11px * var(--rental-midp-scale,1));
}
.rental-midp-list-state {
  flex-basis: calc(20px * var(--rental-midp-scale,1));
  width: calc(20px * var(--rental-midp-scale,1));
  height: calc(20px * var(--rental-midp-scale,1));
  font-size: calc(12px * var(--rental-midp-scale,1));
}
.rental-midp-actions {
  gap: calc(6px * var(--rental-midp-scale,1));
  padding: calc(10px * var(--rental-midp-scale,1)) calc(14px * var(--rental-midp-scale,1)) calc(12px * var(--rental-midp-scale,1));
}
.rental-midp-actions > button {
  min-height: calc(36px * var(--rental-midp-scale,1));
  padding: calc(7px * var(--rental-midp-scale,1)) calc(13px * var(--rental-midp-scale,1));
  border-radius: calc(9px * var(--rental-midp-scale,1));
  font-size: calc(12px * var(--rental-midp-scale,1));
}
.rental-midp-command-menu button {
  min-height: calc(34px * var(--rental-midp-scale,1));
  padding: calc(6px * var(--rental-midp-scale,1)) calc(8px * var(--rental-midp-scale,1));
  border-radius: calc(6px * var(--rental-midp-scale,1));
  font-size: calc(12px * var(--rental-midp-scale,1));
}
.rental-screen-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #d8e6f3;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.rental-screen-status.error { color: #ffb7b7; }
.rental-screen-status.loading {
  z-index: 10;
  align-content: center;
  gap: calc(18px * var(--rental-midp-scale,1));
  background: #fff;
  color: #1769d9;
  font-size: calc(13px * var(--rental-midp-scale,1));
  font-weight: 600;
}
.rental-loading-box {
  position: relative;
  display: block;
  width: calc(40px * var(--rental-midp-scale,1));
  height: calc(40px * var(--rental-midp-scale,1));
}
.rental-loading-box > i {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid #1769d9;
  border-radius: calc(4px * var(--rental-midp-scale,1));
}
.rental-loading-box-one { animation: rental-box-rotate 4.5s linear infinite reverse; }
.rental-loading-box-two { animation: rental-box-rotate 3.5s linear infinite; }
.rental-loading-label { display: block; max-width: 90%; font-size: calc(13px * var(--rental-midp-scale,1)); }
@keyframes rental-box-rotate {
  from { background-color: rgba(23,105,217,.16); transform: rotate(0deg); }
  to { background-color: rgba(117,82,255,.06); transform: rotate(360deg); }
}
@media (prefers-reduced-motion:reduce) {
  .rental-loading-box-one { animation-duration: 9s; }
  .rental-loading-box-two { animation-duration: 7s; }
}
.rental-screen-footer {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  padding: 11px 15px 14px;
  border-top: 1px solid #dbe7f3;
}
.rental-screen-footer button {
  min-height: 38px;
  border: 1px solid #bfd3e8;
  border-radius: 9px;
  background: #fff;
  color: #214e7a;
  font-size: 12px;
  font-weight: 600;
}
.rental-screen-footer button:hover { border-color: #8eafd0; background: #f4f8fc; }
.rental-screen-footer button:disabled { opacity: .55; cursor: wait; }
.standalone-session {
  min-height: 100dvh;
  overflow: auto;
  background: #eef6ff;
}
.standalone-session > #viewMessage {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 50%;
  width: min(520px,calc(100vw - 20px));
  margin: 0;
  transform: translateX(-50%);
}
.session-view-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 10px;
  background: #eef6ff;
}
.standalone-session,.standalone-session .session-view-shell,.standalone-session .session-view-dialog{overscroll-behavior:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.standalone-session input,.standalone-session textarea,.standalone-session select,.standalone-session [contenteditable="true"]{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}
.session-view-dialog {
  display: flex;
  flex-direction: column;
  width: min(520px,calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
  overflow: hidden;
  border: 1px solid #d7e4f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(20,54,93,.18);
}
.session-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #dbe7f3;
  background: #f7fbff;
}
.standalone-session-title,
.standalone-session-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.standalone-session-title strong {
  overflow: hidden;
  color: #14365d;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standalone-session-title span,
.standalone-session-meta .rental-machine-line code {
  overflow: hidden;
  color: #637d9c;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.standalone-session-meta {
  flex: 0 0 auto;
  text-align: right;
}
.standalone-session-meta .rental-machine-line {
  min-width: 0;
  margin: 0;
  justify-content: flex-end;
}
.standalone-session-meta > strong {
  color: #0f4fa9;
  font: 700 13px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
}
.session-view-body {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
  background: #eef3f8;
}
.session-view-footer {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  border-top: 1px solid #dbe7f3;
  background: #f7fbff;
}
.session-view-footer button {
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid #bfd3e8;
  border-radius: 9px;
  background: #fff;
  color: #214e7a;
  font-size: 11px;
  font-weight: 600;
}
.session-view-footer button:hover { border-color: #8eafd0; background: #f4f8fc; }
.session-view-footer button:disabled { opacity: .55; cursor: wait; }
.session-embedded-root,.session-embedded { overflow:hidden; background:#071425; }
.session-embedded .session-view-shell { min-height:100dvh; padding:0; background:#071425; }
.session-embedded .session-view-dialog { width:100%; height:100dvh; max-height:none; border:0; border-radius:0; box-shadow:none; }
.session-embedded .session-view-head,.session-embedded .session-view-footer { display:none; }
.session-embedded .session-view-body { position:relative; display:block; padding:0; background:#071425; }
.session-embedded .rental-screen-stage { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; aspect-ratio:auto; border:0; border-radius:0; box-shadow:none; }
.session-embedded .rental-screen-stage canvas { width:100%; height:100%; object-fit:fill; }

.sync-page-heading { margin-bottom:20px; }
.sync-control-panel { display:grid; gap:16px; margin-bottom:20px; padding:18px; border:1px solid #cfe0f4; border-radius:18px; background:#fff; box-shadow:0 14px 34px rgba(26,77,133,.08); }
.sync-control-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.sync-control-brand img { width:76px; height:48px; object-fit:contain; }
.sync-control-brand div { display:grid; gap:3px; }
.sync-control-brand strong { color:#123a68; font-size:16px; font-weight:600; }
.sync-control-brand span { color:#7187a1; font-size:12px; font-weight:500; }
.sync-control-actions { display:flex; flex-wrap:wrap; gap:8px; }
.sync-control-actions .btn svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sync-control-actions [aria-pressed="true"] { background:#1769d9; color:#fff; }
.sync-control-settings { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.sync-range,.sync-switch { min-width:0; min-height:66px; padding:11px 12px; border:1px solid #d5e3f3; border-radius:13px; background:#f7fbff; }
.sync-range { display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px; color:#244e79; font-size:11px; font-weight:600; }
.sync-range input { grid-column:1/-1; width:100%; accent-color:#1769d9; }
.sync-range output { color:#1769d9; font-weight:600; }
.sync-switch { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; }
.sync-switch > span { display:grid; gap:3px; color:#244e79; font-size:11px; }
.sync-switch strong { font-weight:600; }
.sync-switch small { color:#7a8fa7; font-size:9px; font-weight:500; line-height:1.35; }
.sync-switch input { position:absolute; opacity:0; pointer-events:none; }
.sync-switch i { position:relative; width:38px; height:22px; flex:0 0 38px; border-radius:999px; background:#bfd1e5; transition:.2s ease; }
.sync-switch i::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:.2s ease; }
.sync-switch input:checked+i { background:#1769d9; }
.sync-switch input:checked+i::after { transform:translateX(16px); }
.sync-keypad { display:grid; grid-template-columns:repeat(9,minmax(0,1fr)); gap:7px; }
.sync-keypad button { min-height:36px; padding:6px 8px; border:1px solid #bfd3e8; border-radius:9px; background:#fff; color:#1769d9; font-size:10px; font-weight:600; }
.sync-keypad button:hover { background:#1769d9; color:#fff; }
.sync-device-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(var(--sync-small-width,210px),1fr)); align-items:start; gap:16px; }
.sync-device-card { min-width:0; overflow:hidden; border:1px solid #cfe0f4; border-radius:16px; background:#fff; box-shadow:0 10px 28px rgba(26,77,133,.08); }
.sync-device-card.main { grid-column:span 2; width:min(100%,var(--sync-main-width,320px)); border-color:#1769d9; box-shadow:0 16px 38px rgba(23,105,217,.16); }
.sync-device-card.floating-main { position:fixed; z-index:200; top:84px; right:24px; grid-column:auto; width:min(var(--sync-main-width,320px),calc(100vw - 32px)); box-shadow:0 22px 60px rgba(15,53,94,.25); }
.sync-device-card.floating-main > header { cursor:move; }
.sync-device-card.hidden { display:none; }
.sync-device-card > header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 11px 7px; }
.sync-device-card label { min-width:0; display:flex; align-items:center; gap:8px; color:#153a64; font-size:12px; font-weight:600; cursor:pointer; }
.sync-device-card label input { width:16px; height:16px; accent-color:#1769d9; }
.sync-checkmark { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sync-device-card-actions { display:flex; gap:5px; }
.sync-device-card-actions button,.sync-device-card-actions a { width:30px; height:30px; display:grid; place-items:center; border:1px solid #bfd3e8; border-radius:8px; background:#fff; color:#1769d9; }
.sync-device-card-actions button:hover,.sync-device-card-actions a:hover { background:#1769d9; color:#fff; }
.sync-device-card-actions svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sync-device-code { display:flex; justify-content:space-between; gap:8px; padding:0 11px 9px; color:#7a8fa7; font-size:9px; font-weight:500; }
.sync-device-code span { color:#1769d9; }
.sync-device-screen { position:relative; width:100%; aspect-ratio:var(--sync-screen-ratio,2/3); overflow:hidden; border-top:1px solid #dbe7f3; background:#071425; }
.sync-device-screen iframe,.sync-touch-layer { position:absolute; inset:0; width:100%; height:100%; border:0; }
.sync-touch-layer { z-index:2; cursor:default; touch-action:none; outline:none; }
.sync-page:not(.sync-small-control-enabled) .sync-device-card:not(.main) .sync-touch-layer { cursor:default; }
.sync-page:not(.sync-small-control-enabled) .sync-device-card:not(.main) .sync-device-screen::after { content:"Bật điều khiển màn nhỏ để thao tác"; position:absolute; z-index:3; left:50%; bottom:8px; transform:translateX(-50%); width:max-content; max-width:calc(100% - 16px); padding:4px 7px; border-radius:6px; background:rgba(7,20,37,.76); color:#fff; font-size:8px; font-weight:500; pointer-events:none; opacity:0; transition:opacity .18s ease; }
.sync-page:not(.sync-small-control-enabled) .sync-device-card:not(.main) .sync-device-screen:hover::after { opacity:1; }
.sync-device-card:not(.selected) { opacity:1; }
.sync-page:not(.sync-small-control-enabled) .sync-device-card:not(.main) .sync-touch-layer { pointer-events:auto; }
.rental { position:relative; }
.rental-sync-check { position:absolute; z-index:4; top:15px; right:15px; width:17px; height:17px; display:grid; place-items:center; cursor:pointer; }
.rental-sync-check input { position:absolute; opacity:0; pointer-events:none; }
.rental-sync-check span { width:17px; height:17px; display:grid; place-items:center; border:1px solid #b8cde3; border-radius:5px; background:#fff; color:#1769d9; box-shadow:0 3px 8px rgba(20,64,110,.12); }
.rental-sync-check svg { width:10px; height:10px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; opacity:0; }
.rental-sync-check input:checked+span { border-color:#1769d9; background:#1769d9; color:#fff; }
.rental-sync-check input:checked+span svg { opacity:1; }
.rental.sync-selected { border-color:#1769d9; box-shadow:0 13px 30px rgba(23,105,217,.14); }
.rental-list[data-view="cards"] .rental-sync-check { top:15px; right:15px; }
.rental-list[data-view="cards"] .rental-thumb { position:relative; }
.rental-list[data-view="cards"] .rental-thumb::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(135deg,rgba(255,255,255,.35),transparent 38%); }
@media (max-width:980px) { .sync-control-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }.sync-keypad { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:620px) { .sync-control-settings { grid-template-columns:1fr; }.sync-device-grid { grid-template-columns:1fr; }.sync-device-card.main { grid-column:auto; width:100%; }.sync-device-card { width:100%; }.sync-control-brand img { width:64px; }.sync-control-panel { padding:14px; } }

/* Màn hình đồng bộ độc lập */
.sync-page { min-height:100dvh; margin:0; overflow-x:hidden; background:#f3f7fc; color:#142d49; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.sync-page input,.sync-page textarea,.sync-page select { -webkit-user-select:none; user-select:none; }
.sync-page,.sync-page button,.sync-page input { font-family:"Be Vietnam Pro",system-ui,-apple-system,"Segoe UI",sans-serif; }
.sync-shell { min-height:100dvh; display:grid; grid-template-columns:300px minmax(0,1fr); }
.sync-sidebar { position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; gap:16px; overflow-y:auto; padding:18px; border-right:1px solid #ddd3ff; background:#fff; box-shadow:10px 0 32px rgba(104,65,255,.08); }
.sync-sidebar-head { display:grid; grid-template-columns:34px 62px minmax(0,1fr); align-items:center; gap:9px; padding-bottom:15px; border-bottom:1px solid #e7e0ff; }
.sync-sidebar-head img { width:62px; height:44px; object-fit:contain; }
.sync-sidebar-head > div { min-width:0; display:grid; gap:3px; }
.sync-sidebar-head strong { color:#39218f; font-size:14px; font-weight:600; }
.sync-sidebar-head span { overflow:hidden; color:#6f86a0; font-size:9px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.sync-back { width:34px; height:34px; display:grid; place-items:center; border:1px solid #cfc2ff; border-radius:9px; background:#fff; color:#6841ff; }
.sync-back:hover { background:#6841ff; color:#fff; }
.sync-back svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sync-sidebar .sync-control-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.sync-sidebar > .sync-control-actions { margin-top:auto; }
.sync-sidebar .sync-control-actions .btn { width:100%; min-height:36px; justify-content:center; padding:7px 8px; font-size:10px; }
.sync-sidebar-section { display:grid; gap:9px; }
.sync-sidebar-section h2 { margin:0; color:#725bb8; font-size:9px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; }
.sync-device-picker-section { min-height:0; align-content:start; flex:1 1 auto; }
.sync-device-picker { display:grid; grid-template-columns:repeat(auto-fill,34px); gap:6px; align-content:start; justify-content:start; overflow-y:auto; padding:1px; }
.sync-device-picker button { width:34px; min-width:34px; height:30px; display:grid; place-items:center; padding:0; border:1px solid #cfc2ff; border-radius:7px; background:#fff; color:#6841ff; font-size:10px; font-weight:600; }
.sync-device-picker button:hover,.sync-device-picker button:focus-visible { border-color:#6841ff; background:#f1edff; }
.sync-device-picker button.main { border-color:#6841ff; background:#6841ff; color:#fff; }
.sync-device-picker button.selected,.sync-device-picker button.main.selected { border-color:#6841ff; background:#6841ff; color:#fff; box-shadow:0 0 0 2px rgba(104,65,255,.13); }
.sync-device-picker button.active-device,.sync-device-picker button.main.active-device { border-color:#f2c94c; box-shadow:0 0 0 2px rgba(242,201,76,.78),0 0 10px rgba(242,201,76,.62); }
.sync-sidebar .sync-control-settings { display:grid; grid-template-columns:1fr; gap:8px; }
.sync-sidebar .sync-range,.sync-sidebar .sync-switch { min-height:58px; padding:9px 10px; }
.sync-sidebar .sync-keypad { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.sync-sidebar .sync-keypad button { min-height:34px; padding:5px; font-size:9px; }
.sync-sidebar footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:0; padding-top:14px; border-top:1px solid #dbe7f3; color:#7890aa; font-size:9px; font-weight:500; }
.sync-sidebar footer a { color:#1769d9; font-weight:600; }
.sync-workspace { min-width:0; padding:10px; }
.sync-workspace-head { margin-bottom:18px; }
.sync-workspace-head > div { display:grid; gap:5px; }
.sync-workspace-head > div > span { color:#1769d9; font-size:9px; font-weight:600; letter-spacing:.16em; }
.sync-workspace-head h1 { margin:0; color:#112f51; font-size:clamp(24px,3vw,38px); line-height:1.1; font-weight:600; letter-spacing:-.04em; }
.sync-workspace-head h1 span { color:#1769d9; }
.sync-workspace-head p { margin:0; color:#7187a1; font-size:12px; font-weight:500; }
.sync-workspace .sync-device-grid { grid-template-columns:repeat(auto-fill,minmax(var(--sync-small-width,210px),var(--sync-small-width,210px))); }
@media (max-width:780px) {
  .sync-shell { grid-template-columns:1fr; }
  .sync-sidebar { position:relative; height:auto; overflow:visible; border-right:0; border-bottom:1px solid #ccdded; }
  .sync-sidebar .sync-control-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sync-sidebar footer { margin-top:0; }
  .sync-workspace { padding:10px; }
}
@media (max-width:520px) { .sync-sidebar .sync-control-settings { grid-template-columns:1fr; } }

/* Bố cục màn hình và công cụ theo Sync Control */
.sync-sidebar .sync-control-settings { gap:9px; padding:10px; border:1px solid #e1d9ff; border-radius:10px; background:#faf8ff; }
.sync-sidebar .sync-range { min-height:0; padding:0; border:0; border-radius:0; background:transparent; }
.sync-sidebar .sync-range span { grid-column:1; grid-row:1; color:#647b94; }
.sync-sidebar .sync-range output { grid-column:2; grid-row:1; justify-self:end; font-size:10px; }
.sync-sidebar .sync-range input { grid-column:1/-1; grid-row:2; }
.sync-sidebar .sync-range input { accent-color:#6841ff; }
.sync-sidebar .sync-switch { min-height:36px; padding:7px 9px; border-color:#e1d9ff; border-radius:9px; background:#fff; }
.sync-sidebar .sync-switch > span { order:2; }
.sync-sidebar .sync-switch i { order:1; width:32px; height:18px; flex-basis:32px; }
.sync-sidebar .sync-switch i::after { width:12px; height:12px; }
.sync-sidebar .sync-switch input:checked+i::after { transform:translateX(14px); }
.sync-sidebar .sync-switch input:checked+i { background:#6841ff; }
.sync-sidebar .sync-switch small { display:none; }
.sync-sidebar .sync-keypad button { border-color:#cfc2ff; color:#6841ff; }
.sync-sidebar .sync-keypad button:hover,.sync-sidebar .sync-keypad button:focus-visible { background:#6841ff; color:#fff; }
.sync-sidebar footer { border-top-color:#e7e0ff; }
.sync-sidebar footer a { color:#6841ff; }

.sync-workspace .sync-device-card,.sync-workspace .sync-device-card.main,.sync-workspace .sync-device-card.selected { overflow:visible; border:0; border-radius:10px; background:transparent; box-shadow:none; }
.sync-workspace .sync-device-card.main {
  grid-column:1 / -1;
  width:100%;
  display:grid;
  grid-template-columns:min(var(--sync-main-width,320px),calc((100dvh - 156px) * var(--sync-screen-scale,.6666667)),calc(100% - 188px)) 180px;
  align-items:start;
  gap:8px;
}
.sync-workspace .sync-device-card:not(.main) { width:var(--sync-small-width,210px); }
.sync-workspace .sync-device-screen { container-type:inline-size; overflow:hidden; border:0; border-radius:6px; outline:1px solid #a9bfd6; outline-offset:0; background:#071425; box-shadow:0 14px 34px rgba(15,42,73,.15); transition:outline-color .16s ease,box-shadow .16s ease,opacity .16s ease; }
.sync-workspace .sync-device-card.selected { opacity:1; }
.sync-workspace .sync-device-card.selected .sync-device-screen { outline:2px solid #2f9dff; box-shadow:0 0 0 2px rgba(47,157,255,.72),0 0 14px rgba(23,105,217,.72),0 0 30px rgba(47,157,255,.42),0 16px 36px rgba(15,42,73,.18); }
.sync-workspace .sync-device-card.main .sync-device-screen { border-radius:10px; outline-width:2px; box-shadow:0 22px 54px rgba(15,42,73,.19); }
.sync-workspace .sync-device-card.main.selected .sync-device-screen { outline-color:#2f9dff; box-shadow:0 0 0 2px rgba(47,157,255,.72),0 0 16px rgba(23,105,217,.74),0 0 34px rgba(47,157,255,.44),0 22px 54px rgba(15,42,73,.19); }
.sync-workspace .sync-device-card.active-device .sync-device-screen,.sync-workspace .sync-device-card.main.active-device .sync-device-screen { outline:2px solid #f2c94c; box-shadow:0 0 0 2px rgba(242,201,76,.72),0 0 16px rgba(242,201,76,.68),0 0 34px rgba(255,223,99,.38),0 16px 40px rgba(15,42,73,.18); }
.sync-device-index { position:absolute; z-index:5; top:clamp(7px,2.2cqw,12px); left:50%; display:block; padding:0; border:0; background:transparent; color:#fff; font-size:clamp(12px,5cqw,22px); font-weight:700; line-height:1; pointer-events:none; transform:translateX(-50%); text-shadow:0 1px 3px #27175d,0 0 6px #6841ff; }
.sync-device-overlay { position:absolute; z-index:4; top:8px; left:8px; display:flex; align-items:center; gap:7px; color:#fff; pointer-events:auto; }
.sync-device-overlay label { display:flex; align-items:center; gap:6px; min-width:0; color:#fff; cursor:pointer; }
.sync-device-overlay label input { position:absolute; opacity:0; pointer-events:none; }
.sync-device-overlay label span { width:14px; height:14px; display:grid; place-items:center; flex:0 0 14px; border:1px solid rgba(255,255,255,.85); border-radius:4px; background:rgba(7,20,37,.5); }
.sync-device-overlay label input:checked+span { border-color:#1769d9; background:#1769d9; }
.sync-device-overlay label input:checked+span::after { content:""; width:7px; height:4px; border-left:2px solid #fff; border-bottom:2px solid #fff; transform:translateY(-1px) rotate(-45deg); }
.sync-device-status-dot { width:6px; height:6px; display:block; border-radius:50%; background:#94a3b8; box-shadow:0 0 0 2px rgba(255,255,255,.72),0 2px 8px rgba(0,0,0,.3); }
.sync-device-status-dot.loaded { background:#f0b429; }
.sync-device-status-dot.ready { background:#22c55e; }
.sync-workspace .sync-device-card-actions { position:absolute; z-index:5; top:7px; right:7px; flex-direction:column; opacity:.25; transition:opacity .16s ease; }
.sync-workspace .sync-device-card.main .sync-device-screen > .sync-device-card-actions { display:none; }
.sync-workspace .sync-device-card.native-ui-active .sync-touch-layer { pointer-events:none; }
.sync-workspace .sync-device-card:hover .sync-device-card-actions,.sync-workspace .sync-device-card:focus-within .sync-device-card-actions,.sync-workspace .sync-device-card.main .sync-device-card-actions { opacity:1; }
.sync-workspace .sync-device-card-actions button,.sync-workspace .sync-device-card-actions a { width:15px; height:15px; padding:0; border-radius:4px; border-color:rgba(255,255,255,.72); background:rgba(7,20,37,.46); color:#fff; backdrop-filter:blur(5px); }
.sync-workspace .sync-device-card-actions svg { width:8px; height:8px; }
.sync-workspace .sync-device-card-actions button:hover,.sync-workspace .sync-device-card-actions a:hover { background:#1769d9; }
.sync-workspace .sync-device-card.floating-main { overflow:visible; background:transparent; }
.sync-workspace .sync-device-card.floating-main .sync-device-overlay { cursor:move; }
.sync-workspace .sync-device-card.pinned-main,.sync-workspace .sync-device-card.floating-main {
  position:fixed;
  z-index:200;
  top:20px;
  right:20px;
  width:min(calc(var(--sync-main-width,320px) + 188px),calc(100vw - 40px));
  grid-template-columns:min(var(--sync-main-width,320px),calc((100dvh - 40px) * var(--sync-screen-scale,.6666667)),calc(100vw - 228px)) 180px;
}
.sync-workspace .sync-device-card.floating-main .sync-zoom-menu-head { cursor:grab; touch-action:none; }
.sync-workspace .sync-device-card.floating-main .sync-zoom-menu-head:active { cursor:grabbing; }
.sync-zoom-side-menu { display:none; }
.sync-workspace .sync-device-card.main .sync-zoom-side-menu {
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
  border:1px solid #6841ff;
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,42,73,.1);
}
.sync-zoom-menu-head { min-height:50px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; padding:7px 8px 7px 10px; background:#6841ff; color:#fff; }
.sync-zoom-menu-title { min-width:0; display:flex; align-items:center; gap:8px; }
.sync-zoom-menu-number { flex:0 0 auto; color:#fff; font-size:12px; font-weight:600; }
.sync-zoom-menu-namebox { min-width:0; display:grid; gap:2px; }
.sync-zoom-menu-namebox strong,.sync-zoom-menu-namebox small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sync-zoom-menu-namebox strong { color:#fff; font-size:11px; font-weight:600; }
.sync-zoom-menu-namebox small { color:rgba(255,255,255,.78); font-size:8px; font-weight:500; }
.sync-zoom-menu-close { width:28px; height:28px; display:grid; place-items:center; padding:0; border:1px solid rgba(255,255,255,.45); border-radius:6px; background:transparent; color:#fff; }
.sync-zoom-menu-close:hover,.sync-zoom-menu-close:focus-visible { background:#fff; color:#6841ff; }
.sync-zoom-menu-close svg,.sync-zoom-menu-body svg,.sync-zoom-actions svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sync-zoom-menu-body { min-height:0; display:flex; flex-direction:column; overflow:auto; padding:10px 8px; scrollbar-width:thin; }
.sync-zoom-menu-body > button { width:100%; min-height:36px; display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:0 10px; border:0; border-radius:6px; background:#fff; color:#6841ff; text-align:left; }
.sync-zoom-menu-body > button > svg,.sync-zoom-menu-body > button > b { flex:0 0 auto; }
.sync-zoom-menu-body button b { min-width:0; overflow:hidden; font-size:9px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.sync-zoom-menu-body button:hover,.sync-zoom-menu-body button:focus-visible { background:#f1edff; }
.sync-phone-keypad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-top:8px; padding-top:9px; border-top:1px solid #dbe7f3; }
.sync-phone-keypad button { min-height:34px; display:grid; place-items:center; padding:0; border:1px solid #cfc2ff; border-radius:7px; background:#fff; color:#6841ff; font-size:10px; font-weight:600; }
.sync-phone-keypad button:hover,.sync-phone-keypad button:focus-visible { background:#6841ff; color:#fff; }
.sync-navigation-pad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-top:8px; padding-top:9px; border-top:1px solid #dbe7f3; }
.sync-navigation-pad button { min-height:34px; display:grid; place-items:center; padding:0; border:1px solid #cfc2ff; border-radius:7px; background:#fff; color:#6841ff; font-size:11px; font-weight:600; }
.sync-navigation-pad button:hover,.sync-navigation-pad button:focus-visible { background:#6841ff; color:#fff; }
.sync-zoom-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-top:1px solid #dbe7f3; }
.sync-zoom-actions button { height:38px; display:grid; place-items:center; padding:0; border:0; border-right:1px solid #dbe7f3; border-radius:0; background:#fff; color:#1769d9; }
.sync-zoom-actions button:last-child { border-right:0; }
.sync-zoom-actions button b { display:none; }
.sync-zoom-actions button:hover,.sync-zoom-actions button:focus-visible { background:#1769d9; color:#fff; }
@media (max-width:780px) { .sync-sidebar .sync-control-settings { grid-template-columns:1fr; } }
@media (max-width:620px) {
  .sync-workspace .sync-device-card.main { grid-template-columns:min(var(--sync-main-width,320px),calc(100% - 70px)) 62px; gap:6px; }
  .sync-zoom-menu-head { grid-template-columns:1fr; justify-items:center; gap:4px; min-height:0; padding:5px; }
  .sync-zoom-menu-namebox { display:none; }
  .sync-zoom-menu-title { justify-content:center; }
  .sync-zoom-menu-close { width:34px; height:34px; }
  .sync-zoom-menu-body { align-items:center; gap:2px; padding:4px 3px; scrollbar-width:none; }
  .sync-zoom-menu-body::-webkit-scrollbar { display:none; }
  .sync-zoom-menu-body button { width:36px; min-height:36px; grid-template-columns:1fr; place-items:center; padding:0; }
  .sync-zoom-menu-body button b { display:none; }
  .sync-phone-keypad { grid-template-columns:1fr; width:36px; margin-top:3px; padding-top:4px; }
  .sync-phone-keypad button { min-height:34px; }
  .sync-navigation-pad { grid-template-columns:1fr; width:36px; margin-top:3px; padding-top:4px; }
  .sync-navigation-pad span { display:none; }
  .sync-navigation-pad button { min-height:34px; }
  .sync-zoom-actions { position:absolute; top:100%; right:68px; width:calc(100% - 68px); height:38px; border:1px solid #dbe7f3; border-top:0; }
}
.sync-page.sync-sidebar-collapsed .sync-shell { grid-template-columns:72px minmax(0,1fr); }
.sync-page.sync-sidebar-collapsed .sync-sidebar { padding:12px; overflow:hidden; }
.sync-page.sync-sidebar-collapsed .sync-sidebar-head { display:grid; grid-template-columns:1fr; justify-items:center; padding:0; border:0; }
.sync-page.sync-sidebar-collapsed .sync-sidebar-head img,.sync-page.sync-sidebar-collapsed .sync-sidebar-head > div,.sync-page.sync-sidebar-collapsed .sync-sidebar-section,.sync-page.sync-sidebar-collapsed .sync-control-actions,.sync-page.sync-sidebar-collapsed .sync-sidebar footer { display:none; }
.sync-page.sync-sidebar-collapsed .sync-back { transform:rotate(180deg); }
@media (max-width:560px) {
  .session-view-shell { place-items: start center; padding: 0; }
  .session-view-dialog { width: 100%; max-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .session-view-head { min-height: 54px; padding-inline: 11px; }
  .standalone-session-title { max-width: 58%; }
  .standalone-session-meta .rental-machine-line { max-width: 150px; }
  .session-view-body { padding: 8px; }
  .session-view-footer { padding: 8px 9px calc(9px + env(safe-area-inset-bottom)); }
}
.rental-list[data-view="list"] .rental-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.rental-list[data-view="list"] .rental-actions .btn { justify-content: center; }
.rental-list[data-view="list"] { grid-template-columns: 1fr; }
.rental-list[data-view="list"] .rental {
  grid-template-columns: 104px minmax(0,1.5fr) minmax(130px,.7fr) auto;
}
.rental-list[data-view="list"] .rental-thumb {
  width: 104px;
  height: 78px;
  border-radius: 11px;
}
.rental:hover { border-color: #bfd7f3; box-shadow: 0 12px 30px rgba(31,86,154,.08); }
.rental h3 { font-size: 16px; }
.rental-time { font-size: 22px; letter-spacing: -.02em; }

.table-wrap {
  border-color: #d5e4f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(31,86,154,.04);
}
.table th,
.table td { padding: 13px 14px; }
.table th {
  background: #f4f8fd;
  color: #466788;
  letter-spacing: .045em;
}
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #f8fbff; }

.badge {
  padding: 5px 9px;
  border-color: #bfd4ed;
  background: #f8fbff;
}
.badge.good { border-color: var(--blue); background: var(--blue); color: #fff; }
.badge.warn { border-style: solid; background: var(--blue-soft); }

.notice {
  padding: 14px 16px;
  border-color: #cfe0f3;
  border-radius: 14px;
  background: #f2f7fd;
  line-height: 1.65;
}

.admin-tabs {
  gap: 7px;
  margin: -4px 0 22px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f5f9fe;
}
.admin-tab {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: #587391;
  box-shadow: none;
}
.admin-tab:hover { border-color: transparent; background: #fff; box-shadow: none; }
.admin-tab.active { box-shadow: 0 6px 16px rgba(21,110,232,.16); }
.admin-section .grid-2 { align-items: start; }
.admin-payments-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 26px; }
.deposit-admin-card { display: grid; gap: 0; min-width: 0; padding: 0 !important; overflow: hidden; border: 1px solid #d9e4f0 !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 8px 24px rgba(31,71,117,.055) !important; }
.deposit-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border-bottom: 1px solid #e8eef5; background: linear-gradient(180deg,#fff 0%,#fbfdff 100%); }
.deposit-admin-head > div { min-width: 0; }
.deposit-admin-head h3 { margin: 3px 0 4px; color: #17335b; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.deposit-admin-head p { max-width: 650px; margin: 0; color: #74889f; font-size: 11px; line-height: 1.55; }
.deposit-admin-kicker { color: #3977bb; font-size: 9px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.deposit-admin-switch { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; min-height: 36px; padding: 5px 10px 5px 7px; border: 1px solid #d5e1ee; border-radius: 10px; background: #f7faff; cursor: pointer; transition: border-color .15s ease,background .15s ease; }
.deposit-admin-switch:hover { border-color: #b9cde3; background: #f3f8fe; }
.deposit-admin-switch input { position: absolute; opacity: 0; pointer-events: none; }
.deposit-admin-switch > span { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #c8d3df; transition: .2s ease; }
.deposit-admin-switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28,58,90,.22); transition: .2s ease; }
.deposit-admin-switch input:checked + span { background: #1769d9; }
.deposit-admin-switch input:checked + span::after { transform: translateX(16px); }
.deposit-admin-switch strong { color: #405a75; font-size: 11px; font-weight: 600; white-space: nowrap; }
.deposit-admin-body { display: grid; gap: 0; padding: 0 22px; }
.deposit-admin-section-block { padding: 21px 0; border-bottom: 1px solid #edf2f7; }
.deposit-admin-section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.deposit-admin-section-title > div { display: grid; gap: 2px; min-width: 0; }
.deposit-admin-section-title span { color: #203d5e; font-size: 13px; font-weight: 600; }
.deposit-admin-section-title small { color: #8495a8; font-size: 10px; line-height: 1.45; }
.deposit-admin-account-grid { display: grid; grid-template-columns: 1.05fr .9fr 1.15fr; gap: 13px; }
.deposit-admin-rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 13px; }
.deposit-admin-card .field { display: grid; gap: 7px; min-width: 0; }
.deposit-admin-card .field label { color: #385472; font-size: 11px; font-weight: 600; line-height: 1.2; }
.deposit-admin-card .field input,.deposit-admin-card .field select,.deposit-admin-card .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfdcea; border-radius: 10px; outline: 0; background: #f9fbfe; color: #17324f; font: inherit; font-size: 13px; font-weight: 500; box-shadow: inset 0 1px 1px rgba(30,62,96,.025),0 1px 2px rgba(30,62,96,.025); transition: border-color .15s ease,box-shadow .15s ease,background .15s ease; }
.deposit-admin-card .field select { padding-right: 38px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23697f96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.deposit-admin-card .field input::placeholder,.deposit-admin-card .field textarea::placeholder { color: #9cabb9; font-weight: 500; }
.deposit-admin-card .field input:hover,.deposit-admin-card .field select:hover,.deposit-admin-card .field textarea:hover { border-color: #adc2d9; background-color: #fff; }
.deposit-admin-card .field input:focus,.deposit-admin-card .field select:focus,.deposit-admin-card .field textarea:focus { border-color: #4f8ed8; background-color: #fff; box-shadow: 0 0 0 3px rgba(23,105,217,.09),0 2px 8px rgba(39,83,132,.055); }
.deposit-admin-card .field input[type="number"] { appearance: textfield; }
.deposit-admin-card .field input[type="number"]::-webkit-inner-spin-button,.deposit-admin-card .field input[type="number"]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.deposit-admin-card .field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.deposit-admin-card .field small { margin-top: -1px; color: #8293a5; font-size: 9px; line-height: 1.45; }
.deposit-admin-preview { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border: 1px solid #dce7f2; border-radius: 11px; background: #f6faff; }
.deposit-admin-qr { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #d7e3ef; border-radius: 9px; background: #fff; overflow: hidden; box-shadow: 0 2px 6px rgba(31,71,117,.04); }
.deposit-admin-preview img { position: relative; z-index: 2; display: block; width: 56px; height: 56px; object-fit: contain; background: #fff; }
.deposit-admin-qr-empty { position: absolute; color: #aebdcc; font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.deposit-admin-preview-copy { display: grid; gap: 3px; min-width: 0; }
.deposit-admin-preview-copy span { color: #6f849a; font-size: 9px; font-weight: 600; }
.deposit-admin-preview-copy strong { overflow: hidden; color: #1d3c60; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.deposit-admin-preview-copy small { color: #8394a6; font-size: 9px; line-height: 1.4; }
.deposit-admin-preview-badge { padding: 5px 8px; border: 1px solid #c8dcf2; border-radius: 999px; background: #fff; color: #2e6fb9; font-size: 9px; font-weight: 600; white-space: nowrap; }
.deposit-admin-api { background: transparent; }
.deposit-admin-api-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(230px,.8fr); gap: 13px; }
.deposit-admin-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: #60778f; font-size: 10px; cursor: pointer; }
.deposit-admin-check input { width: 16px; height: 16px; margin: 0; border: 1px solid #b8c9da; border-radius: 5px; appearance: none; background: #fff; cursor: pointer; }
.deposit-admin-check input:checked { border-color: #1769d9; background-color: #1769d9; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 11px; }
.deposit-admin-advanced { margin: 16px 22px 0; border: 1px solid #dfe8f1; border-radius: 11px; background: #f9fbfd; overflow: hidden; }
.deposit-admin-advanced summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; color: #35516f; cursor: pointer; list-style: none; }
.deposit-admin-advanced summary::-webkit-details-marker { display: none; }
.deposit-admin-advanced summary::after { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; margin-left: auto; border-radius: 7px; background: #edf4fb; color: #356fae; font-size: 15px; line-height: 1; }
.deposit-admin-advanced[open] summary::after { content: "−"; }
.deposit-admin-advanced summary span { font-size: 11px; font-weight: 600; }
.deposit-admin-advanced summary small { margin-left: auto; color: #8495a7; font-size: 9px; }
.deposit-admin-advanced-body { display: grid; gap: 13px; padding: 14px; border-top: 1px solid #e6edf4; background: #fff; }
.deposit-admin-promo-toggle { justify-self: start; min-height: auto; }
.deposit-admin-promo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.deposit-admin-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 20px; }
.deposit-admin-actions .btn { min-height: 40px; padding-inline: 20px; border-radius: 10px; }
.deposit-admin-card > .message { margin: -10px 22px 18px; }
.deposit-admin-reconcile { min-width: 0; padding-top: 2px; }
.deposit-admin-reconcile .panel-title { margin-bottom: 10px; }
.deposit-admin-reconcile .table-wrap { max-height: 680px; overflow: auto; }
.admin-section .panel.form,
.admin-section form.panel {
  padding: 22px;
  border-color: #cddff3;
  background: linear-gradient(180deg,#fff,#f9fbfe);
  box-shadow: 0 10px 28px rgba(31,86,154,.06);
}
body[data-page="admin"] .page-hero { padding-top: 34px; }
body[data-page="admin"] .page-hero .container { padding: 22px 26px; }
body[data-page="admin"] .page-hero h1 { font-size: clamp(30px,3.2vw,42px); }
body[data-page="admin"] .section { padding-bottom: 56px; }

.view-shell { padding: 34px 0 0; }
.view-head {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-soft);
}
.view-head h1 { font-size: 30px; letter-spacing: -.03em; }
.view-meta { gap: 7px; }
.view-meta span { border-color: #d3e2f3; background: #f8fbff; }
.view-opening {
  min-height: 220px;
  margin-top: 14px;
  border: 1px dashed #b7d0ed;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
}

.footer {
  margin-top: 60px;
  padding: 34px 0;
  border-top-color: var(--line);
  background: rgba(255,255,255,.88);
}

.rent-result { margin-top: 12px; line-height: 1.5; }
.rent-result a { color: #185fc6; font-weight: 600; text-decoration: underline; }

@media (max-width: 920px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .nav-links {
    top: 71px;
    margin: 0 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .mobile-account-link { display: block; }
  .hero { padding-top: 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero h1 { max-width: 760px; }
  .game-showcase { width: min(100%,720px); margin-inline: auto; }
  .page-hero .container { padding: 24px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .nav { min-height: 68px; }
  .header .brand { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; }
  .nav-links { top: 65px; }
  .nav-actions { display: none; }
  .mobile-toggle { width: 38px; min-width: 38px; min-height: 38px; padding: 0; }
  .hero-grid,
  .hero-grid > *,
  .section-head > *,
  .page-hero .container { min-width: 0; }
  .hero { padding: 40px 0 46px; }
  .hero h1 { max-width: 100%; margin-top: 18px; font-size: clamp(35px,9.6vw,44px); line-height: 1.04; overflow-wrap: break-word; }
  .hero p { font-size: 14px; }
  .hero-actions .btn { width: 100%; }
  .game-showcase { padding: 15px; border-radius: 21px; }
  .game-showcase-head { align-items: center; }
  .game-showcase-head h2 { font-size: 20px; }
  .live-pill { display: none; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card-main { grid-column: auto; grid-template-columns: 58px minmax(0,1fr) auto; padding: 12px; }
  .game-card-main .game-icon { width: 58px; height: 58px; }
  .game-showcase-foot { flex-direction: column; gap: 8px; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 31px; }
  .page-hero { padding: 22px 0 16px; }
  .page-hero .container { padding: 20px; border-radius: 18px; }
  .page-hero h1 { font-size: 34px; }
  .panel { padding: 17px; border-radius: 17px; }
  .auth-card { padding: 22px; border-radius: 20px; }
  .stat { min-height: 96px; }
  .rental { padding: 16px; }
  .admin-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-tab { width: 100%; }
  .view-head { padding: 17px; }
  .footer { margin-top: 42px; }
}

/* ===== Bố cục ứng dụng: tài khoản, thuê J2ME và quản trị ===== */
body[data-page="rent"],
body[data-page="admin"] { background: #f4f8fe; }
body[data-page="rent"]::before,
body[data-page="admin"]::before { display: none; }

body[data-page="dashboard"] .site-header,
body[data-page="rent"] .site-header,
body[data-page="admin"] .site-header {
  width: calc(100% - 260px);
  height: 68px;
  margin-left: 260px;
}
body[data-page="dashboard"] .site-header .header-inner,
body[data-page="rent"] .site-header .header-inner,
body[data-page="admin"] .site-header .header-inner {
  width: calc(100% - 48px);
  max-width: none;
}
body[data-page="dashboard"] .site-header .brand,
body[data-page="rent"] .site-header .brand,
body[data-page="admin"] .site-header .brand,
body[data-page="dashboard"] .site-header .nav-links,
body[data-page="rent"] .site-header .nav-links,
body[data-page="admin"] .site-header .nav-links,
body[data-page="dashboard"] .site-header .btn.btn-primary.desktop-cta,
body[data-page="rent"] .site-header .btn.btn-primary.desktop-cta,
body[data-page="admin"] .site-header .btn.btn-primary.desktop-cta { display: none; }

.rent-account-notice { margin-top: 20px; }

.deposit-panel { margin-top: 20px; padding: 0; overflow: hidden; }
.deposit-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.deposit-panel-head > div > span { color: #6c84a5; font-size: 11px; }
.deposit-panel-head h2 { margin: 4px 0 6px; color: #17335b; font-size: 22px; font-weight: 600; }
.deposit-panel-head { padding: 20px 22px 18px; }
.deposit-panel-head p { max-width: 680px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.deposit-workspace { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr); min-width: 0; }
.deposit-code-column,.deposit-history { min-width: 0; padding: 20px 22px 22px; }
.deposit-history { border-left: 1px solid #e2edf8; background: #fbfdff; }
.deposit-column-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.deposit-column-title > div { display: grid; gap: 3px; min-width: 0; }
.deposit-column-title span { color: #17335b; font-size: 14px; font-weight: 600; }
.deposit-column-title small { color: #7b8ea3; font-size: 10px; line-height: 1.45; }
.deposit-loading,.deposit-empty { padding: 34px 12px; color: var(--muted); text-align: center; font-size: 13px; }
.deposit-bank-grid { display: grid; grid-template-columns: minmax(210px,230px) minmax(0,1fr); align-items: start; gap: 16px; }
.deposit-qr-wrap { display: grid; align-content: start; justify-items: center; gap: 10px; }
.deposit-qr-wrap img { display: block; width: min(100%,230px); aspect-ratio: 1; object-fit: contain; border: 1px solid #d7e5f4; border-radius: 14px; background: #fff; }
.deposit-qr-wrap span { min-width: 128px; padding: 7px 10px; border: 1px solid #cfe0f3; border-radius: 999px; background: #f2f7fd; color: #315a85; font-size: 12px; font-weight: 600; text-align: center; }
.deposit-bank-info { display: grid; align-content: start; width: 100%; border: 1px solid #d5e4f5; border-radius: 12px; overflow: hidden; background: #fff; }
.deposit-info-row { display: grid; grid-template-columns: 116px minmax(0,1fr) 34px; align-items: center; column-gap: 12px; padding: 8px 12px; border-bottom: 1px solid #e2edf8; }
.deposit-info-row:last-child { border-bottom: 0; }
.deposit-info-row > span { color: #5f7898; font-size: 12px; font-weight: 500; line-height: 1.35; }
.deposit-info-row > strong { min-width: 0; color: #17335b; font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.deposit-code-row > strong { color: var(--blue); letter-spacing: .04em; }
.deposit-info-row button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid #bcd4ef; border-radius: 8px; background: #fff; color: var(--blue); }
.deposit-info-row button .ui-icon { width: 15px; height: 15px; }
.deposit-info-row button:hover { border-color: var(--blue); background: #f3f8ff; }
.deposit-state { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 12px 14px; border: 1px solid #cfe0f3; border-radius: 12px; background: #f4f8fd; color: #315a85; font-size: 12px; }
.deposit-state strong { font-weight: 600; }
.deposit-state-dot { width: 9px; height: 9px; flex: 0 0 auto; border: 2px solid var(--blue); border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(23,105,217,.12); }
.deposit-state.success { border-color: var(--blue); background: var(--blue); color: #fff; }
.deposit-state.success .deposit-state-dot { border-color: #fff; background: #fff; box-shadow: none; }
.deposit-notice { margin-top: 14px; white-space: pre-line; }
.deposit-history-list { display: grid; gap: 9px; max-height: 520px; overflow: auto; padding-right: 3px; }
.deposit-history-item { display: grid; gap: 9px; padding: 12px 13px; border: 1px solid #dbe7f3; border-radius: 12px; background: #fff; }
.deposit-history-main,.deposit-history-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.deposit-history-main > div { display: grid; gap: 3px; min-width: 0; }
.deposit-history-main strong { overflow: hidden; color: #17335b; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.deposit-history-main > div > span,.deposit-history-meta span { color: #7b8ea3; font-size: 10px; line-height: 1.4; }
.deposit-history-meta strong { flex: 0 0 auto; color: #17335b; font-size: 13px; font-weight: 600; }
.deposit-history-meta span { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.deposit-history-status { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #cedceb; border-radius: 999px; background: #f6f9fc; color: #526b84; font-size: 9px; font-weight: 600; }
.deposit-history-status.success { border-color: #b8d5f5; background: #edf6ff; color: #1769d9; }
.deposit-history-status.failed { border-color: #d8e0e9; background: #f3f5f7; color: #77889a; }
.deposit-history-status.pending { border-color: #c9dbef; background: #f4f8fd; color: #315a85; }
.deposit-history-empty { padding: 40px 12px; color: #7b8ea3; font-size: 12px; text-align: center; }
@media (max-width: 1180px) {
  .deposit-workspace { grid-template-columns: 1fr; }
  .deposit-history { border-top: 1px solid #e2edf8; border-left: 0; }
  .deposit-history-list { max-height: 380px; }
}
@media (max-width: 680px) {
  .deposit-panel { padding: 0; }
  .deposit-panel-head { display: grid; padding: 16px; }
  .deposit-panel-head .btn { width: 100%; justify-content: center; }
  .deposit-code-column,.deposit-history { padding: 16px; }
  .deposit-bank-grid { grid-template-columns: 1fr; }
  .deposit-qr-wrap img { width: min(82vw,260px); }
  .deposit-info-row { grid-template-columns: 1fr auto; gap: 6px 10px; padding: 9px 12px; }
  .deposit-info-row > span { grid-column: 1/-1; }
  .deposit-info-row > strong { grid-column: 1; }
  .deposit-info-row > button { grid-column: 2; }
  .deposit-history-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .deposit-history-meta span { text-align: left; white-space: normal; }
}
.rent-account-plans .plan {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 17px;
}
.rent-account-plans .plan-image {
  width: calc(100% - 14px);
  aspect-ratio: 16 / 10;
  margin: 7px 7px 0;
  border: .5px solid #d2e3f6;
  border-radius: 14px;
  box-shadow: 0 3px 9px rgba(31,86,154,.035);
}
.rent-account-plans .plan-card-main {
  min-width: 0;
  padding: 18px 18px 10px;
}
.rent-account-plans .plan-card-main h3 { margin: 0 0 6px; font-size: 16px; }
.rent-account-plans .plan-card-main > .muted { margin: 0; line-height: 1.55; }
.rent-account-plans .plan .price { margin: 14px 0 4px; font-size: 30px; }
.rent-account-plans .plan-card-actions {
  margin-top: auto;
  padding: 10px 18px 18px;
}
.rent-account-plans .plan-card-actions .btn {
  width: 100%;
  margin-top: 0;
  justify-content: center;
}
.rent-account-plans .plan-badge { top: 14px; right: 18px; z-index: 2; }
body[data-page="rent"] .rent-account-plans .plan {
  border-color: #e5def7;
  background: #fff;
  box-shadow: 0 10px 30px rgba(49,35,94,.07);
}
body[data-page="rent"] .rent-account-plans .plan:hover {
  border-color: #c9bbff;
  box-shadow: 0 18px 40px rgba(49,35,94,.10);
}
body[data-page="rent"] .rent-account-plans .plan.featured {
  border-color: #8f73ff;
  box-shadow: 0 20px 45px rgba(105,67,255,.13);
}
body[data-page="rent"] .rent-account-plans .plan-image {
  border-color: #ddd4fa;
  background: linear-gradient(145deg,#f8f6ff,#eee9ff);
  box-shadow: 0 3px 9px rgba(73,55,139,.05);
}
body[data-page="rent"] .rent-account-plans .plan-card-main h3 { color: #17172f; }
body[data-page="rent"] .rent-account-plans .plan-card-main > .muted,
body[data-page="rent"] .rent-account-plans .plan .duration { color: #8f899f; }
body[data-page="rent"] .rent-account-plans .plan .price { color: #6943ff; }
body[data-page="rent"] .rent-account-plans .plan-badge {
  border-color: #c7e985;
  background: #dffc9b;
  color: #31572d;
}
body[data-page="rent"] .rent-account-plans .plan-card-actions .btn-primary {
  border-color: #6943ff;
  background: #6943ff;
  color: #fff;
}
body[data-page="rent"] .rent-account-plans .plan-card-actions .btn-primary:hover {
  border-color: #5634dd;
  background: #5634dd;
}
.rent-confirm-dialog { width: min(430px,100%); }
.rent-confirm-fields { grid-template-columns: 1fr; padding-bottom: 4px; }
.rent-confirm-dialog .rental-extension-summary strong { color: #17335b; }
.admin-app-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 0; }
.admin-stat-card { min-height: 128px; padding: 20px; }
.admin-stat-card span { color: #6c84a5; font-size: 11px; font-weight: 600; }
.admin-stat-card strong { margin-top: 12px; color: #17335b; font-size: 30px; font-weight: 600; }
.admin-stat-card small { position: relative; z-index: 1; display: block; margin-top: 5px; color: #8ba0b7; font-size: 10px; font-weight: 500; }
body[data-page="admin"][data-admin-page="overview"] .account-page-heading h1,
body[data-page="admin"][data-admin-page="overview"] .account-kicker { font-weight: 600; }
#tab-overview.admin-section { padding: 0; border: 0; background: transparent; box-shadow: none; }
.admin-overview-hero {
  position: relative; isolation: isolate; min-height: 270px; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; overflow: hidden; padding: 32px 38px; border-radius: 26px;
  background: linear-gradient(107deg,#11152f 0%,#22204d 55%,#523ca5 100%); color: #fff;
  box-shadow: 0 18px 46px rgba(31,24,85,.13);
}
.admin-overview-hero::after { content:""; position:absolute; z-index:-1; top:-350px; left:44%; width:480px; height:480px; border:1px solid #ffffff19; border-radius:50%; box-shadow:0 0 0 58px #ffffff07,0 0 0 112px #ffffff05; }
.admin-overview-hero-halo { position:absolute; z-index:-2; right:13%; top:-125px; width:400px; height:400px; border-radius:50%; background:radial-gradient(circle,#af74ff83 0%,#7b50f04a 25%,transparent 66%); }
.admin-overview-hero-grid { position:absolute; left:8px; bottom:15px; width:195px; height:72px; opacity:.25; background-image:radial-gradient(#aa9cf9 1px,transparent 1px); background-size:13px 13px; }
.admin-overview-hero-copy { position:relative; z-index:2; max-width:540px; }
.admin-overview-eyebrow { display:inline-flex; align-items:center; gap:8px; margin:0 0 16px; color:#d9d6ff; font-size:9.5px; font-weight:600; letter-spacing:1.8px; }
.admin-overview-eyebrow > span { width:7px; height:7px; border-radius:50%; background:#d9ff81; box-shadow:0 0 12px #d9ff81; }
.admin-overview-hero h2 { margin:0; max-width:500px; color:#fff; font-size:clamp(28px,3vw,40px); font-weight:600; line-height:1.14; letter-spacing:-1.5px; }
.admin-overview-hero h2 em { color:#ddfc95; font-style:normal; font-weight:600; }
.admin-overview-hero-copy > p:not(.admin-overview-eyebrow) { max-width:470px; margin:13px 0 20px; color:#c6c0e0; font-size:12px; line-height:1.65; }
.admin-overview-pills { display:flex; flex-wrap:wrap; gap:8px; }
.admin-overview-pills > span { display:inline-flex; align-items:center; gap:7px; padding:8px 11px; border:1px solid #ffffff22; border-radius:999px; background:#ffffff18; color:#efeaff; font-size:10px; font-weight:500; }
.admin-overview-pills svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-pills b { font-weight:600; }
.admin-overview-health-card { position:relative; z-index:2; width:310px; flex:0 0 310px; padding:22px; border:1px solid #f4edff80; border-radius:21px; background:linear-gradient(122deg,#cebeff 0%,#ddd6ff 31%,#afa8fc 60%,#9584f9 100%); color:#251752; box-shadow:0 17px 48px #0000003b; transform:rotate(-2deg); }
.admin-overview-health-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; color:#38266e; font-size:11px; font-weight:600; }
.admin-overview-health-head svg { width:20px; height:20px; fill:none; stroke:#6246d0; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-health-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid #ffffff60; color:#5f4f88; font-size:10.5px; font-weight:500; }
.admin-overview-health-row strong { color:#251752; font-size:16px; font-weight:600; }
.admin-overview-health-meter { padding-top:16px; }
.admin-overview-health-meter > span { display:block; height:7px; overflow:hidden; border-radius:999px; background:#ffffff70; }
.admin-overview-health-meter i { display:block; width:0; height:100%; border-radius:999px; background:#4f32b9; transition:width .25s ease; }
.admin-overview-health-meter small { display:block; margin-top:7px; color:#5f4f88; font-size:9.5px; font-weight:500; }
.admin-overview-period-bar { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin:20px 0 10px; }
.admin-overview-period-bar button { min-height:30px; padding:6px 11px; border:1px solid #d5cbf4; border-radius:999px; background:#fff; color:#6555b5; font-size:9.5px; font-weight:600; cursor:pointer; }
.admin-overview-period-bar button:hover,.admin-overview-period-bar button.active { border-color:#6943ff; background:#6943ff; color:#fff; }
.admin-overview-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 20px; }
.admin-overview-stat { position:relative; min-height:150px; overflow:hidden; padding:20px 22px; border:0; border-radius:22px; background:#f4f1ff; color:#4c2faf; box-shadow:none; transition:transform .25s ease,box-shadow .25s ease; }
.admin-overview-stat:hover { transform:translateY(-4px); box-shadow:0 18px 34px #10102a10; }
.admin-overview-stat::after { content:""; position:absolute; right:-45px; bottom:-70px; width:140px; height:140px; border:23px solid #dbd2fc55; border-radius:50%; }
.admin-overview-stat.is-primary { background:#dffc9b; color:#1f352a; box-shadow:none; }
.admin-overview-stat.is-primary::after { border-color:#ffffff50; }
.admin-overview-stat:nth-child(2) { background:#ede8ff; color:#4c2faf; }
.admin-overview-stat:nth-child(3) { background:#ffefe3; color:#9b4d2c; }
.admin-overview-stat:nth-child(4) { background:#f2efff; color:#4c2faf; }
.admin-overview-stat > div { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.admin-overview-stat > div > span { font-size:10.5px; font-weight:600; }
.admin-overview-stat i { width:35px; height:35px; display:grid; place-items:center; border-radius:11px; background:#ded4ff; color:#6943ff; }
.admin-overview-stat.is-primary i { background:#1c3430; color:#dffc9b; }
.admin-overview-stat:nth-child(3) i { background:#ffe1cb; color:#c56436; }
.admin-overview-stat svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-stat > strong { position:relative; z-index:1; display:block; margin:17px 0 4px; font-size:30px; font-weight:600; letter-spacing:-1px; }
.admin-overview-stat > small { position:relative; z-index:1; color:#9686c5; font-size:10px; font-weight:500; }
.admin-overview-stat.is-primary > small { color:#63734a; }
.admin-overview-stat:nth-child(3) > small { color:#c68c72; }
.admin-overview-deposit-stat > strong { font-size:clamp(20px,1.7vw,28px); white-space:nowrap; }
.admin-overview-grid { display:grid; grid-template-columns:1.04fr .96fr; gap:18px; margin-bottom:18px; }
.admin-overview-panel { min-width:0; overflow:hidden; border:1px solid #ebebf2; border-radius:24px; background:#fff; box-shadow:0 12px 33px #1a193508; }
.admin-overview-panel-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:21px 23px 17px; border-bottom:1px solid #f0f0f6; }
.admin-overview-panel-head h2 { margin:0 0 5px; color:#292640; font-size:16px; font-weight:600; letter-spacing:-.35px; }
.admin-overview-panel-head p { margin:0; color:#9c9baa; font-size:10.5px; }
.admin-overview-panel-head > a { display:inline-flex; align-items:center; gap:6px; flex:0 0 auto; color:#6555b5; font-size:10px; font-weight:600; }
.admin-overview-panel-head > a svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-server-list,.admin-overview-list,.admin-overview-transaction-list { padding:7px 20px 13px; }
.admin-overview-server,.admin-overview-list-row,.admin-overview-transaction { min-height:72px; display:flex; align-items:center; gap:12px; border-bottom:1px solid #f0f0f6; color:#292640; }
.admin-overview-server:last-child,.admin-overview-list-row:last-child,.admin-overview-transaction:last-child { border-bottom:0; }
.admin-overview-server-icon,.admin-overview-row-icon { width:39px; height:39px; display:grid; place-items:center; flex:0 0 39px; border-radius:12px; background:#f0edff; color:#7955e8; }
.admin-overview-server-icon svg,.admin-overview-row-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-server > div,.admin-overview-list-row > div,.admin-overview-transaction > div { min-width:0; flex:1; }
.admin-overview-server strong,.admin-overview-list-row strong,.admin-overview-transaction strong { display:block; overflow:hidden; color:#292640; font-size:11.5px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.admin-overview-server small,.admin-overview-list-row small,.admin-overview-transaction small { display:block; margin-top:4px; overflow:hidden; color:#aaa8b9; font-size:9.5px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.admin-overview-server > div > span { display:block; width:min(160px,70%); height:5px; overflow:hidden; margin-top:7px; border-radius:999px; background:#eeeaf8; }
.admin-overview-server > div > span i { display:block; height:100%; border-radius:999px; background:#6943ff; }
.admin-overview-server > em { flex:0 0 auto; padding:6px 8px; border:1px solid #ded4ff; border-radius:999px; background:#f7f4ff; color:#6555b5; font-size:9px; font-style:normal; font-weight:600; white-space:nowrap; }
.admin-overview-row-meta,.admin-overview-transaction-amount { flex:0 0 auto; text-align:right; }
.admin-overview-row-meta b { display:inline-block; padding:6px 8px; border:1px solid #ded4ff; border-radius:999px; background:#f7f4ff; color:#6555b5; font-size:9px; font-weight:600; }
.admin-overview-row-meta small { margin-top:5px; }
.admin-overview-transactions { margin-bottom:20px; }
.admin-overview-transaction-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:22px; }
.admin-overview-transaction { min-width:0; overflow:hidden; }
.admin-overview-transaction:nth-last-child(-n+2) { border-bottom:0; }
.admin-overview-transaction-amount { min-width:0; max-width:46%; overflow:hidden; }
.admin-overview-transaction-amount strong { color:#6943ff; font-size:11px; white-space:nowrap; }
.admin-overview-transaction-amount small { max-width:100%; }
.admin-overview-empty { padding:28px 12px; color:#9c9baa; font-size:10.5px; text-align:center; }
.admin-overview-quick { margin-top:2px; }
.admin-overview-quick-title { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.admin-overview-quick-title h2 { margin:0 0 4px; color:#292640; font-size:16px; font-weight:600; }
.admin-overview-quick-title p { margin:0; color:#9c9baa; font-size:10.5px; }
.admin-overview-quick-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.admin-overview-quick-grid > a { min-width:0; display:flex; align-items:center; gap:11px; padding:15px 16px; border:1px solid #ecebf3; border-radius:17px; background:#fff; color:#292640; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.admin-overview-quick-grid > a:hover { transform:translateY(-3px); border-color:#ddd5f3; box-shadow:0 10px 25px #13143c0c; }
.admin-overview-quick-grid > a > span { width:39px; height:39px; display:grid; place-items:center; flex:0 0 39px; border-radius:12px; background:#f0e8ff; color:#8953c7; }
.admin-overview-quick-grid svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.admin-overview-quick-grid > a > div { min-width:0; flex:1; }
.admin-overview-quick-grid b { display:block; margin-bottom:4px; font-size:11px; font-weight:600; }
.admin-overview-quick-grid small { display:block; overflow:hidden; color:#9b99ac; font-size:9.5px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.admin-overview-quick-grid > a > i { color:#aaa5c0; font-style:normal; }
.admin-app-content > .admin-section {
  padding: 23px;
  border: 1px solid #d5e4f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28,91,164,.06);
}
.admin-app-content > .admin-section .panel-title h2 { color: #17335b; font-size: 20px; font-weight: 600; }
.admin-app-content .account-sidebar .account-nav-item { width: 100%; }
.admin-rentals-head { margin-bottom: 14px; }
.admin-rentals-head .panel-title { margin: 0; }
.admin-rentals-head .panel-title p { margin: 6px 0 0; font-size: 11px; }
.admin-rental-filters { display: grid; grid-template-columns: minmax(280px,1fr) minmax(170px,220px) minmax(170px,220px); gap: 10px; margin-bottom: 14px; }
.admin-rental-filters > label { display: block; min-width: 0; }
.admin-rental-filters input,.admin-rental-filters select { width: 100%; height: 40px; border: 1px solid #cfe0f3; border-radius: 10px; outline: 0; background: #fff; color: #17335b; font-size: 12px; font-weight: 500; }
.admin-rental-filters input:focus,.admin-rental-filters select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,217,.1); }
.admin-rental-search { position: relative; align-self: end; }
.admin-rental-search svg { position: absolute; top: 50%; left: 13px; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: #6f87a3; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.admin-rental-search input { padding: 0 12px 0 40px; }
.admin-rental-filters select { padding: 0 11px; }
.admin-rentals-table { min-width: 1240px; }
.admin-rentals-table th,.admin-rentals-table td { white-space: nowrap; }
.admin-rentals-table td:nth-child(5),.admin-rentals-table td:nth-child(10) { white-space: normal; min-width: 170px; }
.admin-rentals-table code { color: #315a85; font-size: 10px; }
.admin-rental-check { width: 28px; min-width: 28px; padding-right: 5px !important; padding-left: 5px !important; text-align: center !important; }
.admin-rental-check input { display: block; width: 13px; height: 13px; margin: auto; }
.admin-rental-actions { display: flex; align-items: center; gap: 6px; }
.admin-rental-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid #1769d9; border-radius: 9px; background:#1769d9; color:#fff; cursor:pointer; }
.admin-rental-more > .admin-rental-icon { border-color:#6943ff; background:#6943ff; color:#fff; }
.admin-rental-icon:hover:not(:disabled) { filter:brightness(.9); color:#fff; }
.admin-rental-icon:disabled { border-color: #aebdcd; background: #aebdcd; color: #fff; opacity: .62; cursor: not-allowed; }
.admin-rental-icon .ui-icon { width: 16px; height: 16px; }
#tab-rentals .badge[data-status="active"] { border-color: #198754; background: #198754; color: #fff; }
#tab-rentals .badge[data-status="offline"] { border-color: #e0a800; background: #ffc107; color: #4f3b00; }
#tab-rentals .badge[data-status="expired"] { border-color: #dc3545; background: #dc3545; color: #fff; }
.admin-rental-more { position: relative; }
.admin-rental-menu { position: fixed; z-index: 1450; display: none; width: 190px; padding: 6px; border: 1px solid #cfe0f3; border-radius: 11px; background: #fff; box-shadow: 0 12px 34px rgba(23,51,91,.16); }
.admin-rental-more.open .admin-rental-menu { display: grid; }
.admin-rental-menu button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: #fff; color: #1769d9; font-size: 11px; font-weight: 500; text-align: left; cursor: pointer; }
.admin-rental-menu button:hover { border-color: #bcd4ef; background: #f3f8ff; }
.admin-rental-menu button.is-danger { border-color: #d4e0ee; }
.admin-rental-menu .ui-icon { width:28px; height:28px; flex:0 0 28px; padding:6px; border-radius:8px; background:#1769d9; color:#fff; }
.admin-rental-menu [data-admin-rental-command="extend"] .ui-icon { background:#16805a; }
.admin-rental-menu [data-admin-rental-command="proxy"] .ui-icon { background:#6943ff; }
.admin-rental-menu [data-admin-rental-command="restart"] .ui-icon { background:#1769d9; }
.admin-rental-menu [data-admin-rental-command="power-off"] .ui-icon { background:#d17b22; }
.admin-rental-menu [data-admin-rental-command="power-on"] .ui-icon { background:#16805a; }
.admin-rental-menu [data-admin-rental-command="cancel"] .ui-icon { background:#c83949; }
.admin-rental-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.admin-rental-pagination span { margin-right: auto; color: #7b8ea3; font-size: 10px; }
.admin-rental-pagination button { min-height: 34px; padding: 7px 11px; border: 1px solid #bcd4ef; border-radius: 9px; background: #fff; color: var(--blue); font-size: 11px; font-weight: 500; cursor: pointer; }
.admin-rental-pagination button:hover:not(:disabled) { background: var(--blue); color: #fff; }
.admin-rental-pagination button:disabled { opacity: .45; cursor: default; }
.admin-rental-empty { padding: 32px !important; color: #7b8ea3; text-align: center !important; }
.admin-rental-proxy-toggle { display: flex; align-items: center; gap: 8px; color: #315a85; font-size: 12px; font-weight: 500; }
.admin-user-filters { display:grid; grid-template-columns:minmax(280px,1fr) minmax(220px,280px); gap:10px; margin-bottom:10px; }
.admin-user-filters > label { display:block; min-width:0; }
.admin-user-filters input,.admin-user-filters select { width:100%; height:40px; border:1px solid #ddd5f3; border-radius:10px; outline:0; background:#fff; color:#292640; font-size:12px; font-weight:500; }
.admin-user-filters input:focus,.admin-user-filters select:focus { border-color:#6943ff; box-shadow:0 0 0 3px #6943ff18; }
.admin-user-search { position:relative; }
.admin-user-search svg { position:absolute; top:50%; left:13px; width:16px; height:16px; transform:translateY(-50%); fill:none; stroke:#8c83aa; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.admin-user-search input { padding:0 12px 0 40px; }
.admin-user-filters select { padding:0 11px; }
.admin-user-result { margin:0 0 12px; color:#9c9baa; font-size:10.5px; }
.admin-users-table { min-width:1180px; }
.admin-users-table th,.admin-users-table td { white-space:nowrap; }
.admin-users-table td:nth-child(3) { min-width:220px; white-space:normal; }
.admin-user-actions { display:flex; align-items:center; gap:6px; }
.admin-user-icon { width:34px; height:34px; display:inline-grid; place-items:center; padding:0; border:1px solid #16805a; border-radius:9px; background:#16805a; color:#fff; cursor:pointer; }
.admin-user-more > .admin-user-icon { border-color:#6943ff; background:#6943ff; color:#fff; }
.admin-user-icon:hover { filter:brightness(.9); color:#fff; }
.admin-user-icon .ui-icon { width:16px; height:16px; }
.admin-user-more { position:relative; }
.admin-user-menu { position:fixed; z-index:1450; display:none; width:220px; padding:6px; border:1px solid #e4def3; border-radius:11px; background:#fff; box-shadow:0 12px 34px #29264024; }
.admin-user-more.open .admin-user-menu { display:grid; }
.admin-user-menu button,.admin-user-menu a { display:flex; align-items:center; gap:9px; width:100%; min-height:36px; padding:8px 10px; border:1px solid transparent; border-radius:8px; background:#fff; color:#5f4c9f; font-size:11px; font-weight:500; text-align:left; text-decoration:none; cursor:pointer; }
.admin-user-menu button:hover:not(:disabled),.admin-user-menu a:hover { border-color:#ddd5f3; background:#f7f4ff; color:#6943ff; }
.admin-user-menu button:disabled { color:#aaa5b8; cursor:default; }
.admin-user-menu .ui-icon { width:28px; height:28px; flex:0 0 28px; padding:6px; border-radius:8px; background:#1769d9; color:#fff; }
.admin-user-menu [data-admin-user-action="status"] .ui-icon { background:#c83949; }
.admin-user-menu [data-admin-user-action="verify"] .ui-icon { background:#16805a; }
.admin-user-menu [data-admin-user-action="role"] .ui-icon { background:#6943ff; }
.admin-user-menu [data-admin-user-action="discount"] .ui-icon { background:#d17b22; }
.admin-user-menu a .ui-icon { background:#1769d9; }
.admin-user-pagination { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:12px; }
.admin-user-pagination button { min-width:34px; min-height:34px; padding:6px 9px; border:1px solid #ddd5f3; border-radius:9px; background:#fff; color:#6555b5; font-size:11px; font-weight:600; cursor:pointer; }
.admin-user-pagination button:hover,.admin-user-pagination button.active { border-color:#6943ff; background:#6943ff; color:#fff; }
.admin-user-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.admin-user-info-grid > div { padding:13px 14px; border:1px solid #ece8f6; border-radius:12px; background:#faf9ff; }
.admin-user-info-grid span,.admin-user-info-grid strong { display:block; }
.admin-user-info-grid span { margin-bottom:5px; color:#9c9baa; font-size:9.5px; }
.admin-user-info-grid strong { overflow-wrap:anywhere; color:#292640; font-size:12px; font-weight:600; }

@media (min-width:901px) and (max-width:1180px) {
  body[data-page="admin"] .admin-overview-health-card { display:none; }
  body[data-page="admin"] .admin-overview-hero { min-height:250px; padding:29px 34px; }
  body[data-page="admin"] .admin-overview-hero-copy { max-width:680px; }
  body[data-page="admin"] .admin-overview-hero h2 { max-width:620px; font-size:34px; }
  body[data-page="admin"] .admin-overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-page="admin"] .admin-overview-stat { min-height:136px; }
  body[data-page="admin"] .admin-overview-grid { grid-template-columns:1fr; }
  body[data-page="admin"] .admin-overview-transaction-list { grid-template-columns:1fr; }
  body[data-page="admin"] .admin-overview-transaction:nth-last-child(2) { border-bottom:1px solid #f0f0f6; }
  body[data-page="admin"] .admin-overview-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  body[data-page="dashboard"] .site-header,
  body[data-page="rent"] .site-header,
  body[data-page="admin"] .site-header { width: 100%; margin-left: 0; }
  body[data-page="dashboard"] .site-header .header-inner,
  body[data-page="rent"] .site-header .header-inner,
  body[data-page="admin"] .site-header .header-inner { width: min(100% - 48px,1200px); }
  body[data-page="dashboard"] .site-header .brand,
  body[data-page="rent"] .site-header .brand,
  body[data-page="admin"] .site-header .brand { display: inline-flex; }
  .admin-app-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-overview-hero { align-items:flex-start; padding:28px 30px; }
  .admin-overview-health-card { width:270px; flex-basis:270px; }
  .admin-overview-period-bar { justify-content:flex-end; }
  .admin-overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-overview-grid { grid-template-columns:1fr; }
  .admin-overview-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-rental-filters { grid-template-columns: 1fr 1fr; }
  .admin-rental-search { grid-column: 1 / -1; }
  .admin-user-filters { grid-template-columns:1fr; }
}

@media (max-width: 750px) {
  .admin-overview-health-card { display:none; }
}

@media (max-width: 640px) {
  body[data-page="dashboard"] .site-header .header-inner,
  body[data-page="rent"] .site-header .header-inner,
  body[data-page="admin"] .site-header .header-inner { width: calc(100% - 32px); }
  .admin-app-content > .admin-section { padding: 16px; border-radius: 16px; }
  .admin-app-stats { grid-template-columns: 1fr; }
  #tab-overview.admin-section { padding:0; }
  .admin-overview-hero { min-height:0; align-items:stretch; flex-direction:column; padding:26px 21px; border-radius:21px; }
  .admin-overview-hero h2 { font-size:30px; }
  .admin-overview-period-bar { justify-content:flex-end; }
  .admin-overview-health-card { width:100%; flex-basis:auto; padding:18px; transform:none; }
  .admin-overview-stats { grid-template-columns:1fr; gap:10px; }
  .admin-overview-stat { min-height:135px; }
  .admin-overview-panel-head { align-items:flex-start; padding:18px 17px 14px; }
  .admin-overview-panel-head > a { margin-top:3px; }
  .admin-overview-server-list,.admin-overview-list,.admin-overview-transaction-list { padding-inline:15px; }
  .admin-overview-transaction-list { grid-template-columns:1fr; }
  .admin-overview-transaction:nth-last-child(2) { border-bottom:1px solid #edf3fa; }
  .admin-overview-quick-grid { grid-template-columns:1fr; }
  .admin-rental-filters { grid-template-columns: 1fr; }
  .admin-rental-search { grid-column: auto; }
  .admin-rental-pagination { flex-wrap: wrap; justify-content: center; }
  .admin-rental-pagination span { width: 100%; margin: 0 0 2px; text-align: center; }
  .admin-user-pagination { justify-content:center; }
  .admin-user-info-grid { grid-template-columns:1fr; }
  .rental-view-toolbar { align-items: flex-start; flex-direction: column; }
  .rental-view-switch { width: 100%; }
  .rental-view-switch .btn { flex: 1; }
  .rental-list[data-view="cards"] { grid-template-columns: 1fr; }
  .rental-list[data-view="list"] .rental { grid-template-columns: 84px minmax(0,1fr); gap: 12px; }
  .rental-list[data-view="list"] .rental-thumb { width: 84px; height: 70px; }
  .rental-list[data-view="list"] .rental-countdown,
  .rental-list[data-view="list"] .rental-actions { grid-column: 1 / -1; }
  .rental-screen-modal { padding: 8px; }
  .rental-screen-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 14px; }
  .rental-screen-head { padding: 11px 12px; }
  .rental-screen-body { padding: 7px; }
  .rental-screen-stage { max-width: 100%; max-height: 100%; }
  .rental-screen-footer { padding: 9px 12px 11px; }
  .rental-jar-upload { grid-template-columns: 1fr; }
  .rental-jar-upload button { width: 100%; }
  .rental-midp-input,
  .rental-midp-textarea,
  .rental-midp-select { font-size: 16px; }
}

@media (max-width: 1100px) {
  .admin-payments-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .deposit-admin-account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .deposit-admin-account-grid .field:last-child { grid-column: 1 / -1; }
  .deposit-admin-api-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .deposit-admin-head { align-items: center; flex-wrap: wrap; padding: 16px; }
  .deposit-admin-head p { display: none; }
  .deposit-admin-body { min-width: 0; padding-inline: 16px; }
  .deposit-admin-section-title { align-items: flex-start; flex-wrap: wrap; }
  .deposit-admin-section-title .btn { width: 100%; justify-content: center; }
  .deposit-admin-account-grid,.deposit-admin-rule-grid,.deposit-admin-api-grid,.deposit-admin-promo-grid { grid-template-columns: 1fr; }
  .deposit-admin-account-grid .field:last-child { grid-column: auto; }
  .deposit-admin-preview { grid-template-columns: 54px minmax(0,1fr); }
  .deposit-admin-qr,.deposit-admin-preview img { width: 54px; height: 54px; }
  .deposit-admin-preview-badge { display: none; }
  .deposit-admin-preview-copy small { overflow-wrap: anywhere; }
  .deposit-admin-advanced { margin-inline: 16px; }
  .deposit-admin-actions { justify-content: stretch; padding-inline: 16px; }
  .deposit-admin-actions .btn { width: 100%; }
  .deposit-admin-advanced summary small { display: none; }
}

/* Kho JAR của tài khoản */
.user-jar-panel { display: grid; gap: 14px; padding: 18px 20px; margin-bottom: 16px; }
.user-jar-quota { display: grid; gap: 8px; }
.user-jar-quota-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-size: 13px; }
.user-jar-quota-text span { color: #6a7f95; }
.user-jar-meter { height: 10px; border-radius: 999px; background: #e6edf5; overflow: hidden; }
.user-jar-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue, #1f6feb); transition: width .25s; }
.user-jar-meter.is-full i { background: #d9534f; }
.user-jar-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.user-jar-upload small { color: #6a7f95; font-size: 12px; }
.user-jar-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-jar-name img, .user-jar-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; object-fit: contain; image-rendering: pixelated; background: #f2f5f9; display: grid; place-items: center; }
.user-jar-icon svg { width: 18px; height: 18px; }
.user-jar-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.user-jar-retention { display:flex; align-items:flex-start; gap:9px; margin:0; padding:10px 12px; border:1px solid #e4b51a; border-radius:9px; background:#fff7cf; color:#725500; font-size:12px; line-height:1.5; }
.user-jar-retention-icon { width:18px; height:18px; flex:0 0 18px; margin-top:1px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.user-jar-retention.is-urgent { border-color: #f1b8a6; background: #fff1ec; color: #9a3412; font-weight: 600; }
.user-jar-retention.hidden { display: none; }
.system-jar-summary { margin: 0 0 12px; color: #6a7f95; font-size: 12px; }
.system-jar-table .user-jar-name small { display: block; font-size: 11px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-jar-table .user-jar-name small.error { color: #b42318; }
.system-jar-desc { grid-column: 1 / -1; }
.system-jar-desc textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid #cbd9e8; border-radius: 9px; font: inherit; resize: vertical; }
