@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-panel: rgba(255, 251, 246, 0.9);
  --bg-panel-strong: #ffffff;
  --bg-sidebar: #16211d;
  --bg-sidebar-soft: rgba(255, 255, 255, 0.06);
  --text: #18211f;
  --muted: #6b766f;
  --muted-strong: #44524b;
  --line: rgba(24, 33, 31, 0.09);
  --line-strong: rgba(24, 33, 31, 0.16);
  --accent: #1f6a52;
  --accent-strong: #174e3d;
  --accent-soft: rgba(31, 106, 82, 0.12);
  --accent-warm: #ca6f2a;
  --accent-warm-soft: rgba(202, 111, 42, 0.16);
  --danger: #b84d41;
  --danger-soft: rgba(184, 77, 65, 0.12);
  --shadow-soft: 0 18px 50px rgba(20, 26, 24, 0.08);
  --shadow-strong: 0 30px 80px rgba(20, 26, 24, 0.12);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(202, 111, 42, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(31, 106, 82, 0.12), transparent 28%),
    linear-gradient(180deg, #f6f2ea 0%, #efe9de 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 33, 31, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 31, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}

a {
  color: inherit;
}

input,
textarea,
button {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1,
.brand-copy strong,
.summary-card strong,
.login-hero h1 {
  font-family: "Fraunces", "Iowan Old Style", serif;
}

p {
  margin: 0;
}

.dashboard-app {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  background:
    radial-gradient(circle at top right, rgba(202, 111, 42, 0.2), transparent 32%),
    linear-gradient(180deg, #182420 0%, #121a17 100%);
  color: rgba(255, 250, 244, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 22px;
}

.sidebar-top {
  display: grid;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(202, 111, 42, 0.94), rgba(31, 106, 82, 0.9));
  color: #fff8f2;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 1.5rem;
  color: #fff8f0;
}

.brand-kicker,
.section-kicker,
.panel-copy strong,
.sidebar-card-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.brand-kicker {
  color: rgba(255, 250, 244, 0.62);
}

.sidebar-intro {
  color: rgba(255, 250, 244, 0.68);
  line-height: 1.65;
  font-size: 0.95rem;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-link {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 250, 244, 0.72);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 250, 244, 0.96);
}

.sidebar-link-title {
  font-weight: 700;
}

.sidebar-link-copy {
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255, 250, 244, 0.62);
}

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 24px;
  background: var(--bg-sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-card-label {
  color: rgba(255, 250, 244, 0.56);
  margin-bottom: 10px;
}

.sidebar-card h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.sidebar-card-copy {
  color: rgba(255, 250, 244, 0.68);
  line-height: 1.5;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 13, 0.56);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
  z-index: 15;
}

.dashboard-shell {
  position: relative;
  padding: 28px;
  display: grid;
  gap: 24px;
}

.content-section {
  display: grid;
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 246, 0.9));
  border: 1px solid rgba(24, 33, 31, 0.08);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.topbar {
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.topbar-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.topbar h1 {
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  max-width: 9ch;
}

.topbar-copy,
.section-copy,
.panel-copy,
.insight-item p,
.login-copy,
.meta-line,
.metric-line {
  color: var(--muted);
  line-height: 1.65;
}

.topbar-copy {
  margin-top: 12px;
  max-width: 58ch;
}

.section-intro {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
}

.section-intro h2 {
  font-size: clamp(1.85rem, 2.6vw, 2.45rem);
}

.section-kicker {
  color: var(--accent);
  margin-bottom: 10px;
}

.section-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 280px;
}

.meta-block {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.meta-block span {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.meta-block strong {
  font-size: 1rem;
}

.topbar-actions {
  display: grid;
  gap: 16px;
  justify-items: end;
}

.status-stack,
.action-group,
.panel-head,
.account-actions,
.target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-chip,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.status-chip.accent,
.pill {
  border-color: rgba(31, 106, 82, 0.16);
  background: rgba(31, 106, 82, 0.1);
  color: var(--accent-strong);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 0 7px rgba(202, 111, 42, 0.14);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 12px 15px;
  border-radius: 16px;
  font-weight: 700;
}

.button {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fefbf7;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
  box-shadow: 0 12px 24px rgba(31, 106, 82, 0.18);
}

.button:hover {
  transform: translateY(-1px);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button.small {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
}

.overview-layout,
.admin-grid {
  display: grid;
  gap: 18px;
}

.overview-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
}

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

.admin-grid.admin-grid-wide {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.88fr);
}

.hero-panel,
.insight-panel,
.panel {
  padding: 24px;
}

.panel-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-head h3 {
  font-size: 1.35rem;
}

.summary-grid,
.provider-grid,
.checkbox-grid,
.form-grid,
.stack {
  display: grid;
  gap: 14px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 20px;
}

.summary-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 244, 238, 0.92));
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.summary-card strong {
  display: block;
  font-size: 2.3rem;
  margin-bottom: 8px;
}

