:root {
  color-scheme: light;
  --ink: #142239;
  --muted: #6f7d91;
  --line: rgba(71, 91, 117, .14);
  --panel: rgba(255, 255, 255, .72);
  --shadow: 0 24px 70px rgba(41, 67, 99, .11);
  --blue: #3a7bdc;
  --green: #2e9b78;
  font-family: Inter, Pretendard, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #edf5f9; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 11% 12%, rgba(255,255,255,.96), transparent 28%),
    radial-gradient(circle at 91% 7%, rgba(189,224,238,.58), transparent 30%),
    linear-gradient(145deg, #edf4f7 0%, #e8f3f7 48%, #f6f8f8 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(58, 123, 220, .24);
  outline-offset: 2px;
}

.ambient { position: fixed; z-index: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; pointer-events: none; }
.ambient-one { width: 520px; height: 520px; right: -240px; top: -280px; box-shadow: 0 0 80px rgba(133,192,218,.13) inset; }
.ambient-two { width: 360px; height: 360px; left: -240px; bottom: -190px; }

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto;
  padding: 0 42px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 26px;
  background: rgba(250, 253, 254, .61);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px);
}

.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 29px; height: 29px; place-items: center; }
.brand-mark svg { width: 100%; stroke: #294962; stroke-width: 1.35; }
.brand-divider { width: 1px; height: 15px; margin-left: 2px; background: #c8d3dc; }
.brand-company { color: #8491a2; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-state { display: flex; align-items: center; gap: 7px; margin-right: 4px; color: #627084; font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #9da9b7; box-shadow: 0 0 0 4px rgba(157,169,183,.1); }
.sync-state.is-online .status-dot { background: #36a981; box-shadow: 0 0 0 4px rgba(54,169,129,.12); }
.sync-state.is-error .status-dot { background: #e38b5b; box-shadow: 0 0 0 4px rgba(227,139,91,.12); }
.icon-button, .refresh-button { height: 38px; border: 1px solid rgba(54,76,101,.18); color: #2b3b4f; background: rgba(255,255,255,.54); box-shadow: 0 3px 12px rgba(56,80,109,.05); }
.icon-button { display: grid; width: 38px; padding: 0; place-items: center; border-radius: 10px; }
.icon-button svg { width: 17px; stroke: currentColor; stroke-width: 1.45; }
.refresh-button { display: flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.refresh-button svg { width: 15px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.is-loading svg { animation: spin .8s linear infinite; }

.settings-panel { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: end; margin: 22px 0 0; padding: 23px 25px; border: 1px solid rgba(64,88,116,.13); border-radius: 16px; background: rgba(255,255,255,.54); }
.settings-panel[hidden] { display: none; }
.settings-panel h2 { margin: 4px 0 5px; font-size: 17px; }
.settings-panel p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.settings-panel code { color: #3d5d7a; }
.settings-form label { display: block; margin-bottom: 7px; color: #536176; font-size: 11px; font-weight: 700; }
.input-row { display: flex; gap: 8px; }
.input-row input { min-width: 0; flex: 1; height: 40px; padding: 0 12px; border: 1px solid rgba(56,81,110,.18); border-radius: 9px; color: var(--ink); background: rgba(255,255,255,.68); font-size: 12px; }
.input-row button { padding: 0 14px; border: 0; border-radius: 9px; color: white; background: #284e73; font-size: 12px; font-weight: 700; }
.settings-form .field-hint { margin-top: 6px; font-size: 10px; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; padding: 55px 4px 35px; }
.eyebrow { margin: 0 0 9px; color: #6585a4; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { margin: 0; font-size: clamp(30px, 4vw, 45px); line-height: 1.08; letter-spacing: -.048em; font-weight: 760; }
.hero-copy { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.hero-meta { display: flex; align-items: stretch; gap: 20px; margin-bottom: 2px; padding: 13px 16px; border: 1px solid rgba(70,94,122,.1); border-radius: 13px; background: rgba(255,255,255,.42); }
.meta-item { display: flex; min-width: 126px; flex-direction: column; gap: 5px; }
.meta-label { color: #8793a3; font-size: 10px; font-weight: 650; }
.meta-item strong { font-size: 12px; font-weight: 720; }
.meta-separator { width: 1px; background: var(--line); }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; padding: 0 18px 0 0; border: 0; outline: 0; appearance: none; color: var(--ink); background: transparent; font-size: 12px; font-weight: 720; }
.select-wrap svg { position: absolute; right: 0; top: 2px; width: 13px; pointer-events: none; stroke: #738195; stroke-width: 1.4; }

.summary { display: flex; align-items: center; min-height: 78px; padding: 14px 18px; border: 1px solid rgba(61,86,113,.12); border-radius: 17px; background: rgba(255,255,255,.53); box-shadow: 0 10px 30px rgba(62,86,111,.04); }
.summary-item { display: flex; align-items: center; gap: 10px; min-width: 142px; }
.summary-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; }
.summary-icon svg { width: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.summary-icon.good { color: #238b69; background: #e6f4ef; }
.summary-icon.watch { color: #bd7a2d; background: #fbf0dc; }
.summary-item div { display: flex; flex-direction: column; gap: 1px; }
.summary-item span:not(.summary-icon) { color: #8290a1; font-size: 10px; }
.summary-item strong { font-size: 19px; }
.summary-message { margin-left: auto; padding-left: 24px; color: #758397; font-size: 11px; text-align: right; }

.quota-section { padding: 34px 0 48px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 15px; }
.section-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.section-heading span { color: #8390a1; font-size: 10px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quota-card { --accent: #3b7ddd; display: flex; min-height: 385px; flex-direction: column; padding: 21px; border: 1px solid rgba(56,78,104,.13); border-radius: 18px; background: rgba(255,255,255,.69); box-shadow: 0 12px 32px rgba(50,77,106,.065); transition: transform .2s ease, box-shadow .2s ease; }
.quota-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(50,77,106,.09); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.provider-identity { display: flex; min-width: 0; align-items: center; gap: 11px; }
.provider-logo { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, white); font-size: 15px; font-weight: 800; letter-spacing: -.05em; }
.provider-identity h3 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.plan-name { overflow: hidden; max-width: 130px; margin: 4px 0 0; color: #8a96a6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.availability { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 999px; color: #328166; background: #eaf6f1; font-size: 9px; font-weight: 700; }
.availability span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.availability.warning { color: #b06f2a; background: #fbf1e2; }
.availability.exhausted { color: #b14f55; background: #f9e8e9; }
.quota-list { display: flex; flex-direction: column; gap: 21px; padding: 23px 1px; }
.quota-label, .quota-foot { display: flex; align-items: center; justify-content: space-between; }
.quota-label span { color: #526176; font-size: 11px; font-weight: 650; }
.quota-label strong { font-size: 18px; letter-spacing: -.03em; }
.progress-track { height: 7px; margin: 9px 0 7px; overflow: hidden; border-radius: 999px; background: #e9eef2; }
.progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.quota-foot { color: #8b96a5; font-size: 9px; }
.remaining-copy { color: #68778a; font-weight: 650; }
.reset-block { margin-top: auto; padding: 16px 15px 14px; border: 1px solid rgba(66,91,119,.09); border-radius: 13px; background: rgba(239,245,248,.68); }
.reset-heading { display: flex; justify-content: space-between; color: #748296; font-size: 9px; }
.reset-date { color: #8e99a7; }
.countdown { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: start; margin-top: 11px; }
.countdown div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.countdown strong { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.countdown span { color: #909aa7; font-size: 8px; }
.countdown i { margin-top: 1px; color: #9ba6b3; font-style: normal; font-weight: 700; }

.empty-state { grid-column: 1 / -1; padding: 60px 24px; border: 1px dashed rgba(57,82,111,.2); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.4); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 15px; }

footer { display: flex; align-items: center; min-height: 65px; border-top: 1px solid var(--line); color: #8b97a6; font-size: 10px; }
footer > span:first-child { color: #526175; font-weight: 750; }
.footer-dot { margin: 0 7px; }
.footer-source { margin-left: auto; }

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

@media (max-width: 900px) {
  .shell { padding: 0 26px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 25px; }
  .hero-meta { width: 100%; }
  .meta-item { flex: 1; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-panel { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 20px); margin: 10px auto; padding: 0 17px; border-radius: 20px; }
  .topbar { min-height: 67px; }
  .brand-company, .brand-divider, .sync-state, .refresh-button span { display: none; }
  .refresh-button { width: 38px; padding: 0; justify-content: center; }
  .hero { padding-top: 38px; }
  .hero-copy { font-size: 13px; }
  .summary { flex-wrap: wrap; gap: 15px; }
  .summary-item { flex: 1; min-width: 120px; }
  .summary-message { width: 100%; margin-left: 0; padding: 10px 0 0; border-top: 1px solid var(--line); text-align: left; }
  .card-grid { grid-template-columns: 1fr; }
  .quota-card { min-height: 370px; }
  .input-row { flex-direction: column; }
  .input-row button { height: 40px; }
  footer { flex-wrap: wrap; }
  .footer-source { width: 100%; margin: -12px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
