:root {
  color-scheme: light;
  --page-bg: #ececff;
  --panel-border: rgba(255, 255, 255, 0.62);
  --text-main: #21242d;
  --text-soft: #656c7d;
  --text-faint: #97a0b2;
  --brand: #4f46e5;
  --shadow-soft: 0 14px 32px rgba(111, 118, 198, 0.08);
  --card-radius: 36px;
  --card-radius-md: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.9), transparent 28%),
    radial-gradient(circle at 78% 16%, rgba(210, 214, 255, 0.75), transparent 26%),
    linear-gradient(180deg, #f8f9ff 0%, #ececff 18%, #e8e7ff 100%);
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { border: 0; background: none; }

.page-bg {
  position: fixed;
  inset: 96px 0 0;
  background:
    radial-gradient(circle at left top, rgba(255, 255, 255, 0.88), transparent 24%),
    radial-gradient(circle at right bottom, rgba(166, 157, 255, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(234, 237, 255, 0.72), rgba(229, 228, 255, 0.94));
  z-index: 0;
}

.site-header, .page-shell, .site-footer, .admin-shell { position: relative; z-index: 1; }
.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(227, 230, 245, 0.78);
  backdrop-filter: blur(20px);
}

.header-inner, .page-shell, .footer-inner, .admin-shell {
  width: min(1280px, calc(100vw - 80px));
  margin: 0 auto;
}

.header-inner {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand-text { font-size: 23px; font-weight: 700; color: var(--brand); letter-spacing: -0.03em; }
.main-nav { display: inline-flex; align-items: center; justify-content: center; gap: 26px; }
.nav-link { font-size: 17px; color: #56627d; }
.nav-link.active, .nav-link:hover { color: var(--brand); }
.header-tools { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; }

.tool-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #6f7891;
  cursor: pointer;
}

.tool-icon svg { width: 20px; height: 20px; fill: currentColor; }
.avatar-link { display: inline-flex; border-radius: 999px; }
.avatar-ring {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b8edf5, #c8d5ff);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.82);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #33456f;
}

.avatar-ring svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.page-shell { padding: 60px 0 64px; }

.hero-card {
  max-width: 1120px;
  margin: 0 auto 72px;
  border-radius: 58px;
  background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.6));
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 40px 80px rgba(124,123,194,0.14);
  backdrop-filter: blur(24px);
}

