:root {
  --bg: #f5f1e8;
  --surface: rgba(255, 250, 243, 0.88);
  --surface-strong: #fff8ee;
  --text: #1e1a16;
  --muted: #6f6356;
  --line: rgba(52, 39, 24, 0.14);
  --accent: #b4542f;
  --accent-strong: #8f3d1f;
  --shadow: 0 24px 70px rgba(83, 54, 27, 0.12);
  --success: #1f7a4f;
  --danger: #9f2d2d;
  --font-main: "Avenir Next", "Segoe UI", sans-serif;
  --font-head: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(180, 84, 47, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(120, 91, 44, 0.14), transparent 28%),
    linear-gradient(180deg, #fcf7ef 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-main);
}

a {
  color: var(--accent-strong);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.page-shell--monitoring {
  display: block;
  padding: 22px 18px 40px;
}

.auth-card,
.dashboard-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(100%, 440px);
  border-radius: 28px;
  padding: 32px;
}

.auth-head h1,
.dashboard-head h1,
.dashboard-card h2,
.empty-state h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
}

.auth-head p,
.dashboard-head p,
.muted,
.auth-foot {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-strong);
}

.auth-form,
.dashboard-shell {
  display: grid;
  gap: 18px;
}

.account-form {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 28px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.account-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
}

.account-form input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff7f1;
}

.btn-secondary {
  background: rgba(52, 39, 24, 0.08);
  color: var(--text);
}

.btn-small {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
}

.alert-error {
  background: rgba(159, 45, 45, 0.09);
  color: var(--danger);
}

.alert-success {
  background: rgba(31, 122, 79, 0.1);
  color: var(--success);
}

.token-alert {
  display: grid;
  gap: 8px;
}

.token-alert code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 12px;
  background: rgba(31, 122, 79, 0.08);
  padding: 10px 12px;
  color: var(--text);
}

.dashboard-shell {
  width: min(100%, 1100px);
}

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

.dashboard-card {
  border-radius: 30px;
  padding: 28px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(180, 84, 47, 0.12);
  color: var(--accent-strong);
  font-weight: 700;
}

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

.accounts-table {
  width: 100%;
  border-collapse: collapse;
}

.accounts-table th,
.accounts-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  white-space: nowrap;
}

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

.empty-state {
  padding: 30px 10px 12px;
}

@media (max-width: 720px) {
  .auth-card,
  .dashboard-card {
    border-radius: 22px;
    padding: 22px;
  }

  .dashboard-head {
    flex-direction: column;
    align-items: stretch;
  }

  .account-form {
    grid-template-columns: 1fr;
  }
}
