:root {
  --bg: #efe9dc;
  --panel: #fffaf2;
  --panel-strong: #fff;
  --text: #1f2a1f;
  --muted: #5c665d;
  --accent: #0c6b58;
  --accent-soft: #d6eee7;
  --danger: #b34040;
  --border: #d7cfbf;
  --shadow: 0 20px 45px rgba(48, 44, 31, 0.12);
  --radius: 22px;
  --font-sans: "Segoe UI", "Aptos", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(12, 107, 88, 0.16), transparent 32%),
    linear-gradient(135deg, #efe9dc 0%, #f5f0e6 40%, #e7efe8 100%);
  color: var(--text);
  font-family: var(--font-sans);
}

.shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  min-height: 100vh;
}

.hero {
  padding: 3rem;
  background: rgba(15, 38, 31, 0.94);
  color: #f7f3eb;
}

.hero h1 {
  margin: 0.4rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.96;
}

.eyebrow {
  margin: 0;
  color: #8fd1c0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.hero-copy {
  max-width: 24rem;
  color: rgba(247, 243, 235, 0.82);
  line-height: 1.7;
}

.hero-card {
  margin-top: 2rem;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.4rem;
}

.hero-card code {
  font-size: 0.92rem;
  color: #d6eee7;
}

.main {
  padding: 2rem;
}

.panel {
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(215, 207, 191, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-panel {
  max-width: 740px;
  margin: 4rem auto;
  padding: 2rem;
}

.auth-switch {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.auth-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.panel-header h2,
.topbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
}

.panel-header p,
.muted {
  color: var(--muted);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
}

textarea {
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.privacy-card {
  border-color: rgba(12, 107, 88, 0.28);
  background:
    linear-gradient(135deg, rgba(214, 238, 231, 0.72), rgba(255, 250, 242, 0.94));
}

.support-access-form {
  margin-top: 1rem;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.2);
  opacity: 0.72;
}

.secondary-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.status-text {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 1.75rem 0.75rem;
}

.tabbar {
  display: flex;
  gap: 0.7rem;
  padding: 0 1.75rem 1rem;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.tab-panel {
  padding: 0 1.75rem 1.75rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.stat-card,
.content-card {
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  margin-top: 0.25rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.split-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

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

th,
td {
  padding: 0.9rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ece5d7;
  font-size: 0.94rem;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eef2ec;
  color: #355043;
  font-size: 0.84rem;
}

.chip.danger {
  background: #f9e1e1;
  color: var(--danger);
}

.chip.warn {
  background: #f8edd1;
  color: #8b5d00;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.compact-actions {
  align-items: end;
}

.inline-actions button {
  padding: 0.6rem 0.85rem;
}

.error-text {
  color: var(--danger);
  min-height: 1.3rem;
}

.success-text {
  color: var(--accent);
  font-weight: 700;
}

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

  .hero {
    padding: 2rem 1.5rem;
  }

  .main {
    padding: 1rem;
  }

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