:root {
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffaf2;
  --line: rgba(110, 83, 45, 0.14);
  --text: #38281a;
  --text-soft: #6f5a43;
  --accent: #8a5f2d;
  --accent-strong: #6c471f;
  --accent-soft: rgba(138, 95, 45, 0.12);
  --danger: #9d4436;
  --shadow: 0 24px 60px rgba(67, 40, 16, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --gold: #c8a56e;
  --forest: #446649;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  background:
    radial-gradient(circle at top, rgba(196, 161, 111, 0.24), transparent 28%),
    radial-gradient(circle at bottom right, rgba(68, 102, 73, 0.12), transparent 30%),
    linear-gradient(180deg, #fbf5ec 0%, #efe3ce 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(138, 95, 45, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 95, 45, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

.hidden {
  display: none !important;
}

.background-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.35;
  pointer-events: none;
}

.background-glow-left {
  top: -140px;
  left: -100px;
  background: rgba(196, 161, 111, 0.5);
}

.background-glow-right {
  right: -120px;
  bottom: -120px;
  background: rgba(125, 81, 48, 0.22);
}

.app-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow:
    0 14px 40px rgba(67, 40, 16, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 22px;
  max-width: 1160px;
  margin: 0 auto;
  overflow: hidden;
}

.auth-shell::after {
  content: "";
  position: absolute;
  inset: 20px auto auto 48%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 123, 78, 0.18), transparent 68%);
  pointer-events: none;
  transform: translateX(-50%);
}

.auth-brand-panel {
  position: relative;
  min-width: 0;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 251, 244, 0.98), rgba(242, 229, 208, 0.92)),
    var(--panel-strong);
  border: 1px solid rgba(138, 95, 45, 0.14);
  box-shadow: 0 22px 45px rgba(67, 40, 16, 0.1);
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(198, 166, 110, 0.18), transparent 36%),
    linear-gradient(135deg, transparent 0%, rgba(68, 102, 73, 0.06) 100%);
  pointer-events: none;
}

.auth-badge-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fffaf2;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #6c471f, #8a5f2d);
  box-shadow: 0 10px 18px rgba(108, 71, 31, 0.16);
}

.auth-badge-soft {
  color: var(--accent-strong);
  background: rgba(255, 248, 235, 0.92);
  border: 1px solid rgba(138, 95, 45, 0.14);
  box-shadow: none;
}

.auth-header {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}

.brand-logo {
  display: block;
  width: min(100%, 480px);
  height: auto;
  margin: 0;
}

.hero-logo {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin-bottom: 14px;
}

.auth-description {
  max-width: 48ch;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.auth-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-content: center;
  min-width: 0;
}

.auth-card {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(138, 95, 45, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 242, 231, 0.92)),
    var(--panel);
  box-shadow: 0 22px 40px rgba(57, 35, 18, 0.11);
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #5b7b4e, #c8a56e, #8a5f2d);
}

.auth-form-lead {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 0.97rem;
  line-height: 1.6;
}

.auth-highlight-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid rgba(138, 95, 45, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(69, 102, 73, 0.96), rgba(43, 66, 50, 0.94)),
    #35523e;
  color: #f9f3e9;
  box-shadow: 0 18px 36px rgba(43, 66, 50, 0.24);
}

.auth-highlight-copy h2 {
  max-width: 14ch;
  margin-top: 6px;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  line-height: 1;
}

.auth-highlight-copy p:last-child {
  max-width: 44ch;
  margin-top: 14px;
  color: rgba(249, 243, 233, 0.8);
  line-height: 1.65;
}

.auth-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(247, 236, 219, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.auth-metric-card strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.auth-metric-card span {
  color: rgba(249, 243, 233, 0.76);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 24px;
  padding: 28px;
  border: 1px solid rgba(110, 83, 45, 0.16);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 253, 250, 0.96), rgba(248, 238, 225, 0.9)),
    var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 165, 110, 0.22), transparent 68%);
  pointer-events: none;
}

.eyebrow,
.panel-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.hero-copy {
  max-width: 62ch;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions {
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.panel-span-2 {
  grid-column: span 2;
}

.muted-panel {
  background: rgba(251, 244, 233, 0.92);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: 1.55rem;
}

.panel-heading-wrap {
  flex-wrap: wrap;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.narrow-field {
  max-width: 260px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.96rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  color: var(--text);
  border: 1px solid rgba(110, 83, 45, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 237, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(138, 95, 45, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 248, 238, 0.98));
  box-shadow: 0 0 0 5px rgba(138, 95, 45, 0.12);
  transform: translateY(-1px);
}

input[readonly] {
  color: #59442d;
  background: rgba(241, 231, 214, 0.72);
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  padding: 13px 18px;
  color: #fffdf8;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 24px rgba(108, 71, 31, 0.26);
}

.auth-card .primary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
}

.ghost-button {
  padding: 12px 16px;
  color: var(--accent-strong);
  font-weight: 700;
  border: 1px solid rgba(138, 95, 45, 0.18);
  background: rgba(255, 251, 245, 0.9);
}

.ghost-button.danger {
  color: var(--danger);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 26px rgba(108, 71, 31, 0.18);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.form-message {
  min-height: 22px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--accent-strong);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  padding: 18px;
  border: 1px solid rgba(110, 83, 45, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(248, 239, 227, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.summary-label {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.summary-value {
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
}

.summary-subtext {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}

.report-summary {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.report-summary-copy {
  display: grid;
  gap: 6px;
}

.report-period-label {
  color: var(--accent-strong);
  font-weight: 700;
}

.report-highlight {
  color: var(--text-soft);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(110, 83, 45, 0.08);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

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

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(110, 83, 45, 0.08);
}

th {
  color: var(--text-soft);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) {
  background: rgba(255, 248, 236, 0.44);
}

tbody tr:hover {
  background: rgba(200, 165, 110, 0.08);
}

.empty-state {
  color: var(--text-soft);
  text-align: center;
  padding: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.chip-soft {
  background: rgba(255, 246, 232, 0.9);
}

@media (prefers-reduced-motion: no-preference) {
  .auth-brand-panel,
  .auth-card,
  .hero,
  .panel {
    animation: rise-in 420ms ease both;
  }

  .auth-highlight-card {
    animation: rise-in 520ms ease both;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .auth-shell,
  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    max-width: 760px;
  }

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

  .auth-highlight-copy h2 {
    max-width: none;
  }

  .panel-span-2 {
    grid-column: auto;
  }

  .auth-metric-grid,
  .summary-grid,
  .form-grid,
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px 12px 32px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-shell {
    gap: 16px;
  }

  .auth-brand-panel,
  .auth-card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-badge-row {
    gap: 8px;
    margin-bottom: 14px;
  }

  .auth-badge {
    padding: 7px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .brand-logo {
    width: min(100%, 330px);
    margin: 0 auto;
  }

  .auth-header {
    text-align: center;
  }

  .auth-description {
    margin: 12px auto 0;
    font-size: 0.94rem;
  }

  .auth-highlight-card {
    padding: 18px;
  }

  .auth-highlight-copy h2 {
    font-size: 2rem;
  }

  .auth-form-lead {
    font-size: 0.93rem;
  }

  .hero h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .auth-metric-grid,
  .summary-grid,
  .form-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .report-summary {
    flex-direction: column;
    align-items: stretch;
  }
}