.hero-card-inner { padding: 80px 88px 72px; text-align: center; }
.hero-card h1 { margin: 0; font-size: clamp(52px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.055em; }
.hero-subtitle { max-width: 780px; margin: 22px auto 56px; color: #555f70; font-size: clamp(18px, 2vw, 28px); line-height: 1.45; }

.query-row { display: grid; grid-template-columns: minmax(0, 1fr) 242px; gap: 18px; max-width: 844px; margin: 0 auto 24px; }
.query-input-shell {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 0 14px 0 28px;
  border-radius: 999px;
  background: rgba(241,244,249,0.96);
  border: 1px solid rgba(230,235,244,0.92);
}

.query-icon { display: inline-flex; color: #8591ac; }
.query-icon svg { width: 24px; height: 24px; fill: currentColor; }
.query-input-shell input {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #384152;
  font-size: 20px;
}

.inline-toggle {
  min-width: 74px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  color: #5d6a88;
  cursor: pointer;
}

.query-button, .primary-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 80px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #4a46df, #8d84ff);
  box-shadow: 0 20px 36px rgba(92,86,239,0.26);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.query-button svg { width: 20px; height: 20px; fill: currentColor; }

.range-bar, .range-pills, .date-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.range-bar { margin-bottom: 24px; }

.range-pill {
  min-width: 104px;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(219,223,246,0.84);
  color: #66708a;
  cursor: pointer;
}

.range-pill.active { background: rgba(83,75,232,0.14); color: var(--brand); }

.date-inputs input, .form-input, .form-textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(219,223,246,0.84);
  background: rgba(255,255,255,0.82);
  color: #66708a;
  outline: 0;
}

.form-textarea { min-height: 140px; resize: vertical; }

.hero-note, .status-text, .admin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: #868b98;
  font-size: 15px;
  line-height: 1.6;
}

.hero-note svg { width: 18px; height: 18px; fill: currentColor; }
.status-text, .admin-status { margin-top: 10px; }
.is-success { color: #4b56e7; }
.is-error { color: #d14374; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 38px; margin-bottom: 68px; }
.feature-grid.single-card { grid-template-columns: minmax(0, 1fr); }
.feature-grid.dual-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card, .summary-card, .dashboard-card, .admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.38));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.feature-card { min-height: 370px; padding: 38px 40px 34px; border-radius: var(--card-radius); }
.feature-copy { flex: 1; min-width: 0; }

.feature-icon {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.feature-icon svg { width: 34px; height: 34px; fill: currentColor; }
.feature-icon.blue { background: rgba(90,98,249,0.12); color: #4a52e0; }
.feature-icon.purple { background: rgba(173,122,255,0.12); color: #7c31ea; }
.feature-icon.pink { background: rgba(255,130,205,0.12); color: #d31277; }

.feature-card h2 { margin: 28px 0 18px; font-size: 27px; font-weight: 600; letter-spacing: -0.03em; }
.feature-card p, .support-content p, .api-box p { margin: 0; color: var(--text-soft); font-size: 18px; line-height: 1.7; }
.support-content { margin-top: 12px; }
.support-content p + p { margin-top: 10px; }

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 17px;
  font-weight: 600;
}

.feature-button-link {
  border: 0;
  background: none;
  cursor: pointer;
}

.feature-link::after { content: "->"; font-size: 18px; }
.blue-link { color: #3448e3; }
.purple-link { color: #7b1feb; }
.pink-link { color: #d31277; }

.mobile-powered-by,
.mobile-bottom-nav,
.mobile-records-section {
  display: none;
}

.mobile-nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.api-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(249,250,255,0.82);
  border: 1px solid rgba(226,230,246,0.84);
}

.api-box code {
  display: block;
  margin-top: 10px;
  color: #d31277;
  font-size: 14px;
  word-break: break-all;
}

.results-head h2 { margin: 10px 0 0; font-size: 34px; letter-spacing: -0.04em; }
.section-kicker, .summary-label {
  display: inline-block;
  color: #8d96b3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; margin-bottom: 24px; }
.summary-card { min-height: 210px; padding: 28px; border-radius: var(--card-radius-md); }
.summary-card h3 { margin: 18px 0 12px; font-size: 36px; letter-spacing: -0.05em; }
.summary-card p { margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.summary-card.highlight { background: linear-gradient(135deg, rgba(90,98,249,0.96), rgba(145,138,255,0.88)); color: white; }
.summary-card.highlight .summary-label, .summary-card.highlight p { color: rgba(255,255,255,0.82); }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin-bottom: 24px; }
.dashboard-card { padding: 28px 28px 26px; border-radius: var(--card-radius-md); }
.dashboard-head h3 { margin: 10px 0 0; font-size: 24px; letter-spacing: -0.03em; }
.metric-list { display: grid; gap: 14px; margin-top: 22px; }
.metric-list.compact { grid-template-columns: repeat(2, minmax(0,1fr)); }
.metric-item {
  min-height: 118px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: rgba(249,250,255,0.78);
  border: 1px solid rgba(226,230,246,0.84);
}

.metric-item > div { color: #9198ab; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.metric-item strong { display: block; margin-top: 12px; font-size: 24px; letter-spacing: -0.04em; word-break: break-word; }
.metric-item span { display: block; margin-top: 10px; color: var(--text-soft); font-size: 15px; line-height: 1.6; }

.table-wrap {
  margin-top: 22px;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(226,230,246,0.92);
  background: rgba(249,250,255,0.72);
}

table { width: 100%; min-width: 760px; border-collapse: collapse; }
thead th {
  padding: 16px 20px;
  text-align: left;
  color: #8993ab;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

tbody td { padding: 16px 20px; border-top: 1px solid rgba(226,230,246,0.92); font-size: 15px; color: #4f5870; }

.admin-body { min-height: 100vh; }
.admin-shell { padding: 64px 0 80px; }
.admin-card { max-width: 860px; margin: 0 auto; padding: 34px; border-radius: var(--card-radius-md); }
.admin-card.wide { max-width: 1080px; }
.admin-head h1, .admin-toolbar h1 { margin: 10px 0 8px; font-size: 34px; letter-spacing: -0.04em; }
.admin-head p { margin: 0; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.admin-form { display: grid; gap: 14px; margin-top: 22px; }
.form-label { font-size: 14px; color: #65708a; }
.primary-admin-button { min-height: 58px; }

.ghost-admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: #55617f;
  border: 1px solid rgba(219,223,246,0.84);
}

.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 24px; }
.config-item { display: grid; gap: 10px; }
.config-item > span { color: #5f6880; font-size: 14px; }
.config-item.full { grid-column: 1 / -1; }
.admin-footer { display: flex; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 18px;
  border: 1px solid rgba(221, 227, 240, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #57627c;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(130, 138, 181, 0.08);
}

.ghost-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.ghost-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.ghost-label {
  line-height: 1;
}

.solid-action {
  background: linear-gradient(135deg, #20b7aa, #17a3a3);
  color: #fff;
  border-color: transparent;
}

.usage-page { display: grid; gap: 28px; }
.usage-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.usage-page-head h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 4.6vw, 46px);
  letter-spacing: -0.05em;
}

.usage-page-head p {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

.usage-page-kicker {
  color: #5a62e4;
  letter-spacing: 0.2em;
}

.usage-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-status-card {
  padding: 34px 34px 32px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 243, 0.96);
  box-shadow: 0 18px 44px rgba(127, 138, 182, 0.08);
}

.plan-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.plan-status-title-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
}

.plan-status-icon {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b3dff;
  background: linear-gradient(135deg, rgba(180, 138, 255, 0.16), rgba(235, 222, 255, 0.78));
}

.plan-status-icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.plan-status-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.plan-status-head p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}

.plan-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}

.plan-status-badge.is-active {
  background: rgba(37, 199, 122, 0.14);
  color: #15945a;
}

.plan-status-badge.is-warning {
  background: rgba(255, 191, 36, 0.16);
  color: #b67805;
}

.plan-status-badge.is-expired {
  background: rgba(243, 88, 88, 0.14);
  color: #c23b3b;
}

.plan-status-badge.is-neutral {
  background: rgba(116, 127, 154, 0.14);
  color: #5d677f;
}

.plan-status-expiry-row {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(230, 236, 246, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.plan-status-expiry-label {
  color: #7b859c;
  font-size: 17px;
  font-weight: 600;
}

.plan-status-expiry-value {
  color: #384255;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  text-align: right;
}

.plan-status-highlight {
  margin-top: 26px;
  min-height: 168px;
  padding: 28px 24px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.plan-status-highlight.is-active {
  background: linear-gradient(135deg, rgba(222, 250, 244, 0.92), rgba(233, 251, 246, 0.96));
}

.plan-status-highlight.is-warning {
  background: linear-gradient(135deg, rgba(255, 245, 214, 0.95), rgba(255, 250, 230, 0.98));
}

.plan-status-highlight.is-expired {
  background: linear-gradient(135deg, rgba(255, 230, 230, 0.95), rgba(255, 242, 242, 0.98));
}

.plan-highlight-icon {
  min-width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.76);
  color: #0f9a74;
  font-size: 42px;
  font-weight: 700;
}

.plan-status-highlight.is-warning .plan-highlight-icon {
  color: #b67805;
}

.plan-status-highlight.is-expired .plan-highlight-icon {
  color: #c23b3b;
}

.plan-highlight-copy h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.05em;
  color: #0f9a74;
}

.plan-status-highlight.is-warning .plan-highlight-copy h3 {
  color: #b67805;
}

.plan-status-highlight.is-expired .plan-highlight-copy h3 {
  color: #c23b3b;
}

.plan-highlight-copy p {
  margin: 8px 0 0;
  color: #4da58d;
  font-size: 18px;
  line-height: 1.7;
}

.plan-status-highlight.is-warning .plan-highlight-copy p {
  color: #b88922;
}

.plan-status-highlight.is-expired .plan-highlight-copy p {
  color: #c06c6c;
}

.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.usage-stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 144px;
  padding: 24px 24px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 243, 0.96);
  box-shadow: 0 18px 40px rgba(127, 138, 182, 0.08);
}

.usage-stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.usage-stat-icon svg { width: 28px; height: 28px; fill: currentColor; }
.usage-stat-icon.blue { color: #4a69f0; background: rgba(76, 104, 241, 0.12); }
.usage-stat-icon.amber { color: #e59b10; background: rgba(241, 176, 47, 0.14); }
.usage-stat-icon.green { color: #1dbb71; background: rgba(58, 203, 122, 0.14); }
.usage-stat-icon.purple { color: #9a49ff; background: rgba(154, 73, 255, 0.12); }

.usage-stat-label {
  display: block;
  color: #8f98ae;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.usage-stat-card h3 {
  margin: 8px 0 6px;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.05em;
}

.usage-stat-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.usage-filter-card,
.usage-table-card {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 243, 0.96);
  box-shadow: 0 18px 44px rgba(127, 138, 182, 0.08);
}

.usage-filter-card { padding: 24px 28px; }

.usage-filter-main {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.usage-filter-field {
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.usage-filter-field.grow { flex: 1; }

.usage-filter-field > span {
  color: #65708a;
  font-size: 14px;
  font-weight: 600;
}

.usage-filter-value {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(223, 229, 242, 0.95);
  background: rgba(249, 250, 255, 0.92);
  color: #374259;
  font-weight: 600;
}

.dashboard-pills {
  justify-content: flex-start;
  gap: 12px;
}

.usage-filter-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.usage-date-inputs {
  justify-content: flex-start;
  margin-top: 18px;
}

.usage-date-inputs input {
  width: 220px;
}

.usage-status-text {
  margin-top: 16px;
  justify-content: flex-start;
}

.usage-table-card {
  padding: 0;
  overflow: hidden;
}

.usage-table-wrap {
  position: relative;
  overflow: auto;
}

.usage-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.usage-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(226, 232, 243, 0.95);
  padding: 20px 22px;
  text-align: left;
  color: #68738d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.usage-table tbody td {
  padding: 22px;
  border-bottom: 1px solid rgba(239, 242, 248, 0.98);
  color: #4f5971;
  font-size: 15px;
  vertical-align: middle;
}

.usage-table tbody tr:hover td {
  background: rgba(248, 250, 255, 0.8);
}

.table-main-text {
  font-weight: 700;
  color: #202734;
}

.table-model-cell {
  min-width: 110px;
}

.table-model-cell strong {
  display: block;
  color: #202734;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.table-code {
  color: #62708a;
  font-size: 14px;
}

.request-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(89, 127, 255, 0.12);
  color: #4472ef;
  font-size: 13px;
  font-weight: 700;
}

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

.token-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.token-in {
  background: rgba(39, 199, 124, 0.12);
  color: #17975a;
}

.token-out {
  background: rgba(149, 105, 255, 0.12);
  color: #7a43ff;
}

.table-cost {
  color: #17a45d;
  font-weight: 700;
  font-size: 18px;
}

.usage-empty {
  padding: 48px 20px 56px;
  text-align: center;
  color: #8e98ad;
  font-size: 16px;
}

.usage-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 24px;
}

.pagination-summary {
  margin: 0;
  color: #6b7590;
  font-size: 14px;
}

.pagination-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-button {
  min-width: 48px;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(221, 227, 240, 0.95);
  background: rgba(255, 255, 255, 0.95);
  color: #59647d;
  font-weight: 700;
  cursor: pointer;
}

.page-button.active {
  background: rgba(77, 104, 242, 0.12);
  color: #4a62eb;
  border-color: rgba(77, 104, 242, 0.2);
}

.page-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.mobile-records-head {
  margin-bottom: 16px;
}

.mobile-records-kicker {
  display: inline-block;
  color: #a0abca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.mobile-records-list {
  display: grid;
  gap: 14px;
}

.mobile-record-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(230, 236, 247, 0.96);
  box-shadow: 0 14px 34px rgba(127, 138, 182, 0.08);
}

.mobile-record-card-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #4d54f3, #9b48ff);
}

.mobile-record-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-record-order {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(77, 84, 243, 0.10);
  color: #5a61eb;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.mobile-record-title-group {
  flex: 1;
  min-width: 0;
}

.mobile-record-title-group h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
  color: #202734;
}

.mobile-record-title-group p {
  margin: 4px 0 0;
  color: #8c97b3;
  font-size: 12px;
  font-weight: 600;
}

.mobile-record-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}

.mobile-record-meta {
  display: grid;
  gap: 6px;
}

.mobile-record-meta span {
  color: #a0abca;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.mobile-record-meta strong {
  color: #36425d;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.mobile-record-empty {
  padding: 28px 18px;
  text-align: center;
  color: #95a0bc;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
}

.mobile-records-footer {
  margin-top: 16px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(26, 30, 52, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: min(80vh, 760px);
  overflow: auto;
  padding: 28px 28px 24px;
  border-radius: var(--card-radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,249,255,0.88));
  border: 1px solid rgba(255,255,255,0.94);
  box-shadow: 0 24px 80px rgba(70, 77, 146, 0.18);
}

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

.modal-head h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.modal-close {
  min-width: 86px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(89, 97, 130, 0.08);
  color: #4c5772;
  cursor: pointer;
}

.modal-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.modal-body p + p { margin-top: 12px; }

[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .header-inner, .page-shell, .footer-inner, .admin-shell { width: min(100vw - 32px, 1180px); }
  .feature-grid, .summary-grid, .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .feature-card:last-child, .summary-card:last-child, .dashboard-card:last-child { grid-column: span 2; }
  .usage-stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    padding-bottom: 108px;
    background:
      radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.96), transparent 22%),
      radial-gradient(circle at 80% 15%, rgba(214, 219, 255, 0.72), transparent 20%),
      linear-gradient(180deg, #f7f8ff 0%, #eef0ff 46%, #ecebff 100%);
  }
  .site-header {
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 0;
    backdrop-filter: blur(18px);
  }
  .header-inner, .page-shell, .footer-inner, .admin-shell {
    width: calc(100vw - 28px);
    max-width: 860px;
  }
  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 72px;
    gap: 10px;
    padding: 0;
  }
  .header-inner > *,
  .page-shell > *,
  .hero-card,
  .hero-card-inner,
  .query-row,
  .feature-grid,
  .feature-card,
  .feature-copy {
    min-width: 0;
    max-width: 100%;
  }
  .main-nav { display: none; }
  .header-tools { justify-content: flex-end; }
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .brand::before {
    content: "";
    width: 18px;
    height: 18px;
    background:
      radial-gradient(circle at 25% 25%, #555bff 0 24%, transparent 26%),
      radial-gradient(circle at 75% 25%, #555bff 0 24%, transparent 26%),
      radial-gradient(circle at 25% 75%, #555bff 0 24%, transparent 26%),
      radial-gradient(circle at 75% 75%, #555bff 0 24%, transparent 26%);
    opacity: 0.95;
  }
  .brand-text {
    max-width: calc(100vw - 138px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 22px;
  }
  .avatar-ring {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #203043, #32465f);
    color: #fff;
    box-shadow: 0 12px 26px rgba(33, 48, 70, 0.18);
  }
  .avatar-ring svg {
    width: 22px;
    height: 22px;
  }
  .page-bg { inset: 72px 0 0; }
  .page-shell { padding: 20px 0 18px; }
  body.usage-mode .site-header { display: none; }
  body.usage-mode .page-bg { inset: 0; }
  body.usage-mode .page-shell { padding-top: 16px; }
  .hero-card {
    width: 100%;
    max-width: none;
    margin: 0 auto 22px;
    border-radius: 42px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 52px rgba(115, 125, 196, 0.12);
    overflow: hidden;
  }
  .hero-card-inner {
    width: 100%;
    padding: 34px 28px 28px;
    text-align: left;
  }
  .hero-card h1 { font-size: 24px; line-height: 1.18; }
  .hero-subtitle {
    max-width: none;
    margin: 12px 0 26px;
    font-size: 16px;
    line-height: 1.55;
    color: #6f7892;
  }
  .query-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 0 0 18px;
  }
  .query-input-shell {
    width: 100%;
    max-width: 100%;
    min-height: 74px;
    padding: 0 14px 0 22px;
    background: rgba(243, 246, 251, 0.98);
    overflow: hidden;
  }
  .query-input-shell input {
    min-width: 0;
    font-size: 18px;
  }
  .inline-toggle { min-width: 64px; height: 48px; }
  .query-button {
    width: 100%;
    max-width: 100%;
    min-height: 72px;
    border-radius: 999px;
    box-shadow: 0 18px 30px rgba(73, 69, 220, 0.30);
  }
  .hero-note, .status-text { display: flex; width: 100%; justify-content: center; text-align: center; }
  .feature-grid,
  .summary-grid,
  .dashboard-grid,
  .config-grid { grid-template-columns: 1fr; }
  .feature-grid.dual-card { grid-template-columns: 1fr; }
  .feature-grid { gap: 16px; margin-bottom: 0; }
  .feature-card {
    width: 100%;
    min-height: auto;
    padding: 20px 22px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .feature-card h2 {
    margin: 0 0 4px;
    font-size: 17px;
  }
  .feature-card p, .support-content p { font-size: 14px; line-height: 1.45; }
  .feature-copy {
    flex: 1;
    min-width: 0;
  }
  .support-content { display: none; }
  .feature-link {
    margin-top: 0;
    margin-left: auto;
    color: #7f8dff;
    font-size: 0;
    width: 18px;
    height: 18px;
  }
  .feature-link::after { content: ">"; font-size: 20px; font-weight: 700; }
  .mobile-powered-by {
    display: block;
    margin: 42px 0 0;
    text-align: center;
    color: #b1b9d2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.42em;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 44px rgba(121, 129, 183, 0.18);
    backdrop-filter: blur(18px);
  }
  .mobile-nav-link {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #8d97b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
  }
  .mobile-nav-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: currentColor;
  }
  .mobile-nav-link.active .mobile-nav-icon {
    background: linear-gradient(135deg, #4a46df, #7667ff);
    color: #fff;
    box-shadow: 0 14px 24px rgba(74, 70, 223, 0.30);
  }
  .mobile-nav-link.active { color: #5d5fe6; }
  .summary-card, .dashboard-card, .admin-card { min-height: auto; padding: 24px 20px; }
  .admin-toolbar, .admin-footer { flex-direction: column; align-items: flex-start; }
  .usage-page { gap: 18px; }
  .usage-page-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    padding: 2px 0 0;
  }
  .usage-page-head > div:first-child {
    grid-column: 2;
    text-align: center;
  }
  .usage-page-kicker,
  .usage-page-head p { display: none; }
  .usage-page-head h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
  }
  .usage-head-actions {
    grid-column: 1 / 4;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .ghost-action {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
  }
  .icon-action {
    min-width: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .icon-action .ghost-icon {
    width: 24px;
    height: 24px;
  }
  .icon-action .ghost-label {
    display: none;
  }
  .plan-status-card {
    padding: 20px 18px 18px;
    border-radius: 28px;
  }
  .plan-status-head,
  .plan-status-expiry-row,
  .usage-table-footer,
  .usage-filter-main {
    flex-direction: row;
    align-items: center;
  }
  .plan-status-title-wrap { align-items: center; gap: 14px; }
  .plan-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }
  .plan-status-icon svg { width: 22px; height: 22px; }
  .plan-status-head h2 { font-size: 16px; }
  .plan-status-head p {
    margin-top: 4px;
    font-size: 11px;
    color: #6a64dc;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .plan-status-badge {
    min-width: 56px;
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    align-self: flex-start;
  }
  .plan-status-expiry-row {
    margin-top: 16px;
    padding-top: 16px;
    align-items: flex-start;
  }
  .plan-status-expiry-label { font-size: 12px; }
  .plan-status-expiry-value { font-size: 17px; text-align: right; }
  .plan-status-highlight {
    margin-top: 14px;
    min-height: 96px;
    padding: 16px 18px;
    justify-content: space-between;
    flex-direction: row;
    text-align: left;
  }
  .plan-highlight-icon {
    min-width: 42px;
    height: 42px;
    font-size: 26px;
    background: transparent;
  }
  .plan-highlight-copy h3 { font-size: 16px; }
  .plan-highlight-copy p { font-size: 12px; margin-top: 4px; }
  .usage-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .usage-stat-card {
    min-height: 124px;
    padding: 18px 16px;
    border-radius: 22px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .usage-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .usage-stat-icon svg { width: 16px; height: 16px; }
  .usage-stat-label { font-size: 11px; letter-spacing: 0.08em; }
  .usage-stat-card h3 {
    margin: 6px 0 4px;
    font-size: 18px;
  }
  .usage-stat-card p { font-size: 11px; }
  .usage-filter-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .usage-filter-main {
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .usage-filter-field {
    min-width: auto;
    gap: 0;
  }
  .usage-filter-field > span { display: none; }
  .usage-filter-value,
  .range-pill {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.98);
  }
  .mobile-current-key-pill .usage-filter-value::after {
    content: "▼";
    margin-left: 8px;
    font-size: 10px;
    color: #7c859f;
  }
  .dashboard-pills {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .usage-filter-actions,
  .usage-date-inputs,
  .usage-table-card {
    display: none;
  }
  .usage-status-text {
    margin-top: 12px;
    justify-content: flex-start;
    font-size: 12px;
  }
  .mobile-records-section {
    display: block;
  }
  .mobile-records-head {
    margin-bottom: 14px;
    padding-left: 4px;
  }
  .mobile-records-footer .pagination-summary {
    margin-bottom: 12px;
    font-size: 12px;
  }
  .mobile-records-footer .pagination-shell {
    justify-content: center;
  }
  .mobile-record-card {
    padding: 18px 18px 16px 20px;
    border-radius: 24px;
  }
  .mobile-record-card-bar {
    width: 3px;
  }
  .mobile-record-head {
    margin-bottom: 14px;
  }
  .mobile-record-order {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .mobile-record-title-group {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .mobile-record-title-group h3 {
    font-size: 18px;
  }
  .mobile-record-title-group p {
    margin: 2px 0 0 auto;
    color: #b1b7d8;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
  }
  .mobile-record-grid {
    gap: 12px 10px;
  }
  .mobile-record-meta span {
    font-size: 9px;
    color: #a7afd1;
  }
  .mobile-record-meta strong {
    font-size: 13px;
  }
  .page-button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 14px;
  }
  .modal-card { width: min(100vw - 20px, 760px); padding: 22px 18px 20px; }
  .modal-head {
    align-items: center;
    flex-direction: row;
  }
}

@media (max-width: 420px) {
  .header-inner, .page-shell, .footer-inner, .admin-shell {
    width: calc(100vw - 20px);
  }
  .brand-text {
    max-width: calc(100vw - 120px);
    font-size: 18px;
  }
  .hero-card {
    border-radius: 34px;
  }
  .hero-card-inner {
    padding: 28px 18px 24px;
  }
  .hero-card h1 {
    font-size: 21px;
  }
  .hero-subtitle {
    margin: 10px 0 22px;
    font-size: 14px;
  }
  .query-input-shell {
    min-height: 66px;
    padding: 0 10px 0 16px;
  }
  .query-input-shell input {
    margin-left: 10px;
    font-size: 15px;
  }
  .inline-toggle {
    min-width: 52px;
    height: 42px;
    font-size: 13px;
  }
  .query-button {
    min-height: 64px;
    font-size: 16px;
  }
  .hero-note, .status-text {
    font-size: 13px;
  }
  .feature-card {
    padding: 18px 16px;
    gap: 12px;
  }
  .feature-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
  }
  .feature-icon svg {
    width: 24px;
    height: 24px;
  }
  .feature-card h2 {
    font-size: 15px;
  }
  .feature-card p {
    font-size: 13px;
  }
  .mobile-nav-link {
    font-size: 10px;
    letter-spacing: 0;
  }
  .mobile-bottom-nav {
    gap: 4px;
    padding: 10px 8px 12px;
  }
}
