:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --text: #162238;
  --muted: #66758f;
  --line: #dfe6f3;
  --primary: #246bfe;
  --primary-2: #0cc3b0;
  --danger: #e44f64;
  --shadow: 0 16px 36px rgba(18, 35, 68, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef4ff 48%, #ffffff 100%);
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-card h1 {
  margin-bottom: 8px;
  color: #052b5f;
  font-size: 36px;
}

.auth-card p {
  color: var(--muted);
}

.auth-card form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.auth-card input,
.auth-card button {
  width: 100%;
}

.link-button {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0067ff;
  cursor: pointer;
  font: inherit;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 240px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  font-weight: 800;
  font-size: 12px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  gap: 22px;
  flex: 1;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.topnav a:hover {
  color: var(--primary);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.icon-button,
.wallet-button,
.menu-button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #0b1630;
  font-size: 21px;
  cursor: pointer;
}

.wallet-button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 20px;
}

.menu-button {
  width: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 28px;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(7, 23, 44, 0.18);
}

.main-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 31;
  width: min(430px, 100vw);
  min-height: 100vh;
  padding: 20px 26px 34px;
  border-left: 1px solid var(--line);
  background: white;
  box-shadow: -18px 0 44px rgba(18, 35, 68, 0.16);
}

.main-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.main-menu-head .brand {
  min-width: 0;
  margin: 0 auto;
}

.main-menu-head .brand strong {
  color: #07547c;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.menu-close {
  min-width: 42px;
  border: 0;
  background: white;
  color: #333;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.main-menu-links {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.main-menu-links button {
  border: 0;
  background: transparent;
  color: #07172c;
  font-size: 18px;
  cursor: pointer;
}

.main-menu-links button:first-child {
  margin-bottom: 2px;
  font-size: 28px;
}

.main-menu-links button:last-child {
  margin-top: 18px;
  color: var(--danger);
  font-weight: 800;
}

.account-menu {
  position: relative;
}

.language-menu {
  position: relative;
}

.account-dropdown,
.language-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 206px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: var(--shadow);
}

.language-dropdown {
  min-width: 88px;
}

.account-dropdown button,
.language-dropdown button {
  padding: 12px 18px;
  border: 0;
  background: white;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.account-dropdown button:hover,
.language-dropdown button:hover,
.language-dropdown button.active {
  background: var(--surface-2);
}

.legacy-nav,
#refreshBtn {
  display: none;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nav-link {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 750;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--surface-2);
}

.workspace {
  min-width: 0;
}

body[data-view='rent'] .hero,
body[data-view='account'] .hero,
body[data-view='dashboard'] .hero {
  display: none;
}

body[data-view='account'] .sidebar,
body[data-view='dashboard'] .sidebar {
  display: none;
}

body[data-view='account'] .shell,
body[data-view='dashboard'] .shell {
  display: block;
  padding: 0;
}

