:root {
  color-scheme: light;
  --bg: #f2f6ff;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #cbd9f1;
  --text: #162640;
  --muted: #5f7394;
  --brand: #1f6fd6;
  --brand-dark: #1459b2;
  --accent: #10797e;
  --danger: #c24949;
  --success: #207c47;
  --shadow: 0 18px 40px rgba(17, 50, 94, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 111, 214, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(16, 121, 126, 0.12), transparent 24%),
    linear-gradient(160deg, #f6f9ff 0%, #edf3ff 100%);
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 40px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid rgba(89, 110, 151, 0.14);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
}

.hero-copy,
.section-kicker,
.message-bar,
label span,
.status-pill,
table td small {
  color: var(--muted);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 22px;
}

.auth-card,
.panel {
  padding: 22px;
  margin-top: 18px;
}

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

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

.split {
  flex-wrap: wrap;
}

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

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

.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
}

input,
textarea {
  padding: 13px 14px;
  background: rgba(246, 250, 255, 0.96);
  color: var(--text);
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
  padding: 13px 16px;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(180deg, #3f82ea, var(--brand));
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.primary-button:hover {
  background: linear-gradient(180deg, #3379e3, var(--brand-dark));
}

.ghost-button {
  background: rgba(247, 251, 255, 0.96);
  color: var(--text);
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(234, 242, 255, 0.98));
  border: 1px solid var(--line);
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 252, 255, 0.94);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid rgba(203, 217, 241, 0.8);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #edf4ff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.active {
  color: var(--success);
  background: rgba(32, 124, 71, 0.12);
}

.status-pill.expired {
  color: var(--danger);
  background: rgba(194, 73, 73, 0.12);
}

.inline-actions {
  display: grid;
  gap: 8px;
}

.inline-actions input {
  min-width: 0;
}

.message-bar {
  margin-top: 16px;
  min-height: 20px;
  font-size: 13px;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
