@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f1eb;
  --bg-soft: #ede8df;
  --surface: #fffdf9;
  --surface-2: #f7f2ea;
  --text: #1f1a17;
  --muted: #6c6258;
  --line: #d6c8b4;
  --gold: #9d7a42;
  --gold-strong: #7d5d2c;
  --ok: #0f5132;
  --radius: 14px;
  --shadow: 0 12px 35px rgba(47, 33, 15, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
  position: relative;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 15%, rgba(157, 122, 66, 0.2), transparent 28%),
    radial-gradient(circle at 84% 7%, rgba(255, 255, 255, 0.58), transparent 24%),
    radial-gradient(circle at 80% 88%, rgba(157, 122, 66, 0.14), transparent 22%);
  z-index: 0;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.main-shell,
.topbar,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  padding: 0.9rem 0;
}

.topbar-inner {
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--gold), var(--gold-strong));
  font-weight: 700;
}

.nav-links {
  display: flex;
  overflow-x: auto;
  gap: 0.55rem;
  padding-bottom: 0.2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.86rem;
}

.nav-links a:hover {
  border-color: var(--gold);
  color: var(--gold-strong);
}

.nav-links .nav-cta {
  background: linear-gradient(145deg, var(--gold), var(--gold-strong));
  color: #fff;
  border-color: transparent;
}

.logout-form {
  margin: 0;
}

.logout-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  font-size: 0.86rem;
  cursor: pointer;
}

.main-shell {
  padding: 0.6rem 0 1.2rem;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.eyebrow {
  margin: 0;
  color: var(--gold-strong);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.hero h2,
.panel h2 {
  margin: 0.35rem 0 0.45rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 66ch;
}

.stat-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.stat-card {
  background: linear-gradient(165deg, #fff, var(--surface-2));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.8rem;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-card strong {
  display: block;
  margin: 0.15rem 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.stat-card small {
  color: var(--ok);
  font-weight: 600;
}

.panel-head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.btn {
  text-decoration: none;
  color: #fff;
  background: linear-gradient(145deg, var(--gold), var(--gold-strong));
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  font-size: 0.82rem;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.data-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  background: #fbf8f2;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.footer {
  padding: 0.4rem 0 1rem;
}

.footer-inner {
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.auth-panel {
  max-width: 540px;
  margin-inline: auto;
}

.alert {
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.9rem;
}

.alert p {
  margin: 0.25rem 0;
  font-size: 0.88rem;
}

.alert-error {
  border: 1px solid #e0b9b9;
  background: #fdf0f0;
  color: #812b2b;
}

.alert-ok {
  border: 1px solid #b7d9c7;
  background: #effaf3;
  color: #1e6141;
}

.auth-form {
  display: grid;
  gap: 0.58rem;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.68rem 0.74rem;
  background: #fff;
  font-size: 0.95rem;
}

.auth-form .btn {
  margin-top: 0.5rem;
}

.auth-help {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-help a {
  color: var(--gold-strong);
}

.landing-actions {
  justify-content: flex-start;
  margin-top: 1rem;
}

.btn-light {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

@media (min-width: 760px) {
  .topbar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
  }

  .brand strong {
    font-size: 1.55rem;
  }

  .nav-links {
    overflow: visible;
    padding-bottom: 0;
  }

  .main-shell {
    padding-top: 0.8rem;
  }

  .hero,
  .panel {
    padding: 1.3rem;
  }

  .hero h2,
  .panel h2 {
    font-size: 2.5rem;
  }

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