:root {
  color-scheme: light;
  --bg: #f4f2ee;
  --ink: #151515;
  --muted: #6d6a63;
  --line: #e1ddd4;
  --panel: #fffdfa;
  --accent: #ffcc00;
  --accent-dark: #d29b00;
  --danger: #b42318;
  --success: #12715b;
  --shadow: 0 24px 70px rgba(30, 25, 15, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 10% 0%, rgba(255, 204, 0, 0.18), transparent 32%), var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 250, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.status-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.status-card span,
.status-card small {
  color: var(--muted);
}

.status-card strong {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.panel {
  margin-bottom: 20px;
  padding: 24px;
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.toolbar {
  justify-content: flex-end;
}

h2,
h3 {
  margin: 4px 0 8px;
  letter-spacing: -0.04em;
}

p {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: #f1b800;
  background: linear-gradient(135deg, #ffe675, var(--accent));
}

.button.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f6efd8;
  color: #7a5700;
  font-weight: 800;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 0;
}

.meta-grid div {
  padding: 14px;
  border-radius: 18px;
  background: #f8f5ef;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

td a {
  color: #8b6500;
  font-weight: 800;
}

.active-row td {
  background: #fff8dd;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.alert {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  font-weight: 800;
}

.alert.error {
  background: #fff0ed;
  color: var(--danger);
}

.alert.success {
  background: #eaf8f3;
  color: var(--success);
}

.empty {
  margin: 0;
  color: var(--muted);
}

.compact {
  box-shadow: none;
}

.simple-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8f5ef;
}

.simple-list span {
  font-weight: 800;
}

.simple-list small {
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .login-panel,
  .grid-2,
  .grid-3,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: stretch;
  }

  .toolbar .button,
  .toolbar form,
  .toolbar button,
  .login-panel .button {
    width: 100%;
  }
}