body[data-view='account'] .workspace,
body[data-view='dashboard'] .workspace {
  width: 100%;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 210px;
  margin-bottom: 24px;
  padding: 34px;
  color: white;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 18%, rgba(12, 195, 176, 0.75), transparent 30%),
    linear-gradient(135deg, #113b9f 0%, #246bfe 48%, #0b1630 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.84;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.hero-actions,
.panel-head,
.form-row,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.button.ghost {
  background: transparent;
}

.button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  padding: 20px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.panel {
  padding: 20px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 18px;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
}

.table-wrap {
  overflow: auto;
}

.activation-board {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(220px, 1.05fr) minmax(180px, 0.95fr) minmax(220px, 1.05fr) minmax(170px, 0.75fr);
  gap: 28px;
  align-items: start;
  padding: 38px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.choice-column {
  min-width: 0;
}

.choice-column h2 {
  margin: 0 0 24px;
  color: #566987;
  font-size: 27px;
  font-weight: 500;
  text-align: center;
}

.choice-column input[type='search'] {
  width: 100%;
  margin-bottom: 4px;
}

.choice-list {
  display: grid;
  max-height: 650px;
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 0;
}

.choice-list.compact {
  gap: 10px;
  border: 0;
  overflow: visible;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  color: #07172c;
  text-align: left;
  cursor: pointer;
}

.choice-option:hover,
.choice-option.active {
  background: #287fc0;
  color: white;
}

.choice-option:last-child {
  border-bottom: 0;
}

.choice-flag,
.choice-icon {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 6px;
  background: #eef4ff;
  font-size: 27px;
}

.choice-icon {
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  font-size: 14px;
  font-weight: 850;
}

.choice-name {
  flex: 1;
  min-width: 0;
  font-size: 22px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.choice-dot {
  width: 14px;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #24a637;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.new-badge,
.availability-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  color: white;
  background: #2eaa2a;
  font-size: 13px;
  font-weight: 850;
}

.availability-badge {
  margin-left: auto;
  background: #6e7b88;
}

.period-card,
.provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.period-card.active,
.provider-card.active {
  border-color: #287fc0;
  background: #287fc0;
  color: white;
}

.period-label,
.provider-name {
  flex: 1;
  font-size: 22px;
}

.price-pill {
  padding: 8px 10px;
  border-radius: 5px;
  background: white;
  color: #07172c;
  font-size: 16px;
}

.provider-card {
  align-items: flex-start;
  min-height: 92px;
}

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

.stepper {
  display: grid;
  grid-template-columns: 40px 92px 40px;
  justify-content: center;
  margin-bottom: 18px;
}

.stepper button,
.stepper input {
  min-height: 44px;
  border: 1px solid #8793a3;
  border-radius: 0;
  background: white;
  text-align: center;
}

.stepper button {
  cursor: pointer;
}

.book-button {
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.item-title {
  font-weight: 850;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f1f6ff;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.compact-admin-form {
  grid-template-columns: 1fr 1fr auto;
}

.admin-dashboard {
  min-height: calc(100vh - 72px);
  background: white;
  padding-bottom: 60px;
  overflow-x: hidden;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1548px, calc(100% - 48px));
  margin: 0 auto 22px;
}

.admin-stats article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.admin-stats span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  color: #052b5f;
  font-size: 26px;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
  gap: 18px;
  width: min(1548px, calc(100% - 48px));
  margin: 0 auto;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-users-table {
  min-width: 720px;
}

.admin-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.selected-row td {
  background: #eef4ff;
}

.selected-user-panel {
  align-self: start;
}

.number-admin-form {
  grid-template-columns: 1fr 1fr;
}

.number-admin-form .button {
  grid-column: 1 / -1;
}

.notice {
  padding: 14px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}

.payment-crypto-box {
  margin-bottom: 14px;
  color: var(--text);
  line-height: 1.5;
}

.payment-crypto-box code,
#paymentResult code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #06346f;
  font-weight: 700;
}

.number-detail-panel {
  max-width: 1120px;
  margin: 0 auto;
}

.number-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.detail-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.detail-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-card strong {
  display: block;
  margin-top: 8px;
  color: #052b5f;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.live-countdown {
  display: inline-block;
  margin-top: 0;
  color: var(--primary);
  font-size: 22px;
  font-weight: 850;
}

.number-detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
}

.sms-thread {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sms-thread h3 {
  margin: 0;
  font-size: 24px;
}

.sms-thread .item {
  min-height: 92px;
}

.sms-thread .muted {
  color: #26344d;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.breadcrumbs {
  padding: 10px 0 0;
  color: #5e6b7f;
  font-size: 17px;
}

.breadcrumbs button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #0067ff;
  cursor: pointer;
  font: inherit;
}

.breadcrumbs button:hover {
  text-decoration: underline;
}

.account-title {
  margin: 54px 0 24px;
  text-align: center;
}

.account-title h1 {
  margin-bottom: 0;
  color: #052b5f;
  font-size: 46px;
  font-weight: 500;
}

.account-title p {
  margin: 0;
  color: #566987;
  font-size: 27px;
}

.account-layout {
  display: grid;
  grid-template-columns: 370px minmax(420px, 550px);
  gap: 28px;
  justify-content: center;
  align-items: start;
  margin-bottom: 70px;
}

.account-tabs {
  display: grid;
  gap: 2px;
  padding-top: 20px;
}

.account-tab {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #0067ff;
  text-align: left;
  font-size: 17px;
  cursor: pointer;
}

.account-tab.active {
  background: #176fff;
  color: white;
}

.account-panel {
  display: none;
}

.account-panel.active {
  display: block;
}

.account-panel h2 {
  margin-bottom: 8px;
  color: #07172c;
  font-size: 31px;
  font-weight: 500;
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-form label {
  display: grid;
  gap: 5px;
  color: #697384;
}

.account-form input {
  width: 100%;
  min-height: 64px;
  background: #e9ecef;
  font-size: 16px;
}

.account-form input:not(:disabled) {
  background: white;
}

.account-form .button {
  min-height: 54px;
  margin-top: 2px;
  background: #3188c7;
  font-size: 23px;
  font-weight: 500;
}

.check-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  color: var(--text) !important;
}

.check-row input {
  width: 20px;
  min-height: 20px;
}

.customer-dashboard {
  min-height: calc(100vh - 72px);
  background: white;
}

.dashboard-heading {
  margin-top: 56px;
}

.stats-table-section {
  width: min(1548px, calc(100% - 48px));
  margin: 52px auto 0;
}

.stats-table-section h2 {
  margin-bottom: 14px;
  color: #566987;
  font-size: 27px;
  font-weight: 500;
  text-align: center;
}

.update-note {
  margin: 0 0 2px;
  color: #07172c;
  font-size: 18px;
}

.stats-table-wrap {
  overflow: auto;
  background: #fbfdff;
  border: 1px solid #cfd7e2;
}

.stats-table {
  min-width: 1050px;
  border-collapse: collapse;
}

.stats-table th {
  padding: 10px 10px;
  border-right: 1px solid #cfd7e2;
  background: #eaf4fc;
  color: #07172c;
  font-size: 18px;
  font-weight: 700;
  text-transform: none;
}

.stats-table td {
  height: 45px;
  padding: 10px;
  border-right: 1px solid #edf1f5;
  color: #07172c;
  font-size: 17px;
}

.stats-table th span {
  float: right;
  margin-left: 10px;
  color: #0b1630;
}

.empty-cell {
  text-align: center !important;
}

.orders-table {
  min-width: 760px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 6px;
  background: #0b1630;
  color: white;
  box-shadow: var(--shadow);
}

.toast.visible {
  display: block;
}

@media (max-width: 1020px) {
  .topnav {
    display: none;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics,
  .grid.two,
  .admin-form,
  .account-layout,
  .admin-stats,
  .admin-tools,
  .number-detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .admin-stats,
  .admin-tools {
    width: min(760px, calc(100% - 28px));
  }

  .admin-users-table {
    min-width: 640px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    min-width: 0;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }

  .activation-board {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .choice-column h2 {
    font-size: 22px;
    text-align: left;
  }

  .top-actions {
    gap: 6px;
  }

  .icon-button,
  .wallet-button {
    display: none;
  }

  .account-title h1 {
    font-size: 36px;
  }

  .main-menu {
    width: 100vw;
    padding: 18px 18px 30px;
  }

  .admin-dashboard .dashboard-heading {
    margin-top: 28px;
  }

  .admin-stats,
  .admin-tools {
    width: calc(100% - 20px);
  }

  .admin-stats article,
  .admin-tools .panel {
    padding: 14px;
  }

  .compact-admin-form,
  .number-admin-form {
    grid-template-columns: 1fr;
  }

  .admin-users-table {
    min-width: 600px;
  }

  .item-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .number-detail-panel {
    padding: 14px;
  }
}
