:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --accent: #6366f1;
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #8a94a6;
  --border: #e5e7eb;
  --success: #16a34a;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .12);
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- 顶部导航 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

/* 前台导航：铺满宽度 + 简洁版配色 */
.navbar-inner { max-width: none; padding: 0 22px; }
.navbar .nav-links { gap: 4px; }
.navbar:not(.navbar-admin) .nav-links a[data-nav] {
  color: #64748b; font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 9px; background: transparent;
  transition: all .15s;
}
.navbar:not(.navbar-admin) .nav-links a[data-nav]:hover { background: #f1f5f9; color: #1e293b; }
.navbar:not(.navbar-admin) .nav-links a[data-nav].active {
  background: #eef2ff; color: #4338ca; font-weight: 700;
}

/* 余额 / 用户名：低饱和，不抢视线 */
.nav-balance {
  color: #059669; font-size: 13.5px; font-weight: 700;
  padding: 0 6px; white-space: nowrap;
}
.nav-balance strong { color: #047857; font-weight: 800; }
.nav-user {
  color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0;
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  white-space: nowrap; text-decoration: none; transition: all .15s;
}
.nav-user:hover { background: #e2e8f0; color: #0f172a; }
.navbar-admin .nav-balance, .navbar-admin .nav-user {
  background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); color: #e2e8f0;
}
/* 后台：顶部导航栏与左侧边栏同色，并固定在顶部永远可见 */
.navbar-admin {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: #1e1e2d; border-bottom-color: #2a2a3c;
}
.navbar-admin .brand { color: #fff; }
.navbar-admin .nav-links a { color: #cbd5e1; }
.navbar-admin .nav-links a:hover { background: #2a2a3c; color: #fff; }
.navbar-admin .nav-links a.active { background: var(--primary); color: #fff; }
.navbar-admin .btn-outline { background: transparent; color: #f1f5f9; border-color: #4b5563; }
.navbar-admin .btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #9ca3af; }
.navbar-admin .badge-indigo { background: rgba(255,255,255,.12); color: #e2e8f0; }
.navbar-admin .muted { color: #94a3b8; }
.navbar-admin #lang-toggle { color: #cbd5e1; }

/* 导航栏按钮统一加大加粗，保证浅色/深色背景下都清晰可见 */
.navbar .btn-sm { padding: 8px 16px; font-size: 13.5px; font-weight: 700; border-radius: 9px; border-width: 2px; }
.navbar .btn-primary { box-shadow: 0 2px 8px rgba(79,70,229,.30); }
.navbar .btn-primary:hover:not(:disabled) { box-shadow: 0 3px 12px rgba(79,70,229,.40); }
.navbar #nav-logout { border-color: #cbd5e1; color: #475569; background: #fff; }
.navbar #nav-logout:hover { background: #fef2f2; border-color: #f87171; color: #dc2626; }
.navbar .nav-links a:not(.btn) { font-weight: 600; }
/* 导航栏：品牌 + 全部导航 + 账号操作 统一从左往右排列，永不重叠 */
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: 100%; flex-wrap: nowrap;
}
.navbar-inner .brand { flex: 0 0 auto; }
/* 导航永远贴浏览器右边缘，随浏览器宽度自适应 */
.navbar .nav-links { margin-left: auto; }
.nav-links {
  display: flex; align-items: center; gap: 5px;
  flex-wrap: nowrap; min-width: 0; justify-content: flex-end;
}
.nav-links > * { flex: 0 0 auto; white-space: nowrap; }
.nav-topup { background: #059669; border-color: #059669; box-shadow: 0 2px 8px rgba(5,150,105,.28); }
.nav-topup:hover:not(:disabled) { background: #047857; border-color: #047857; box-shadow: 0 3px 12px rgba(5,150,105,.38); }

/* 自适应：只压缩尺寸，不隐藏；极窄时换行，元素一个不少 */
@media (max-width: 1240px) {
  .navbar-inner { gap: 12px; }
  .nav-links { gap: 3px; }
  .navbar .nav-links a[data-nav] { padding: 8px 10px; font-size: 13.5px; }
  .navbar .btn-sm { padding: 7px 11px; font-size: 13px; }
  .nav-balance { font-size: 13px; padding: 0 4px; }
  .nav-user { padding: 5px 10px; font-size: 12.5px; }
}
@media (max-width: 1080px) {
  .navbar-inner { gap: 8px; }
  .nav-links { gap: 2px; }
  .navbar .nav-links a[data-nav] { padding: 7px 7px; font-size: 12.5px; }
  .navbar .btn-sm { padding: 6px 9px; font-size: 12px; border-width: 1px; }
  .nav-balance { font-size: 12px; }
  .nav-user { padding: 4px 8px; font-size: 11.5px; }
}
@media (max-width: 940px) {
  .navbar { height: auto; min-height: var(--nav-h); }
  .navbar-inner {
    flex-wrap: wrap; row-gap: 6px;
    padding-top: 8px; padding-bottom: 8px;
  }
  .nav-links { flex-wrap: wrap; row-gap: 5px; justify-content: flex-start; }
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 14px;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }

/* 关键：导航栏里的按钮不能被 .nav-links a 的颜色覆盖，否则紫底会配深灰字 */
.navbar .nav-links a.btn-primary,
.navbar .nav-links button.btn-primary { color: #fff; }
.navbar .nav-links a.btn-outline,
.navbar .nav-links button.btn-outline { color: #475569; }
.navbar-admin .nav-links a.btn-primary,
.navbar-admin .nav-links button.btn-primary { color: #fff; }
.navbar-admin .nav-links a.btn-outline,
.navbar-admin .nav-links button.btn-outline { color: #f1f5f9; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; line-height: 1.4;
  transition: all .15s ease; white-space: nowrap;
  font-family: inherit;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--text-2); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; letter-spacing: -.01em; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff;
  font-size: 14px; font-family: inherit; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: var(--surface-2); color: var(--text-2); font-weight: 600;
  font-size: 12.5px; text-transform: none; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfe; }
td { color: var(--text-2); vertical-align: middle; }
td strong, td .mono { color: var(--text); }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  line-height: 1.6; white-space: nowrap;
}
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--info-bg); color: var(--info); }
.badge-amber { background: var(--warning-bg); color: var(--warning); }
.badge-gray { background: #f3f4f6; color: var(--muted); }
.badge-indigo { background: var(--primary-light); color: var(--primary); }

/* ---------- 提示框 ---------- */
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #fde68a; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }

/* ---------- Toast ---------- */
#toast-wrap {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  font-size: 14px; color: var(--text); animation: slideIn .25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 ---------- */
.hero { padding: 72px 0 56px; text-align: center; }
.hero .eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary); font-weight: 600; font-size: 13px;
  margin-bottom: 20px;
}
.hero h1 { font-size: 46px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 620px; margin: 18px auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { padding: 48px 0 64px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.feature-card { padding: 26px; }
.feature-card .f-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 14px; }

.steps { padding: 40px 0 64px; }
.step-card { padding: 24px; position: relative; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.pricing { padding: 48px 0 72px; }
.price-card { padding: 28px; text-align: center; position: relative; border: 2px solid var(--primary); }
.price-card.featured { border: 2px solid var(--primary); }
.sms-home-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sms-home-badges span { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 11px; border: 1px solid #dce6f5; border-radius: 999px; background: #f6f9ff; color: #3e5d84; font-size: 12.5px; font-weight: 650; }
.price-card .tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 999px;
}
.price-card .amount { font-size: 40px; font-weight: 800; margin: 10px 0; }
.price-card .amount span { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; text-align: left; margin: 18px 0 22px; }
.price-card li { padding: 6px 0; color: var(--text-2); font-size: 14px; }
.price-card li::before { content: "✓"; color: var(--success); margin-right: 8px; font-weight: 700; }

.footer { border-top: 1px solid var(--border); padding: 28px 0; text-align: center; color: var(--muted); font-size: 13px; background: #fff; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 34px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-legal-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: 12.5px; }
.auth-legal-links a { color: var(--muted); text-decoration: none; }
.auth-legal-links a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- 页面头部 ---------- */
.page-head { padding: 30px 0 20px; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---------- 查询页 ---------- */
.query-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.tab-switch { display: flex; gap: 8px; margin-bottom: 18px; }
.tab-switch button {
  flex: 1; padding: 11px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text-2);
  font-family: inherit;
}
.tab-switch button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.result-card { min-height: 260px; }

.person-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px; margin-bottom: 14px; background: #fff;
}
.person-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.person-name { font-size: 18px; font-weight: 700; }
.person-meta { font-size: 13px; color: var(--muted); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 10px; }
.kv { font-size: 13.5px; }
.kv .k { color: var(--muted); font-size: 12px; }
.kv .v { color: var(--text); word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--text-2); }

/* ---------- 统计卡 ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; }
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 30px; font-weight: 800; margin-top: 4px; }
.stat-card .value.green { color: var(--success); }
.stat-card .value.blue { color: var(--primary); }
.stat-card .value.red { color: var(--danger); }
.stat-card .value.amber { color: var(--warning); }
.overview-refresh-reminder { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: -8px 0 18px; font-size: 12.5px; }
.overview-refresh-time { color: var(--muted); font-size: 12px; }

/* ---------- 个人中心 ---------- */
.balance-hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: var(--radius); padding: 26px; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.balance-hero .label { font-size: 13px; opacity: .85; }
.balance-hero .amount { font-size: 36px; font-weight: 800; }
.balance-hero .btn { background: #fff; color: var(--primary); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  padding: 11px 18px; border: none; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; font-family: inherit;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 后台 ---------- */
/* 侧边栏固定整列深色，滚动时不露白边 */
.admin-shell { min-height: 100vh; }
.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
  width: 220px; background: #1e1e2d; color: #cbd5e1;
  padding: calc(var(--nav-h) + 14px) 12px 20px;
  overflow-y: auto;
}
.admin-sidebar .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: 14px 10px 6px; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: #cbd5e1; font-size: 14px; margin-bottom: 2px;
}
.admin-sidebar a:hover { background: #2a2a3c; color: #fff; }
.admin-sidebar a.active { background: var(--primary); color: #fff; }
.admin-main {
  margin-left: 220px; min-width: 0;
  padding: calc(var(--nav-h) + 22px) 28px 40px;
}
.admin-main h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.01em; }
.admin-main .sub { color: var(--muted); margin-bottom: 20px; font-size: 13.5px; }

/* 后台子标签（用户管理 / 系统设置 下的次级页面） */
.sub-tabs {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px;
}
.sub-tab {
  padding: 11px 22px; border-radius: 10px;
  border: 2px solid #c7d2fe; background: #eef2ff; color: #4338ca;
  font-size: 14.5px; font-weight: 700; line-height: 1;
  cursor: pointer; transition: all .15s;
  box-shadow: 0 1px 2px rgba(79, 70, 229, .10);
}
.sub-tab:hover { background: #e0e7ff; border-color: #a5b4fc; color: #3730a3; }
.sub-tab.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .32);
}

/* 自定义文件选择框 —— 与 .input 同高同边框同宽度 */
.file-picker {
  display: flex; align-items: center; gap: 8px;
  padding: 0 5px 0 10px; height: 42px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  cursor: pointer; width: 300px; max-width: 100%;
  transition: all .15s;
}
.file-picker:hover { border-color: var(--primary); }
.file-picker:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.file-picker-icon { font-size: 15px; line-height: 1; opacity: .7; }
.file-picker-name {
  flex: 1; font-size: 13.5px; color: #64748b; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-picker-btn {
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 13px; border-radius: 7px; white-space: nowrap; line-height: 1.35;
}
.file-picker:hover .file-picker-btn { background: var(--primary-dark); }

/* 批量上传表单：一行排列，控件等高；文件框内文字居中 */
.bulk-form-row {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.bulk-form-row .field { margin-bottom: 0; }
.bulk-form-row .input,
.bulk-form-row .select,
.bulk-form-row .file-picker,
.bulk-form-row .btn {
  height: 44px; box-sizing: border-box;
}
.bulk-form-row .btn { display: inline-flex; align-items: center; justify-content: center; }

/* 后台卡片视觉统一 */
.admin-main .card { box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.admin-main .table-wrap { border-radius: 12px; border: 1px solid var(--border); overflow: auto; }
.admin-main table th { background: #f8fafc; font-weight: 700; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; }
.ml-auto { margin-left: auto; }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 200;
  display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px;
  padding: 26px; box-shadow: var(--shadow-lg);
}
.modal h3 { font-size: 18px; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.lookup-confirm-number { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; font-size: 18px; font-weight: 700; letter-spacing: .02em; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .query-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { width: 64px; }
  .admin-sidebar a span { display: none; }
  .admin-sidebar .group { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2, .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 32px; }
  .nav-links a { padding: 8px 10px; }
}

/* 授权证书区块 */
.trust-card { padding: 0; overflow: hidden; }
.trust-img { display: block; width: 100%; height: auto; background: #fff; }
.trust-body { padding: 26px 30px 30px; }
.trust-body p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.85; }
.trust-body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .trust-body { padding: 18px 18px 22px; } .trust-body p { font-size: 14px; } }

/* 法律条款页 */
.legal-wrap { padding: 32px 0 48px; max-width: 900px; }
.legal-nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 20px; }
.legal-nav a { padding: 8px 14px; border-radius: 999px; background: #eef2ff; color: var(--primary); font-size: 13.5px; font-weight: 600; }
.legal-card { margin-bottom: 18px; }
.legal-card h2 { margin-bottom: 12px; }
.legal-card p { color: var(--muted); font-size: 14px; line-height: 1.85; margin: 0 0 10px; }
.legal-card strong { color: #1e293b; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* 内容页（SEO 落地页） */
.prose { max-width: 860px; }
.prose h1 { font-size: 34px; line-height: 1.25; margin: 0 0 16px; letter-spacing: -0.02em; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; letter-spacing: -0.01em; }
.prose h3 { font-size: 16.5px; margin: 24px 0 8px; }
.prose p { color: var(--muted); font-size: 15px; line-height: 1.85; margin: 0 0 14px; }
.prose .lead { color: #334155; font-size: 17px; line-height: 1.75; }
.prose ul, .prose ol { color: var(--muted); font-size: 15px; line-height: 1.85; margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: #1e293b; }
.prose .btn { margin-top: 6px; }
.prose table { font-size: 14.5px; margin: 8px 0 20px; }
.prose .table th { color: #1e293b; font-weight: 600; }
.prose .table td { color: var(--muted); }
@media (max-width: 640px) {
  .prose h1 { font-size: 27px; }
  .prose h2 { font-size: 19.5px; }
}

/* ================= App 式外壳：左侧栏 + 顶部工具条 ================= */
.app-page { min-height: 100vh; background: var(--bg); }

/* 侧边栏固定定位，整列始终是深色（滚动时不会露出白色） */
.app-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 246px; background: #15152b; color: #cbd5e1; padding: 18px 14px;
  display: flex; flex-direction: column; overflow-y: auto; z-index: 40;
}
.sb-brand {
  display: flex; align-items: center; gap: 10px; color: #fff;
  font-weight: 800; font-size: 17px; padding: 4px 8px 14px; letter-spacing: -.01em;
  text-decoration: none;
}
.sb-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
}
.sb-group {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #64748b; padding: 16px 10px 7px;
}
.sb-group-empty { padding: 8px 0 0; }
.sb-link {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 12px; margin-bottom: 4px; box-sizing: border-box;
  border-radius: 10px; color: #cbd5e1; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .15s;
}
.sb-link:hover { background: #23233f; color: #fff; }
.sb-link.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.sb-ico { width: 20px; text-align: center; font-size: 15px; }
.sb-spacer { flex: 1 1 auto; min-height: 20px; }
.sb-balance {
  border-radius: 14px; padding: 16px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
}
.sb-balance-label { font-size: 12px; opacity: .82; font-weight: 600; }
.sb-balance-amount { font-size: 22px; font-weight: 800; margin: 4px 0 12px; letter-spacing: -.02em; }
.sb-balance-btn {
  display: block; text-align: center; background: rgba(255,255,255,.18); color: #fff;
  font-size: 13px; font-weight: 700; padding: 8px; border-radius: 9px; text-decoration: none;
}
.sb-balance-btn:hover { background: rgba(255,255,255,.28); }

.app-main { margin-left: 246px; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 30; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 26px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.tb-title { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.tb-right { display: flex; align-items: center; gap: 9px; flex-wrap: nowrap; }
.tb-right > * { flex: 0 0 auto; white-space: nowrap; }
.app-content { padding: 26px; min-width: 0; }

@media (max-width: 900px) {
  .app-sidebar {
    position: static; width: 100%; height: auto;
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px;
  }
  .sb-group, .sb-spacer, .sb-balance { display: none; }
  .sb-brand { padding: 4px 10px 4px 0; }
  .sb-link { height: 36px; padding: 0 10px; margin-bottom: 0; font-size: 13px; }
  .app-main { margin-left: 0; }
  .app-topbar {
    height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 6px;
    padding: 8px 14px;
  }
  .app-content { padding: 16px; }
}

/* 首页按钮：只显示图标，样式与旁边「登录」按钮完全一致（白底 + 灰边框） */
.navbar:not(.navbar-admin) .nav-links a[data-nav="home"],
.navbar:not(.navbar-admin) .nav-links a[data-nav="home"].active {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 39px; padding: 0; margin-right: 4px;
  color: #475569; background: #fff; border: 2px solid var(--border);
  font-size: 16px; line-height: 1; border-radius: 9px; transition: all .15s;
}
.navbar:not(.navbar-admin) .nav-links a[data-nav="home"]:hover {
  border-color: var(--primary); color: var(--primary); background: #fff;
}
.nav-host { width: 100%; height: 100%; }

/* 语言切换：两个国旗按钮，当前语言高亮 */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border-radius: 10px; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.lang-flag {
  width: 32px; height: 27px; border: none; background: transparent; border-radius: 8px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  opacity: .5; transition: all .15s; padding: 0;
}
.flag-svg { width: 21px; height: 14px; border-radius: 2px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang-flag:hover { opacity: .85; background: #e2e8f0; }
.lang-flag.active { opacity: 1; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.14); }
.navbar-admin .lang-switch { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.navbar-admin .lang-flag:hover { background: rgba(255,255,255,.12); }
.navbar-admin .lang-flag.active { background: rgba(255,255,255,.20); box-shadow: none; }

/* Compact service autocomplete */
.sms-service-suggestions {
  display: none; position: absolute; z-index: 20; top: 72px; left: 0; right: 0;
  max-height: 220px; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .09);
}
.sms-service-suggestions::-webkit-scrollbar { width: 6px; }
.sms-service-suggestions::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.sms-service-option {
  display: block; width: 100%; min-height: 32px; padding: 6px 10px;
  border: 0; background: transparent; color: var(--text-2);
  text-align: left; font: inherit; font-size: 13px; line-height: 19px; cursor: pointer;
}
.sms-service-option:hover, .sms-service-option:focus-visible {
  outline: 0; background: #f5f7fa; color: var(--text);
}
.sms-service-empty { padding: 8px 10px; color: var(--muted); font-size: 12px; }

/* SMS order cards: phone, cost, dates and countdown have distinct visual groups. */
.sms-order-card { padding: 18px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.sms-order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sms-order-service { color: var(--text); font-size: 16px; font-weight: 750; line-height: 1.35; }
.sms-order-type { margin-top: 3px; color: var(--muted); font-size: 12px; }
.sms-order-phone { margin-top: 18px; padding: 12px 14px; border: 1px solid #e7eaf2; border-radius: 11px; background: var(--surface-2); }
.sms-order-phone-label { color: var(--muted); font-size: 12px; }
.sms-order-phone-value { margin-top: 2px; color: var(--text); font-size: 21px; font-weight: 800; letter-spacing: .01em; line-height: 1.35; overflow-wrap: anywhere; }
.sms-order-phone-row, .sms-order-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-order-phone-row .sms-order-phone-value { min-width: 0; }
.sms-order-copy-row .mono { color: var(--text); font-size: 16px; }
.sms-order-copy-row .btn, .sms-order-phone-row .btn { flex: 0 0 auto; }
.sms-order-code { margin-top: 10px; }
.sms-order-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.sms-order-meta-item { min-width: 0; padding: 9px 11px; border-radius: 9px; background: var(--surface-2); }
.sms-order-meta-label { display: block; color: var(--muted); font-size: 11px; }
.sms-order-meta-value { display: block; margin-top: 2px; color: var(--text-2); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.sms-order-countdown { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding: 11px 13px; border: 1px solid #c7d2fe; border-radius: 10px; background: var(--primary-light); }
.sms-order-countdown-label { color: #4338ca; font-size: 12px; font-weight: 650; }
.sms-order-countdown-value { color: #3730a3; font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 800; white-space: nowrap; }
.sms-order-countdown-expiry { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.sms-order-countdown-note { display: block; color: #b91c1c; font-size: 11px; line-height: 1.35; }
.sms-order-countdown.is-urgent { border-color: #fcd34d; background: var(--warning-bg); }
.sms-order-countdown.is-urgent .sms-order-countdown-label, .sms-order-countdown.is-urgent .sms-order-countdown-value { color: #b45309; }
.sms-order-countdown.is-expired { border-color: #fecaca; background: var(--danger-bg); }
.sms-order-countdown.is-expired .sms-order-countdown-label, .sms-order-countdown.is-expired .sms-order-countdown-value { color: #b91c1c; }
.sms-order-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
@media (max-width: 560px) {
  .sms-order-card { padding: 14px; }
  .sms-order-phone-value { font-size: 19px; }
  .sms-order-copy-row { align-items: flex-start; }
  .sms-order-copy-row .mono { overflow-wrap: anywhere; }
  .sms-order-meta { gap: 7px; }
  .sms-order-meta-item { padding: 8px; }
}

/* Dark two-panel order card, inspired by the SMS provider's compact order view. */
.sms-order-card { margin-bottom: 14px; padding: 13px; border: 1px solid #252525; border-radius: 17px; background: #161616; color: #f8fafc; box-shadow: none; }
.sms-order-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(225px, .92fr); gap: 12px; }
.sms-order-main, .sms-order-side { min-width: 0; padding: 15px; border-radius: 14px; background: #202020; }
.sms-order-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-order-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.sms-order-mark { flex: 0 0 auto; color: #d1d5db; font-size: 17px; letter-spacing: 2px; line-height: 1; }
.sms-order-service { color: #f8fafc; font-size: 16px; font-weight: 750; }
.sms-order-type { margin-top: 1px; color: #94a3b8; font-size: 12px; }
.sms-order-price { flex: 0 0 auto; color: #1685ff; font-size: 17px; font-weight: 800; white-space: nowrap; }
.sms-order-phone { margin-top: 15px; padding: 11px 13px; border: 0; border-radius: 12px; background: #2b2b2b; }
.sms-order-phone-label { color: #9ca3af; font-size: 11px; }
.sms-order-phone-row { align-items: center; }
.sms-order-phone-value { margin-top: 1px; color: #f8fafc; font-size: 17px; font-weight: 750; letter-spacing: 0; }
.sms-order-copy { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #454545; border-radius: 7px; background: #242424; color: #60a5fa; font-size: 12px; font-weight: 700; cursor: pointer; }
.sms-order-copy:hover { border-color: #3b82f6; background: #17253a; }
.sms-order-state { margin-top: 12px; padding: 11px 13px; border: 1px solid #0b2743; border-radius: 12px; background: #03182b; color: #70b8ff; }
.sms-order-state-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-order-state-name { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.sms-order-state-name i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #1e88ff; box-shadow: 0 0 0 3px rgba(30,136,255,.12); }
.sms-order-state-hint { margin-top: 5px; color: #8fa8c0; font-size: 12px; line-height: 1.45; }
.sms-order-countdown-value { color: #63aaff; font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.sms-order-countdown-expiry { display: block; margin-top: 3px; color: #7790a8; font-size: 10px; line-height: 1.4; }
.sms-order-countdown-expiry small { display: block; color: #fb7185; font-size: 10px; }
.sms-order-state.is-urgent { border-color: #754d12; background: #241a08; color: #fbbf24; }
.sms-order-state.is-urgent .sms-order-state-name i { background: #f59e0b; }
.sms-order-state.is-urgent .sms-order-countdown-value { color: #fbbf24; }
.sms-order-state.is-expired { border-color: #5b1d1d; background: #260b0b; color: #fb7185; }
.sms-order-state.is-expired .sms-order-state-name i { background: #ef4444; }
.sms-order-state.is-expired .sms-order-countdown-value { color: #fb7185; }
.sms-order-side { display: flex; flex-direction: column; }
.sms-order-detail { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #373737; font-size: 12px; }
.sms-order-detail:first-child { padding-top: 1px; }
.sms-order-detail span { color: #9ca3af; }
.sms-order-detail strong { color: #f8fafc; text-align: right; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.sms-order-refund { margin-top: 9px; color: #4ade80; font-size: 12px; }
.sms-order-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 13px; }
.sms-order-actions .btn { min-height: 34px; padding: 6px 10px; }
.sms-order-cancel { width: 100%; border: 0; border-radius: 10px; background: #330b0b; color: #ff4d4f; font-weight: 750; }
.sms-order-cancel:hover { background: #4a1111; color: #ff7778; }
.sms-order-refresh { border: 1px solid #454545; border-radius: 9px; background: #252525; color: #d1d5db; }
.sms-order-refresh:hover { border-color: #737373; background: #303030; color: #fff; }
.sms-order-reuse { border: 1px solid #1d4ed8; border-radius: 9px; background: #1d4ed8; color: #fff; }
.sms-order-reuse:hover { background: #2563eb; color: #fff; }
.sms-order-duration { flex: 1 1 120px; min-width: 0; min-height: 34px; padding: 5px 8px; border: 1px solid #454545; background: #252525; color: #f8fafc; }
.sms-order-messages { grid-column: 1 / -1; color: #cbd5e1; }
.sms-order-code { grid-column: 1 / -1; margin: 0; padding: 12px 15px; border: 1px solid #244a72; border-radius: 12px; background: #0a1c2d; color: #dbeafe; }
.sms-order-code-label { margin-bottom: 5px; color: #93c5fd; font-size: 12px; font-weight: 700; }
.sms-order-code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-order-code-value { color: #fff; font-size: 22px; letter-spacing: .06em; }
.sms-order-code .sms-order-copy { border-color: #31577d; background: #102b45; }
@media (max-width: 680px) {
  .sms-order-grid { grid-template-columns: minmax(0, 1fr); }
  .sms-order-main, .sms-order-side { padding: 13px; }
  .sms-order-side { min-height: 0; }
  .sms-order-detail { padding: 8px 0; }
  .sms-order-actions { margin-top: 0; }
}

/* Compact order rows that follow the site's light card and spacing system. */
.sms-order-card { margin-bottom: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sms-order-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-order-service { color: var(--text); font-size: 15px; font-weight: 750; line-height: 1.35; }
.sms-order-type { margin-top: 1px; color: var(--muted); font-size: 11px; }
.sms-order-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sms-order-price { color: var(--primary); font-size: 15px; font-weight: 800; white-space: nowrap; }
.sms-order-phone { margin-top: 10px; padding: 9px 11px; border: 1px solid #e9edf3; border-radius: 9px; background: var(--surface-2); }
.sms-order-phone-label { color: var(--muted); font-size: 10px; line-height: 1.3; }
.sms-order-phone-value { margin-top: 1px; color: var(--text); font-size: 17px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.sms-order-copy { flex: 0 0 auto; padding: 4px 9px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 700; cursor: pointer; }
.sms-order-copy:hover { border-color: #a5b4fc; background: var(--primary-light); }
.sms-order-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.sms-order-state { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 7px 9px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: var(--text-2); }
.sms-order-state-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); font-size: 11px; font-weight: 650; line-height: 1.4; }
.sms-order-state-hint { width: 100%; color: var(--muted); font-size: 10px; line-height: 1.35; }
.sms-order-state-name i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); }
.sms-order-countdown-value { margin-left: auto; color: var(--primary); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.sms-order-countdown-expiry { width: 100%; color: var(--muted); font-size: 10px; line-height: 1.3; }
.sms-order-countdown-expiry span { color: var(--danger); }
.sms-order-countdown-expiry small { display: block; color: var(--danger); }
.sms-order-state.is-urgent { border-color: #fcd34d; background: var(--warning-bg); color: #92400e; }
.sms-order-state.is-urgent .sms-order-state-name, .sms-order-state.is-urgent .sms-order-countdown-value { color: #b45309; }
.sms-order-state.is-urgent .sms-order-state-name i { background: #d97706; }
.sms-order-state.is-expired { border-color: #fecaca; background: var(--danger-bg); color: #991b1b; }
.sms-order-state.is-expired .sms-order-state-name { color: #991b1b; }
.sms-order-state.is-expired .sms-order-state-name i { background: var(--danger); }
.sms-order-created { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 10px; line-height: 1.35; white-space: nowrap; }
.sms-order-created strong { color: var(--text-2); font-size: 11px; font-weight: 650; }
.sms-order-refund { margin-top: 7px; color: #15803d; font-size: 11px; }
.sms-order-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.sms-order-actions .btn { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.sms-order-duration { flex: 0 1 130px; min-width: 90px; min-height: 30px; padding: 4px 8px; font-size: 11px; }
.sms-order-messages { margin-top: 6px; color: var(--text-2); }
.sms-order-code { margin: 9px 0 0; padding: 9px 11px; border: 1px solid #c7d2fe; border-radius: 9px; background: #f5f7ff; color: var(--text); }
.sms-order-code-label { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.sms-order-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-order-code-value { color: var(--primary-dark); font-size: 18px; letter-spacing: .04em; }
.sms-expired-reminder { margin: 0 0 10px; padding: 8px 11px; font-size: 12px; line-height: 1.5; }

/* ---------- Admin platform overview ---------- */
.platform-overview { --ov-ink: #09152a; --ov-muted: #9db0ce; --ov-cyan: #42d9ff; }
.overview-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 190px; margin-bottom: 20px; padding: 29px 32px; overflow: hidden; border: 1px solid rgba(113, 167, 255, .2); border-radius: 18px; background: radial-gradient(ellipse at 78% 15%, rgba(32, 164, 255, .25), transparent 32%), linear-gradient(118deg, #071326 0%, #0d1d3a 53%, #101c37 100%); box-shadow: 0 18px 38px rgba(12, 28, 56, .16); color: #f8fbff; }
.overview-hero-content, .overview-updated { position: relative; z-index: 2; }
.overview-eyebrow, .overview-api-foot { display: flex; align-items: center; gap: 9px; color: #9ab4d8; font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.overview-live-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #47e7c0; box-shadow: 0 0 12px rgba(71, 231, 192, .8); }
.overview-hero h2 { margin: 13px 0 6px; color: #f7faff; font-size: clamp(24px, 3vw, 33px); letter-spacing: -.035em; }
.overview-hero p { margin: 0; color: #9fb2d0; font-size: 13px; }
.overview-updated { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: #90a6c7; font-size: 11px; }
.overview-updated strong { color: #e5f4ff; font-size: 15px; font-variant-numeric: tabular-nums; }
.overview-hero-glow { position: absolute; z-index: 0; width: 250px; height: 250px; border: 1px solid rgba(73, 199, 255, .14); border-radius: 50%; box-shadow: 0 0 0 28px rgba(73,199,255,.025), 0 0 0 58px rgba(73,199,255,.02), inset 0 0 50px rgba(61,168,255,.05); }
.overview-hero-glow-a { top: -130px; right: 12%; }
.overview-hero-glow-b { right: 6%; bottom: -200px; width: 310px; height: 310px; opacity: .65; }
.overview-hero-grid { position: absolute; z-index: 0; inset: 0 0 0 42%; opacity: .18; background-image: linear-gradient(rgba(125, 177, 255, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 177, 255, .16) 1px, transparent 1px); background-size: 35px 35px; mask-image: linear-gradient(90deg, transparent, #000); }
.overview-stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.overview-stat-card { position: relative; min-width: 0; padding: 17px 18px 15px; overflow: hidden; border: 1px solid #e5eaf2; border-radius: 14px; background: linear-gradient(150deg, #fff 0%, #fbfcff 100%); box-shadow: 0 4px 14px rgba(20, 42, 78, .045); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.overview-stat-card:hover { transform: translateY(-2px); border-color: #c7d7f2; box-shadow: 0 11px 24px rgba(20, 42, 78, .09); }
.overview-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.overview-stat-icon { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid #dfe9fb; border-radius: 10px; background: #eef4ff; color: #4966d7; font-size: 18px; font-weight: 750; }
.overview-stat-icon.blue { border-color: #d8edff; background: #eaf7ff; color: #168ac9; }
.overview-stat-icon.green { border-color: #d2f3e5; background: #eafaf2; color: #079568; }
.overview-stat-icon.red { border-color: #ffe0de; background: #fff1f0; color: #e05f5a; }
.overview-stat-icon.amber { border-color: #ffebc2; background: #fff8e8; color: #d39119; }
.overview-stat-spark { color: #bdc9db; font-size: 19px; letter-spacing: 2px; line-height: 1; }
.overview-stat-card .label { overflow: hidden; color: #77859b; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.overview-stat-card .value { margin-top: 5px; overflow: hidden; color: #15243b; font-size: clamp(21px, 2vw, 27px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.overview-stat-card .value.green { color: #07855f; }
.overview-stat-card .value.blue { color: #1978bd; }
.overview-stat-card .value.red { color: #cf5550; }
.overview-stat-card .value.amber { color: #b77a0c; }
.admin-main .platform-overview .overview-stat-card .value:not(.blue):not(.green):not(.red):not(.amber) { color: #f4f7ff; text-shadow: 0 1px 10px rgba(111, 179, 255, .18); }
.overview-stat-line { height: 2px; margin-top: 13px; overflow: hidden; border-radius: 2px; background: #edf1f7; }
.overview-stat-line i { display: block; width: calc(38% + var(--metric-index) * 5%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #52cfff, #586be9); opacity: .78; }
.overview-api-alert { margin: 0 0 16px; border-radius: 12px; }
.overview-panels { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(245px, .75fr); gap: 16px; }
.admin-main .platform-overview .overview-chart-card, .admin-main .platform-overview .overview-api-card { position: relative; min-width: 0; min-height: 246px; margin: 0; padding: 21px 22px; overflow: hidden; border: 1px solid rgba(104, 142, 199, .18); border-radius: 16px; background: linear-gradient(145deg, #0b172b, #111f38); box-shadow: 0 12px 28px rgba(16, 35, 67, .11); color: #edf5ff; }
.overview-panel-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.overview-panel-kicker { margin-bottom: 7px; color: #6ebedb; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.platform-overview .overview-chart-card .card-title, .platform-overview .overview-api-card .card-title { margin: 0; color: #f0f5ff; font-size: 15px; }
.overview-range { padding: 6px 9px; border: 1px solid rgba(135, 166, 214, .19); border-radius: 7px; background: rgba(28, 50, 83, .68); color: #a9bddc; font-size: 9px; font-weight: 700; letter-spacing: .07em; white-space: nowrap; }
.overview-trend-chart { position: relative; display: flex; align-items: flex-end; gap: 7px; height: 155px; margin-top: 10px; padding: 8px 4px 0; background: repeating-linear-gradient(to top, transparent 0, transparent 37px, rgba(141, 168, 207, .11) 38px, transparent 39px); }
.overview-chart-column { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.overview-chart-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 130px; }
.overview-chart-bar { width: min(35%, 13px); min-width: 3px; border-radius: 4px 4px 1px 1px; transition: height .35s ease, filter .15s ease; }
.overview-chart-column:hover .overview-chart-bar { filter: brightness(1.22); }
.overview-chart-bar-topup { background: linear-gradient(180deg, #59dcff, #3686ed); box-shadow: 0 0 10px rgba(57, 174, 247, .2); }
.overview-chart-bar-spent { background: linear-gradient(180deg, #a992ff, #6955d6); }
.overview-chart-day { color: #7388a7; font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.overview-legend { display: flex; gap: 18px; margin-top: 13px; color: #9aacc7; font-size: 10px; }
.overview-legend span { display: inline-flex; align-items: center; gap: 7px; }
.overview-legend i { width: 7px; height: 7px; border-radius: 2px; }
.legend-topup { background: #52cafa; box-shadow: 0 0 8px rgba(82,202,250,.5); }
.legend-spent { background: #8e79ed; }
.admin-main .platform-overview .overview-api-card { display: flex; flex-direction: column; justify-content: center; }
.overview-api-orb { position: absolute; top: -60px; right: -58px; width: 190px; height: 190px; border: 1px solid rgba(68, 208, 247, .16); border-radius: 50%; background: radial-gradient(circle, rgba(42, 169, 220, .18), transparent 68%); box-shadow: 0 0 0 20px rgba(72, 180, 232, .025), 0 0 0 42px rgba(72, 180, 232, .018); }
.overview-api-card > *:not(.overview-api-orb) { position: relative; }
.overview-api-value { margin-top: 10px; color: #f5fbff; font-size: clamp(30px, 3vw, 38px); font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.04em; text-shadow: 0 0 20px rgba(69, 196, 255, .2); }
.overview-api-caption { margin-top: 4px; color: #8298b7; font-size: 10px; }
.overview-api-divider { height: 1px; margin: 22px 0 14px; background: linear-gradient(90deg, rgba(116, 155, 205, .28), transparent); }
.overview-api-foot { color: #91a9c8; font-size: 9px; letter-spacing: .04em; text-transform: none; }
@media (max-width: 1100px) {
  .overview-stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .overview-stat-card { padding: 14px; }
}
@media (max-width: 780px) {
  .overview-panels { grid-template-columns: 1fr; }
  .admin-main .platform-overview .overview-api-card { min-height: 205px; }
}
@media (max-width: 560px) {
  .overview-hero { align-items: flex-start; flex-direction: column; gap: 18px; min-height: 0; padding: 23px 20px; }
  .overview-updated { align-items: flex-start; }
  .overview-stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .overview-stat-card { padding: 13px; }
  .overview-stat-top { margin-bottom: 10px; }
  .overview-stat-icon { width: 29px; height: 29px; }
  .overview-stat-card .value { font-size: 22px; }
  .admin-main .platform-overview .overview-chart-card, .admin-main .platform-overview .overview-api-card { padding: 17px; }
  .overview-trend-chart { gap: 3px; }
  .overview-chart-day { font-size: 8px; }
}
@media (max-width: 560px) {
  .sms-order-card { padding: 11px; }
  .sms-order-info { align-items: stretch; flex-direction: column; }
  .sms-order-created { align-items: flex-start; padding-left: 2px; white-space: normal; }
  .sms-order-head-right { gap: 5px; }
  .sms-order-service { font-size: 14px; }
  .sms-order-phone-value { font-size: 16px; }
}

/* ---------- Admin workspace: unified dark tech console ---------- */
.admin-page {
  --primary: #49c9f5;
  --primary-dark: #139fcf;
  --primary-light: rgba(73, 201, 245, .13);
  --accent: #7487ff;
  --bg: #071222;
  --surface: #0e1b30;
  --surface-2: #12223a;
  --text: #e8f1ff;
  --text-2: #bfcee3;
  --muted: #8298b8;
  --border: rgba(139, 171, 216, .16);
  --success: #45d7a1;
  --success-bg: rgba(31, 180, 127, .14);
  --danger: #ff7888;
  --danger-bg: rgba(255, 92, 116, .13);
  --warning: #ffc66d;
  --warning-bg: rgba(255, 183, 64, .13);
  --info: #62c8ff;
  --info-bg: rgba(73, 176, 255, .13);
  --shadow: 0 8px 24px rgba(0, 0, 0, .15);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .42);
  min-height: 100%;
  background: radial-gradient(ellipse at 84% 8%, rgba(20, 91, 142, .15), transparent 32%), radial-gradient(ellipse at 5% 78%, rgba(48, 66, 145, .10), transparent 30%), #071222;
  color: var(--text);
}
.admin-page .navbar-admin { background: rgba(7, 18, 34, .94); border-bottom: 1px solid rgba(109, 169, 218, .16); box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.admin-page .navbar-admin .nav-links a.active { background: rgba(73, 201, 245, .14); color: #73ddff; box-shadow: inset 0 0 0 1px rgba(73,201,245,.19); }
.admin-page .navbar-admin .btn-outline { background: rgba(255,255,255,.035); border-color: rgba(155,184,224,.24); }
.admin-page .navbar-admin #nav-logout { color: #c4d4e9; background: rgba(255,255,255,.035); border-color: rgba(155,184,224,.24); }
.admin-page .navbar-admin #nav-logout:hover { background: rgba(255, 99, 119, .12); border-color: rgba(255, 123, 139, .45); color: #ff9aa8; }
.admin-page .admin-sidebar { border-right: 1px solid rgba(109, 169, 218, .14); background: linear-gradient(180deg, #09182d 0%, #0a1527 100%); box-shadow: 12px 0 40px rgba(0,0,0,.12); }
.admin-page .admin-sidebar::after { position: fixed; left: 0; bottom: 0; width: 219px; height: 150px; pointer-events: none; content: ''; background: radial-gradient(ellipse at 0 100%, rgba(31, 153, 216, .13), transparent 68%); }
.admin-page .admin-sidebar a { position: relative; border: 1px solid transparent; color: #9fb2ce; transition: color .16s, background .16s, border-color .16s, transform .16s; }
.admin-page .admin-sidebar a:hover { transform: translateX(2px); border-color: rgba(102, 165, 216, .13); background: rgba(255,255,255,.045); color: #e8f6ff; }
.admin-page .admin-sidebar a.active { border-color: rgba(73, 201, 245, .22); background: linear-gradient(100deg, rgba(35, 168, 218, .19), rgba(68, 111, 206, .10)); color: #79ddff; box-shadow: inset 2px 0 #48cafa, 0 5px 18px rgba(0,0,0,.1); }
.admin-page .admin-main { color: var(--text); }
.admin-page .admin-main h2 { color: #ecf5ff; }
.admin-page .admin-main .sub { color: #8196b4; }
.admin-page .admin-main .card:not(.overview-chart-card):not(.overview-api-card) { border-color: rgba(135, 168, 211, .15); background: linear-gradient(145deg, rgba(17, 33, 56, .98), rgba(13, 27, 47, .98)); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.admin-page .admin-main .card-title { color: #dceaff; }
.admin-page .admin-main .toolbar { padding: 12px; border: 1px solid rgba(135, 168, 211, .13); border-radius: 13px; background: rgba(14, 29, 50, .74); box-shadow: 0 7px 20px rgba(0,0,0,.08); }
.admin-page .admin-main .table-wrap { border-color: rgba(135, 168, 211, .17); border-radius: 13px; background: rgba(12, 26, 45, .82); box-shadow: 0 12px 28px rgba(0,0,0,.11); }
.admin-page .admin-main table { color: var(--text-2); }
.admin-page .admin-main table th { border-color: rgba(135, 168, 211, .14); background: linear-gradient(180deg, #152842, #12223a); color: #9fb7d7; font-size: 11px; font-weight: 750; letter-spacing: .035em; }
.admin-page .admin-main table td { border-color: rgba(135, 168, 211, .11); color: #aebed4; }
.admin-page .admin-main table td strong, .admin-page .admin-main table td .mono { color: #e0ebfa; }
.admin-page .admin-main tbody tr { transition: background .14s; }
.admin-page .admin-main tbody tr:hover { background: rgba(49, 103, 159, .13); }
.admin-page .admin-main .input, .admin-page .admin-main .select, .admin-page .admin-main .textarea { border-color: rgba(135, 168, 211, .22); background: #0a172a; color: #e2edfc; color-scheme: dark; box-shadow: inset 0 1px 2px rgba(0,0,0,.12); }
.admin-page .admin-main .input::placeholder, .admin-page .admin-main .textarea::placeholder { color: #607794; }
.admin-page .admin-main .input:focus, .admin-page .admin-main .select:focus, .admin-page .admin-main .textarea:focus { border-color: rgba(73, 201, 245, .65); box-shadow: 0 0 0 3px rgba(73, 201, 245, .12), 0 0 18px rgba(73, 201, 245, .06); }
.admin-page .admin-main .field label { color: #b7c8df; }
.admin-page .admin-main .hint, .admin-page .admin-main .muted, .admin-page .admin-main .small.muted { color: #8298b8; }
.admin-page .admin-main .btn-outline { border-color: rgba(137, 170, 214, .23); background: rgba(255,255,255,.035); color: #b9cbe2; }
.admin-page .admin-main .btn-outline:hover:not(:disabled) { border-color: rgba(73, 201, 245, .55); background: rgba(73, 201, 245, .09); color: #79ddff; }
.admin-page .admin-main .btn-primary { color: #041625; background: linear-gradient(110deg, #63d8ff, #55aaff); box-shadow: 0 5px 18px rgba(49, 176, 231, .2); }
.admin-page .admin-main .btn-primary:hover:not(:disabled) { background: linear-gradient(110deg, #8ce5ff, #77bdff); box-shadow: 0 7px 22px rgba(49, 176, 231, .28); }
.admin-page .admin-main .btn-danger { background: linear-gradient(110deg, #e95772, #c43c5e); box-shadow: 0 5px 16px rgba(224, 70, 104, .13); }
.admin-page .admin-main .badge-green { background: rgba(37, 190, 136, .14); color: #69e1b3; }
.admin-page .admin-main .badge-red { background: rgba(255, 101, 123, .14); color: #ff9ba8; }
.admin-page .admin-main .badge-blue { background: rgba(78, 177, 255, .14); color: #85d4ff; }
.admin-page .admin-main .badge-amber { background: rgba(255, 186, 76, .14); color: #ffd081; }
.admin-page .admin-main .badge-gray { background: rgba(159, 177, 204, .12); color: #a3b2c8; }
.admin-page .admin-main .badge-indigo { background: rgba(98, 112, 255, .15); color: #a9b5ff; }
.admin-page .admin-main .alert-info { border-color: rgba(76, 173, 255, .2); background: rgba(54, 137, 210, .11); color: #9ad6ff; }
.admin-page .admin-main .alert-warning { border-color: rgba(255, 190, 78, .2); background: rgba(188, 126, 27, .11); color: #ffd18b; }
.admin-page .admin-main .alert-success { border-color: rgba(57, 212, 157, .2); background: rgba(31, 163, 119, .11); color: #81e6bd; }
.admin-page .admin-main .alert-error { border-color: rgba(255, 104, 125, .22); background: rgba(178, 50, 73, .12); color: #ff9aa8; }
.admin-page .sub-tabs { gap: 8px; padding: 8px; border: 1px solid rgba(135, 168, 211, .13); border-radius: 13px; background: rgba(13, 28, 49, .75); }
.admin-page .sub-tab { padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #91a8c7; box-shadow: none; font-size: 12px; }
.admin-page .sub-tab:hover { border-color: rgba(73, 201, 245, .2); background: rgba(73, 201, 245, .07); color: #b9efff; }
.admin-page .sub-tab.active { border-color: rgba(73, 201, 245, .22); background: linear-gradient(110deg, rgba(73, 201, 245, .17), rgba(90, 121, 235, .15)); color: #7bdfff; box-shadow: inset 0 0 0 1px rgba(73, 201, 245, .06), 0 4px 12px rgba(0,0,0,.08); }
.admin-page .modal-mask { background: rgba(2, 8, 18, .72); backdrop-filter: blur(7px); }
.admin-page .modal { border: 1px solid rgba(125, 164, 213, .2); background: linear-gradient(145deg, #14243b, #0d192d); color: #e5efff; box-shadow: 0 25px 80px rgba(0,0,0,.5), 0 0 40px rgba(53, 146, 207, .08); }
.admin-page .modal h3 { color: #f1f7ff; }
.admin-page .modal .btn-outline { border-color: rgba(137, 170, 214, .23); background: rgba(255,255,255,.035); color: #b9cbe2; }
.admin-page .file-picker { border-color: rgba(135, 168, 211, .2); background: #0a172a; }
.admin-page .file-picker-name { color: #a8bbd5; }
.admin-page .file-picker-btn { background: linear-gradient(110deg, #63d8ff, #55aaff); color: #041625; }
.admin-page .empty { color: #8399b8; }
.admin-page ::selection { background: rgba(73, 201, 245, .26); color: #fff; }
.admin-page .admin-sidebar { width: 242px; padding-right: 11px; padding-left: 11px; }
.admin-page .admin-sidebar::after { width: 241px; }
.admin-page .admin-nav-label { padding: 17px 11px 7px; color: #5f7798; font-size: 9px; font-weight: 800; letter-spacing: .16em; line-height: 1.2; }
.admin-page .admin-nav-label:not(:first-child) { margin-top: 2px; }
.admin-page .admin-sidebar a { min-height: 38px; gap: 11px; padding: 8px 11px; font-size: 12.5px; }
.admin-page .admin-sidebar a i { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border: 1px solid rgba(145, 177, 218, .13); border-radius: 6px; background: rgba(255,255,255,.035); color: #82a3cb; font-size: 13px; font-style: normal; font-weight: 700; line-height: 1; }
.admin-page .admin-sidebar a.active i { border-color: rgba(73,201,245,.27); background: rgba(73,201,245,.13); color: #74ddff; }
.admin-page .admin-main { margin-left: 242px; }
.admin-page .settings-panels { max-width: 900px; }
.admin-page .settings-panel { padding: 25px; }
.admin-page .settings-panel-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding-bottom: 17px; border-bottom: 1px solid rgba(135, 168, 211, .13); }
.admin-page .settings-panel-icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid rgba(73, 201, 245, .2); border-radius: 12px; background: linear-gradient(145deg, rgba(73, 201, 245, .14), rgba(95, 123, 233, .1)); color: #76ddff; font-size: 21px; font-weight: 700; }
.admin-page .settings-panel-heading h3 { margin: 0; color: #e7f2ff; font-size: 17px; letter-spacing: -.01em; }
.admin-page .settings-panel-heading p { margin: 4px 0 0; color: #849bb9; font-size: 11px; }
.admin-page .settings-panel .field { margin-bottom: 17px; }
.admin-page .settings-panel-actions { display: flex; align-items: center; gap: 9px; margin-top: 5px; }
.admin-page .settings-security-note { margin-bottom: 17px; padding: 10px 12px; border: 1px solid rgba(73, 176, 255, .15); border-radius: 9px; background: rgba(54, 137, 210, .08); }
@media (max-width: 900px) {
  .admin-page .admin-sidebar { width: 64px; padding-right: 7px; padding-left: 7px; }
  .admin-page .admin-sidebar::after { width: 64px; }
  .admin-page .admin-nav-label { display: none; }
  .admin-page .admin-sidebar a { justify-content: center; padding: 8px 6px; }
  .admin-page .admin-sidebar a i { width: 27px; height: 27px; flex-basis: 27px; }
  .admin-page .admin-main { margin-left: 72px; padding-right: 18px; padding-left: 18px; }
}
@media (max-width: 560px) {
  .admin-page .navbar-admin { position: sticky; }
  .admin-page .admin-main { margin-left: 0; padding: 20px 14px 28px; }
  .admin-page .admin-sidebar { position: sticky; top: 0; right: 0; bottom: auto; display: flex; width: 100%; height: 60px; padding: 6px 10px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(109, 169, 218, .14); }
  .admin-page .admin-sidebar a { flex: 0 0 auto; justify-content: center; margin: 0 3px 0 0; padding: 8px 12px; }
  .admin-page .admin-sidebar a span { display: inline; }
  .admin-page .admin-sidebar a i { width: 20px; height: 20px; flex-basis: 20px; }
  .admin-page .admin-nav-label { display: block; flex: 0 0 auto; padding: 16px 8px 7px; font-size: 8px; }
  .admin-page .admin-sidebar::after { display: none; }
  .admin-page .settings-panel { padding: 18px; }
  .admin-page .settings-panel .form-row-3 { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-page *, .admin-page *::before, .admin-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Front-end pages: consistent spacing, controls and dialogs ---------- */
body:not(.admin-page) { background: #f6f8fc; }
body:not(.admin-page) .navbar:not(.navbar-admin) { background: rgba(255,255,255,.94); border-bottom-color: #e8edf4; box-shadow: 0 2px 10px rgba(20,35,60,.035); }
body:not(.admin-page) .navbar:not(.navbar-admin) .nav-links a[data-nav] { color: #536176; border-radius: 9px; }
body:not(.admin-page) .navbar:not(.navbar-admin) .nav-links a[data-nav]:hover { background: #f3f5f9; color: #17243a; }
body:not(.admin-page) .navbar:not(.navbar-admin) .nav-links a[data-nav].active { background: #eef2ff; color: #3f51bd; }
body:not(.admin-page) .navbar:not(.navbar-admin) #nav-logout { background: #fff; color: #536176; }
body:not(.admin-page) .btn { min-height: 40px; border-radius: 9px; font-weight: 650; transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .16s; }
body:not(.admin-page) .btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
body:not(.admin-page) .btn.is-loading { cursor: progress; opacity: .82; }
body:not(.admin-page) .btn.is-loading::after { content: ''; width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: public-button-spin .65s linear infinite; }
@keyframes public-button-spin { to { transform: rotate(360deg); } }
body:not(.admin-page) .btn-sm { min-height: 34px; padding: 6px 11px; }
body:not(.admin-page) .btn-primary { box-shadow: 0 2px 5px rgba(79,70,229,.14); }
body:not(.admin-page) .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(79,70,229,.2); }
body:not(.admin-page) .btn-outline { background: #fff; }
body:not(.admin-page) .card { border-color: #e7ebf2; border-radius: 14px; box-shadow: 0 2px 8px rgba(18,34,61,.035); }
body:not(.admin-page) .card-title { margin-bottom: 14px; color: #1d293b; font-size: 16px; }
body:not(.admin-page) .input, body:not(.admin-page) .select, body:not(.admin-page) .textarea { min-height: 42px; border-color: #dfe5ee; border-radius: 9px; background-color: #fff; }
body:not(.admin-page) .input:focus, body:not(.admin-page) .select:focus, body:not(.admin-page) .textarea:focus { border-color: #8995ec; box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
body:not(.admin-page) .field label { margin-bottom: 6px; color: #46546a; font-size: 12.5px; font-weight: 650; }
body:not(.admin-page) .hint { line-height: 1.55; }
body:not(.admin-page) .page-head { padding: 22px 0 17px; }
body:not(.admin-page) .page-head h1 { color: #17243a; font-size: 24px; letter-spacing: -.025em; }
body:not(.admin-page) .page-head p { max-width: 720px; color: #778398; font-size: 13px; }
body:not(.admin-page) .table-wrap { border-color: #e5eaf1; border-radius: 11px; background: #fff; }
body:not(.admin-page) table { font-size: 13px; }
body:not(.admin-page) th { background: #f7f9fc; color: #66748a; font-size: 11.5px; font-weight: 700; }
body:not(.admin-page) th, body:not(.admin-page) td { padding: 10px 12px; border-bottom-color: #edf0f5; }
body:not(.admin-page) tbody tr:hover { background: #fafbfe; }
body:not(.admin-page) .tabs { gap: 4px; border-bottom-color: #e6eaf1; }
body:not(.admin-page) .tabs button { min-height: 42px; padding: 9px 14px; border-radius: 8px 8px 0 0; font-size: 12.5px; }
body:not(.admin-page) .tabs button.active { background: #f3f5ff; border-bottom-color: #6875d9; color: #4052bd; }
body:not(.admin-page) .alert { border-radius: 10px; font-size: 13px; line-height: 1.55; }
body:not(.admin-page) .empty { padding: 34px 18px; color: #8590a3; }
body:not(.admin-page) .empty .icon { font-size: 30px; }
body:not(.admin-page) .modal-mask { align-items: center; padding: 20px; background: rgba(15,23,42,.46); backdrop-filter: blur(4px); }
body:not(.admin-page) .modal { max-height: calc(100dvh - 40px); overflow-y: auto; padding: 22px; border: 1px solid #e5eaf2; border-radius: 15px; box-shadow: 0 22px 60px rgba(15,23,42,.2); }
body:not(.admin-page) .modal-mask.open .modal { animation: public-modal-in .16s ease-out both; }
@keyframes public-modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
body:not(.admin-page) .modal h3 { margin-bottom: 13px; color: #18263b; font-size: 17px; }
body:not(.admin-page) .modal-actions { gap: 8px; margin-top: 17px; }
body:not(.admin-page) .modal-actions .btn { min-width: 88px; }
body:not(.admin-page) #toast-wrap { top: 14px; right: 14px; max-width: min(360px, calc(100vw - 28px)); }
body:not(.admin-page) .toast { border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.13); }
body:not(.admin-page) .auth-wrap { padding: 28px 16px; background: radial-gradient(circle at 50% 0%, rgba(97,112,228,.08), transparent 38%); }
body:not(.admin-page) .auth-card { max-width: 420px; padding: 28px; border-color: #e6eaf1; box-shadow: 0 10px 35px rgba(21,36,64,.06); }
body:not(.admin-page) .auth-card h1 { color: #18263b; font-size: 22px; }
body:not(.admin-page) .hero { padding-top: 64px; }
body:not(.admin-page) .hero .eyebrow { margin-bottom: 16px; background: #eef2ff; color: #4c5fca; }
body:not(.admin-page) .hero h1 { color: #17243a; }
body:not(.admin-page) .hero p.lead { color: #637188; font-size: 16px; line-height: 1.7; }
body:not(.admin-page) .features, body:not(.admin-page) .pricing { padding-top: 36px; }
body:not(.admin-page) .section-head { margin-bottom: 26px; }
body:not(.admin-page) .section-head h2 { color: #1d293b; font-size: 25px; letter-spacing: -.025em; }
body:not(.admin-page) .section-head p { color: #778398; font-size: 13px; }
body:not(.admin-page) .feature-card, body:not(.admin-page) .price-card { padding: 21px; }
body:not(.admin-page) .price-card, body:not(.admin-page) .price-card.featured { border: 1px solid #e5eaf2; }
body:not(.admin-page) .price-card.featured { box-shadow: 0 5px 18px rgba(79,70,229,.08); }
body:not(.admin-page) .footer { background: transparent; }
.app-page .app-sidebar { background: #fff; border-right: 1px solid #e7ebf2; color: #536176; box-shadow: 2px 0 12px rgba(20,35,60,.025); }
.app-page .sb-brand { color: #1c2a40; padding: 5px 9px 20px; }
.app-page .sb-logo { background: linear-gradient(135deg, #5366d7, #6978df); }
.app-page .sb-group { padding-top: 15px; color: #8d98aa; font-size: 9px; letter-spacing: .12em; }
.app-page .sb-link { height: 40px; margin-bottom: 2px; border: 1px solid transparent; border-radius: 9px; color: #58677d; font-size: 12.5px; font-weight: 600; }
.app-page .sb-link:hover { background: #f4f6fa; color: #293850; }
.app-page .sb-link.active { border-color: #e2e7ff; background: #f0f2ff; color: #4357c2; box-shadow: none; }
.app-page .sb-ico { color: #77869d; font-size: 14px; }
.app-page .sb-link.active .sb-ico { color: #5366d7; }
.app-page .sb-balance { border: 1px solid #e5e9f3; background: #f7f8fc; color: #33425a; }
.app-page .sb-balance-label { color: #758198; opacity: 1; }
.app-page .sb-balance-amount { color: #18263b; font-size: 21px; }
.app-page .sb-balance-btn { background: #e9edff; color: #4458c3; }
.app-page .sb-balance-btn:hover { background: #dde4ff; }
.app-page .app-topbar { background: rgba(255,255,255,.92); border-bottom-color: #e7ebf2; backdrop-filter: blur(12px); }
.app-page .tb-title { color: #344258; font-size: 15px; }
.app-page .app-content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 22px 26px 36px; }
.app-page .grid { gap: 16px; }
.app-page .grid-2 { align-items: start; }
.app-page .query-grid { gap: 16px; }
.app-page .query-grid { grid-template-columns: minmax(300px, .78fr) minmax(0, 1.42fr); }
.app-page .query-grid > *, .app-page .sms-workspace > * { min-width: 0; }
.app-page .sms-workspace { grid-template-columns: minmax(300px, .88fr) minmax(0, 1.12fr); align-items: start; }
.app-page #sms-orders, .app-page .card { min-width: 0; }
.app-page .rental-management-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .4fr); gap: 9px; margin: 0 0 6px; }
.app-page .rental-management-count { margin: 0 0 12px; }
.app-page .stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-page .balance-hero { border-radius: 14px; padding: 22px 24px; background: linear-gradient(115deg, #5367d7, #6578dc); box-shadow: 0 8px 22px rgba(72,91,197,.13); }
.app-page .balance-hero .amount { font-size: 31px; }
@media (max-width: 900px) {
  .app-page .query-grid, .app-page .sms-workspace { grid-template-columns: minmax(0, 1fr); }
  .app-page .result-card { min-height: 190px; }
  .app-page .app-sidebar { position: sticky; top: 0; z-index: 45; width: 100%; height: 58px; flex-wrap: nowrap; align-items: center; gap: 5px; padding: 7px 10px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #e7ebf2; }
  .app-page .sb-brand { flex: 0 0 auto; padding: 4px 8px 4px 0; }
  .app-page .sb-link { flex: 0 0 auto; height: 36px; margin: 0; padding: 0 10px; font-size: 11.5px; }
  .app-page .app-topbar { position: sticky; top: 58px; }
  .app-page .app-content { padding: 16px 18px 28px; }
}
@media (max-width: 560px) {
  body:not(.admin-page) .modal-mask { align-items: flex-end; padding: 10px; }
  body:not(.admin-page) .modal { max-height: calc(100dvh - 20px); padding: 19px 17px; border-radius: 14px; }
  body:not(.admin-page) .modal-actions { flex-direction: column-reverse; }
  body:not(.admin-page) .modal-actions .btn { width: 100%; }
  body:not(.admin-page) .auth-card { padding: 23px 19px; }
  body:not(.admin-page) .hero { padding-top: 42px; }
  body:not(.admin-page) .hero h1 { font-size: 30px; }
  body:not(.admin-page) .hero p.lead { font-size: 14px; }
  .app-page .app-topbar { top: 58px; padding: 8px 12px; }
  .app-page .app-content { padding: 13px 12px 24px; }
  .app-page .page-head { padding: 17px 1px 13px; }
  .app-page .page-head h1 { font-size: 21px; }
  .app-page .card { padding: 17px; }
  .app-page .form-row, .app-page .form-row-3 { grid-template-columns: 1fr; gap: 0; }
  .app-page .toolbar { align-items: stretch; }
  .app-page .toolbar .input, .app-page .toolbar .select { width: 100%; }
  .app-page .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .app-page .tabs button { flex: 0 0 auto; white-space: nowrap; }
  .app-page .balance-hero { padding: 18px; }
  .app-page .balance-hero .amount { font-size: 27px; }
  .app-page .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-page .stat-card { padding: 14px; }
  .app-page .stat-card .value { font-size: 23px; overflow-wrap: anywhere; }
  .app-page .sms-workspace { gap: 12px; }
  .app-page .rental-management-toolbar { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.admin-page) *, body:not(.admin-page) *::before, body:not(.admin-page) *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shared interaction details for public pages */
body:not(.admin-page) :focus-visible { outline: 3px solid rgba(79,70,229,.28); outline-offset: 2px; }
body:not(.admin-page) button:disabled, body:not(.admin-page) .btn:disabled { filter: saturate(.65); }
body:not(.admin-page) .alert + .grid, body:not(.admin-page) .alert + .card { margin-top: 14px; }
body:not(.admin-page) .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body:not(.admin-page) .empty { border-radius: 12px; text-align: center; }
body:not(.admin-page) .modal-mask { overscroll-behavior: contain; }
@media (max-width: 560px) {
  body:not(.admin-page) .container { padding-left: 14px; padding-right: 14px; }
  body:not(.admin-page) .navbar-inner { padding-left: 14px; padding-right: 14px; }
  body:not(.admin-page) .nav-links { width: 100%; gap: 3px; }
  body:not(.admin-page) .nav-links a[data-nav] { padding: 7px 9px; font-size: 12px; }
  body:not(.admin-page) .nav-links .btn { min-height: 34px; padding: 6px 9px; }
  body:not(.admin-page) .sms-order-head { gap: 8px; }
  body:not(.admin-page) .sms-order-phone-value { font-size: 18px; }
}
