:root {
  --bg: #f3ede2;
  --bg-deep: #d9cfbf;
  --panel: rgba(255, 252, 246, 0.94);
  --panel-strong: #fffaf1;
  --text: #1f2933;
  --muted: #5f6b76;
  --line: rgba(88, 76, 56, 0.14);
  --brand: #0b6e4f;
  --brand-strong: #084c39;
  --accent: #c46a2f;
  --danger: #a62727;
  --success: #1d7a43;
  --shadow: 0 18px 48px rgba(44, 36, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(237, 193, 112, 0.35), transparent 30%),
    radial-gradient(circle at bottom right, rgba(11, 110, 79, 0.18), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
}

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

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

button,
.button-link {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.button-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #f5fff9;
  box-shadow: 0 10px 24px rgba(8, 76, 57, 0.2);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  border: 1px solid var(--line);
}

.button-danger {
  background: var(--danger);
  color: #fff7f7;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.88rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(66, 58, 45, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

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

.page-shell,
.dashboard-shell {
  width: min(1200px, calc(100% - 1.6rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 1.25rem 0 2rem;
}

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

.auth-hero,
.panel,
.hero-panel,
.topbar {
  backdrop-filter: blur(14px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.auth-hero,
.auth-card,
.panel,
.hero-panel {
  border-radius: 30px;
}

.auth-hero {
  padding: 1.5rem;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(11, 110, 79, 0.1);
  color: var(--brand-strong);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.display-title,
.section-title,
.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
}

.display-title {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
}

.hero-copy,
.muted {
  color: var(--muted);
}

.auth-card {
  padding: 1.4rem;
  background: rgba(255, 250, 241, 0.98);
  border: 1px solid rgba(66, 58, 45, 0.12);
  box-shadow: var(--shadow);
  animation: rise-in 0.42s ease both;
}

.auth-card h1,
.auth-card h2,
.panel h2,
.panel h3,
.hero-panel h1,
.hero-panel h2 {
  margin: 0 0 0.45rem;
}

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

.inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.status {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.92rem;
}

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

.status.success {
  color: var(--success);
}

.dashboard-shell {
  padding: 1rem 0 2rem;
}

.topbar {
  position: sticky;
  top: 0.8rem;
  z-index: 10;
  border-radius: 28px;
  padding: 0.95rem 1.15rem;
  display: grid;
  gap: 0.9rem;
}

.brand-row,
.nav-links,
.toolbar {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand-mark {
  margin: 0;
  font-size: 1.45rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.nav-links a.is-active {
  color: var(--brand-strong);
  background: rgba(11, 110, 79, 0.12);
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-panel {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.hero-stats {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
  border-radius: 24px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(66, 58, 45, 0.08);
}

.stat-card strong {
  display: block;
  font-size: 1.4rem;
}

.panel {
  padding: 1.15rem;
  animation: rise-in 0.42s ease both;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

.cards,
.detail-list,
.checklist,
.asset-list {
  display: grid;
  gap: 0.8rem;
}

.card,
.detail-item,
.check-item,
.asset-row,
.summary-box,
.empty-state {
  border-radius: 22px;
  border: 1px solid rgba(66, 58, 45, 0.1);
  background: rgba(255, 255, 255, 0.76);
  padding: 1rem;
}

.card h3,
.detail-item h4,
.check-item h4 {
  margin: 0 0 0.3rem;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(11, 110, 79, 0.1);
  color: var(--brand-strong);
}

.chip.warn {
  background: rgba(196, 106, 47, 0.14);
  color: #8e4c1f;
}

.chip.neutral {
  background: rgba(42, 54, 65, 0.08);
  color: #31404d;
}

.split-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.asset-actions,
.inline-form-actions,
.check-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.summary-box pre,
.output-box {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.preview-box video {
  width: 100%;
  max-height: 440px;
  border-radius: 22px;
  background: #081018;
}

.hidden {
  display: none !important;
}

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

@media (min-width: 820px) {
  .auth-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .dashboard-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .span-2 {
    grid-column: 1 / -1;
  }

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

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