.summary-card p {
  color: var(--muted);
  font-size: 0.88rem;
}

.insight-list {
  display: grid;
  gap: 12px;
}

.insight-item {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.insight-item strong {
  display: block;
  margin-bottom: 8px;
}

.stack.compact {
  gap: 12px;
}

.provider-grid,
.form-grid,
.checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

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

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(31, 106, 82, 0.38);
  box-shadow: 0 0 0 4px rgba(31, 106, 82, 0.08);
}

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

.target-picker {
  display: grid;
  gap: 12px;
}

.target-picker-head {
  display: grid;
  gap: 6px;
}

.checkbox-item,
.provider-card,
.account-card,
.content-card,
.audit-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.checkbox-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.checkbox-item input {
  width: auto;
  margin: 0;
}

.checkbox-item .muted {
  display: inline;
}

.provider-card,
.account-card,
.content-card,
.audit-card {
  padding: 18px;
}

.provider-card h3,
.account-card h3,
.content-card h3,
.audit-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.provider-card p,
.account-card p,
.content-card p,
.audit-card p,
.muted,
.meta-line,
.metric-line {
  color: var(--muted);
}

.capability-list,
.content-meta,
.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.badge.success {
  background: var(--accent-soft);
  border-color: rgba(31, 106, 82, 0.12);
  color: var(--accent-strong);
}

.badge.warn {
  background: var(--accent-warm-soft);
  border-color: rgba(202, 111, 42, 0.14);
  color: #8e4d1d;
}

.badge.error {
  background: var(--danger-soft);
  border-color: rgba(184, 77, 65, 0.16);
  color: var(--danger);
}

.meta-line,
.metric-line {
  font-size: 0.9rem;
}

.targets-table {
  display: grid;
  gap: 14px;
}

.targets-head,
.target-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.65fr) minmax(190px, 0.95fr) minmax(160px, 0.9fr) auto;
  gap: 12px;
  align-items: center;
}

.targets-head {
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.target-row {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}

.target-main strong {
  display: block;
  margin-bottom: 6px;
}

.target-actions {
  justify-content: flex-end;
}

.audit-card {
  position: relative;
  padding-left: 24px;
}

.audit-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(31, 106, 82, 0.08);
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(24, 33, 31, 0.18);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 18px;
  color: #fff;
  background: rgba(24, 33, 31, 0.92);
  box-shadow: var(--shadow-strong);
  z-index: 25;
}

.hidden {
  display: none;
}

.login-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}

.login-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 31, 0.08);
  box-shadow: var(--shadow-strong);
  background: rgba(255, 251, 246, 0.92);
}

.login-hero {
  padding: 44px;
  background:
    radial-gradient(circle at top right, rgba(202, 111, 42, 0.24), transparent 30%),
    linear-gradient(180deg, #19241f 0%, #111915 100%);
  color: #fff8f0;
  display: grid;
  gap: 20px;
  align-content: space-between;
}

.login-hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  max-width: 9ch;
}

.login-hero .section-kicker,
.login-hero .login-copy,
.login-point p {
  color: rgba(255, 248, 240, 0.76);
}

.login-points {
  display: grid;
  gap: 14px;
}

.login-point {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.login-point strong {
  display: block;
  margin-bottom: 8px;
}

.login-card {
  padding: 40px 36px;
  display: grid;
  gap: 18px;
  align-content: center;
}

.login-card h2 {
  font-size: 2rem;
}

.login-card .button {
  width: 100%;
}

.login-error {
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  background: rgba(184, 77, 65, 0.94);
}

@media (max-width: 1200px) {
  .overview-layout,
  .admin-grid,
  .admin-grid.admin-grid-wide,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .topbar {
    align-items: flex-start;
  }

  .section-intro,
  .topbar,
  .topbar-main {
    flex-direction: column;
  }

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

  .target-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(88vw, 320px);
    z-index: 20;
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .sidebar-overlay {
    display: block;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .dashboard-shell,
  .login-shell {
    padding: 18px;
  }

  .section-meta {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar,
  .panel,
  .hero-panel,
  .insight-panel,
  .login-hero,
  .login-card {
    padding: 20px;
  }

  .summary-grid,
  .provider-grid,
  .form-grid,
  .checkbox-grid,
  .targets-head,
  .target-row {
    grid-template-columns: 1fr;
  }

  .targets-head {
    display: none;
  }

  .target-row {
    gap: 10px;
  }

  .action-group,
  .status-stack {
    width: 100%;
  }

  .action-group .button,
  .status-chip {
    width: 100%;
    justify-content: center;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }
}
