:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #6a7280;
  --line: #dbe4ee;
  --paper: #fffdf8;
  --panel: #ffffff;
  --accent: #1f8a70;
  --accent-2: #f7b267;
  --accent-3: #e85d75;
  --soft: #eef8f5;
  --shadow: 0 18px 60px rgba(35, 44, 58, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 209, 102, 0.2), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(31, 138, 112, 0.14), transparent 28%),
    linear-gradient(135deg, #fff9ef 0%, #eef8f5 52%, #f8fbff 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.login-card {
  width: min(420px, 100%);
  margin: 9vh auto 0;
  padding: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #2d6cdf);
  border-radius: 8px;
}

.login-card h1,
.topbar h1,
.hero-strip h2,
.section-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-card h1 {
  margin-top: 18px;
  font-size: 32px;
}

.login-card p {
  margin: 10px 0 22px;
  color: var(--muted);
}

.login-form,
.create-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14);
}

.login-form button,
.create-form button {
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
  font-weight: 750;
  background: var(--accent);
  border-radius: 8px;
}

.error-text {
  min-height: 20px;
  color: var(--accent-3) !important;
  font-weight: 650;
}

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

.topbar,
.hero-strip,
.panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 28px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  color: #25534a;
  font-weight: 700;
  background: #ecf7f3;
  border: 1px solid #cde8de;
  border-radius: 8px;
}

.hero-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 26px;
  overflow: hidden;
}

.spark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 10px;
  color: #ffffff;
  background: var(--accent-2);
  border-radius: 8px;
}

.hero-strip h2 {
  max-width: 620px;
  font-size: 26px;
  line-height: 1.25;
}

.hero-strip p,
.section-title p,
.hint {
  color: var(--muted);
}

.hero-stat {
  display: grid;
  gap: 4px;
  min-width: 164px;
  padding: 18px;
  text-align: right;
  background: var(--soft);
  border: 1px solid #d6ede6;
  border-radius: 8px;
}

.hero-stat span {
  font-size: 24px;
  font-weight: 850;
}

.hero-stat small {
  color: var(--muted);
}

.panel {
  padding: 20px;
}

.create-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.client-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid #f2dfbd;
  border-radius: 8px;
}

.client-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.client-head h3 {
  margin: 0;
  font-size: 20px;
}

.client-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  height: 28px;
  padding: 5px 9px;
  color: #14513f;
  font-size: 12px;
  font-weight: 800;
  background: #dff4eb;
  border-radius: 999px;
  white-space: nowrap;
}

.meter {
  height: 10px;
  overflow: hidden;
  background: #f2eadb;
  border-radius: 999px;
}

.meter-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

.usage-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.usage-row span {
  display: grid;
  gap: 2px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
}

.usage-row strong {
  font-size: 16px;
}

.usage-row small {
  color: var(--muted);
}

.sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.sub-row code {
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  color: #445064;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #ffffff;
  border: 1px solid #ead9b9;
  border-radius: 8px;
}

.sub-row button {
  padding: 0 14px;
  color: #ffffff;
  font-weight: 800;
  background: #2d6cdf;
  border-radius: 8px;
}

.empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 36px 16px;
  color: var(--muted);
  background: #f8fbff;
  border: 1px dashed #cdd8e6;
  border-radius: 8px;
}

.empty-state strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1120px);
    padding: 18px 0;
  }

  .topbar,
  .hero-strip,
  .create-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    gap: 14px;
  }

  .topbar-actions {
    width: 100%;
  }

  .ghost-button {
    flex: 1;
  }

  .hero-stat {
    text-align: left;
  }
}
