:root {
  --bg: #f4efe6;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffdf8;
  --panel-soft: rgba(255, 255, 255, 0.56);
  --ink: #1f2a24;
  --muted: #5f675f;
  --line: rgba(31, 42, 36, 0.12);
  --line-strong: rgba(31, 42, 36, 0.18);
  --accent: #0d6b57;
  --accent-strong: #084c3d;
  --danger: #9a2f2f;
  --shadow: 0 20px 60px rgba(38, 43, 39, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 107, 87, 0.2), transparent 32%),
    radial-gradient(circle at bottom right, rgba(196, 136, 60, 0.24), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, #f1ebdf 100%);
}

button,
input {
  font: inherit;
}

.auth-page,
.dashboard-page {
  padding: 32px;
}

.auth-shell,
.dashboard-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.auth-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}

.auth-panel,
.card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-panel {
  width: min(720px, 100%);
  padding: 40px;
}

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

h1,
h2 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 0.95;
  max-width: 12ch;
}

h2 {
  font-size: 1.45rem;
}

.lead,
.section-heading p,
.status-text {
  color: var(--muted);
}

.lead {
  max-width: 62ch;
  margin: 16px 0 0;
}

.card {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.form-stack {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 15px 16px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.field input:focus {
  outline: 2px solid rgba(13, 107, 87, 0.22);
  border-color: var(--accent);
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-row-spread {
  align-items: center;
  justify-content: space-between;
}

.mini-note {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

button,
.button-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--accent);
  color: #ffffff;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease,
    color 120ms ease;
  text-decoration: none;
  font-weight: 600;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button.secondary,
.button-link.secondary {
  background: rgba(31, 42, 36, 0.08);
  color: var(--ink);
  border: 1px solid rgba(31, 42, 36, 0.1);
}

button.ghost-danger {
  background: rgba(154, 47, 47, 0.08);
  color: var(--danger);
}

button.ghost-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.page-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 8px 4px 0;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.narrow-shell {
  max-width: 820px;
}

.side-stack {
  display: grid;
  gap: 24px;
}

.panel-stack {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(31, 42, 36, 0.08);
}

.section-heading p {
  margin: 0;
}

.accounts-stack {
  display: grid;
  gap: 18px;
}

.account-card {
  padding: 22px;
  border: 1px solid rgba(13, 107, 87, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 244, 237, 0.78)),
    var(--panel-soft);
}

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

.account-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: "IBM Plex Serif", Georgia, serif;
}

.status-text {
  min-height: 20px;
  margin: 0;
  font-size: 0.94rem;
}

.result-box {
  min-height: 280px;
  max-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 20px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 30, 26, 0.96), rgba(11, 20, 17, 0.98));
  color: #d6ece0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.request-preview {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(13, 107, 87, 0.12);
  background: rgba(247, 252, 249, 0.85);
}

.request-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.request-link {
  color: var(--accent-strong);
  text-decoration: none;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.request-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.settings-card::before,
.tester-card::before,
.user-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, rgba(13, 107, 87, 0.85), rgba(196, 136, 60, 0.45));
}

@media (max-width: 900px) {
  .grid-layout,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions > * {
    flex: 1 1 auto;
  }

  .auth-page,
  .dashboard-page {
    padding: 18px;
  }

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