:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --muted-soft: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.08);
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.page-landing {
  background: var(--bg);
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* —— Landing (marketing) —— */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 250, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  min-height: 4rem;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.landing-logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  box-shadow: var(--shadow-sm);
}

.landing-logo--footer .landing-logo-mark {
  width: 1.75rem;
  height: 1.75rem;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.landing-nav-links a {
  display: inline-flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--muted);
  text-decoration: none;
  padding: 0.125rem 0;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.landing-nav-links a:hover {
  color: var(--text);
}

.landing-nav-links a.is-current {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.landing-hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 40%, rgba(99, 102, 241, 0.08), transparent 50%);
  pointer-events: none;
}

.landing-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.landing-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.landing-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.landing-lead {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 38rem;
}

.landing-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.landing-trust-line {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted-soft);
  letter-spacing: 0.02em;
}

.landing-hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem 1.5rem 1.25rem;
}

.landing-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.landing-panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.landing-panel-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.landing-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-metrics li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.landing-metrics li:first-child {
  border-top: none;
  padding-top: 0;
}

.landing-metric-label {
  grid-column: 1;
  font-size: 0.9375rem;
  color: var(--muted);
}

.landing-metric-value {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  align-self: center;
}

.landing-metric-bar {
  grid-column: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.landing-metric-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--w, 50%);
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.85;
}

.landing-metric-bar--good::after {
  background: #059669;
}

.landing-section {
  padding: 5rem 0;
}

.landing-section--tight {
  padding: 2.5rem 0 3rem;
}

.landing-section--muted {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.landing-section-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.landing-section-intro {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42rem;
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.landing-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.landing-section-head {
  max-width: 40rem;
  margin-bottom: 2.75rem;
}

.landing-h2 {
  margin: 0;
  font-size: clamp(1.75rem, 2.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.landing-section-deck {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.landing-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-feature:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.landing-feature-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.landing-feature h3 {
  margin: 0 0 0.65rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-feature p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

@media (min-width: 768px) {
  .landing-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1100px) {
  .landing-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.landing-steps li {
  position: relative;
  padding: 1.5rem 0 0;
  border-top: 2px solid var(--line);
}

@media (min-width: 768px) {
  .landing-steps li {
    padding: 1.75rem 1.25rem 0 0;
    border-top: none;
    border-left: 2px solid var(--line);
  }

  .landing-steps li:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.landing-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.landing-steps strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.landing-steps span {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.landing-cta-band {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 4rem 0;
}

.landing-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .landing-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.landing-cta-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  max-width: 20ch;
}

.landing-cta-copy {
  margin: 0.65rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 28rem;
}

.landing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

.landing-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 3rem 0 0;
}

.landing-footer-inner {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .landing-footer-inner {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.landing-footer-tagline {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 16rem;
}

.landing-footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.landing-footer-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 0.25rem;
}

.landing-footer-col a {
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
}

.landing-footer-col a:hover {
  color: var(--text);
}

.landing-footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 1.75rem;
}

.landing-footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted-soft);
}

.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: rgba(246, 248, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1.3rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}

.btn-lg,
.btn-large {
  padding: 0.8125rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--line-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}

.btn-light {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover,
.btn-outline:hover {
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.btn-outline {
  color: var(--primary);
  border-color: #93c5fd;
  background: var(--surface);
}

.btn-on-dark {
  background: #fff;
  color: #0f172a;
  border-color: transparent;
}

.btn-on-dark:hover {
  background: #e2e8f0;
}

.btn-outline-dark {
  background: transparent;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.45);
}

.btn-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.65);
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  color: var(--primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  line-height: 1.15;
}

.subtext {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 56ch;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.4rem;
  flex-wrap: wrap;
}

.note {
  color: #6d7c9d;
  margin-top: 0.9rem;
  font-size: 0.92rem;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.2rem 0.5rem;
  box-shadow: 0 18px 45px rgba(20, 33, 61, 0.08);
}

.hero-card h3 {
  margin-top: 0.1rem;
  margin-bottom: 1rem;
}

.hero-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-card li {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
  color: var(--muted);
}

.hero-card li strong {
  color: var(--text);
}

.section {
  padding: 3rem 0;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.feature-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.55rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.alt {
  background: linear-gradient(180deg, #f1f5ff 0%, #eaf0ff 100%);
  border-top: 1px solid #d9e4ff;
  border-bottom: 1px solid #d9e4ff;
}

.cta {
  text-align: center;
}

.cta p {
  margin: 0 auto;
  max-width: 68ch;
  color: var(--muted);
}

.cta .hero-actions {
  justify-content: center;
}

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

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #5e6f94;
}

.footer a {
  color: var(--primary-dark);
  text-decoration: none;
}

.auth-error,
.auth-success {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.auth-error {
  color: #b91c1c;
}
.auth-success {
  color: #047857;
}
.auth-footer-links {
  margin-top: 1rem;
  font-size: 0.95rem;
}
.auth-footer-links a {
  color: var(--primary-dark);
  text-decoration: none;
}

@media (max-width: 920px) {
  .hero-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .landing-nav-links {
    display: none;
  }

  .landing-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .landing-hero-copy h1 {
    max-width: none;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Auth pages: shared refinements */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  background: var(--bg);
}

.auth-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-card p.lead {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.auth-card label {
  display: block;
  margin-top: 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.6875rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 1.125rem;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.125rem;
}

.auth-row-between label {
  margin-top: 0;
}

.auth-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.turnstile-wrap {
  margin-top: 1rem;
  min-height: 65px;
}

.auth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-soft);
}

.auth-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* —— Post-login dashboard (app shell) —— */
.dash-body {
  background-color: #e2e8f0;
  background-image:
    radial-gradient(ellipse 120% 90% at 100% 0%, rgba(37, 99, 235, 0.11), transparent 55%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(99, 102, 241, 0.08), transparent 50%),
    linear-gradient(180deg, #dbeafe 0%, #f1f5f9 38%, #e8edf3 100%);
  min-height: 100vh;
}

.dash-wrap {
  min-height: 100vh;
  padding: 1.75rem 1rem 2.5rem;
}

.dash-card {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.dash-header-text {
  min-width: 0;
}

.dash-product-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.dash-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.dash-subtitle {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 40rem;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.btn-dash-signout {
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
}

.btn-dash-signout:hover {
  background: #f1f5f9;
  color: var(--text);
  border-color: #cbd5e1;
}

.btn-dash-home {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid #93c5fd;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
}

.btn-dash-home:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.dash-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 280px;
}

.dash-sidebar {
  padding: 1.25rem 1rem 1.5rem 1.25rem;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-right: 1px solid var(--line);
}

.dashboard-email {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 0.25rem;
  word-break: break-word;
}

.dashboard-meta {
  color: var(--muted);
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.dash-nav {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.btn-dash-nav {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5625rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-dash-nav:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary-dark);
}

.btn-dash-nav:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(37, 99, 235, 0.35);
}

.admin-badge {
  margin-top: 0.65rem;
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #047857;
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}

.dash-main {
  min-height: 200px;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #f8fafc;
}

.dash-panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  min-height: 120px;
}

.dash-panel .dash-loading-msg {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.dash-panel .dash-panel-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dash-panel .dash-textarea {
  width: 100%;
  min-height: 52px;
  margin-top: 0.45rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-panel .dash-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dash-panel .stat-value .stat-value-split {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted-soft);
}

.dash-panel .panel-title {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-panel .holiday-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dash-panel .holiday-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.dash-panel .holiday-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.dash-panel .holiday-date {
  font-weight: 600;
  color: var(--text);
}

.dash-panel .holiday-meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.dash-panel .manage-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-panel .manage-form-grid label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.dash-panel .manage-form-grid input,
.dash-panel .manage-form-grid select,
.dash-panel .manage-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5625rem 0.65rem;
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-panel .manage-form-grid input:focus,
.dash-panel .manage-form-grid select:focus,
.dash-panel .manage-form-grid textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dash-panel .manage-form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-panel .btn-primary,
.dash-panel .btn.btn-primary {
  font-weight: 600;
  padding: 0.5625rem 1.125rem;
  border-radius: var(--radius-sm);
}

.dash-panel .btn-light,
.dash-panel .btn.btn-light {
  font-weight: 500;
  background: #f8fafc;
  border-color: var(--line-strong);
  color: var(--text);
}

.dash-panel .btn-light:hover,
.dash-panel .btn.btn-light:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.dash-panel .btn-danger,
.dash-panel .btn.btn-danger {
  font-weight: 600;
  border: 1px solid #fecdd3;
  color: #be123c;
  background: linear-gradient(180deg, #fff1f2, #ffe4e6);
}

.dash-panel .btn-danger:hover,
.dash-panel .btn.btn-danger:hover {
  background: #fecdd3;
  border-color: #fb7185;
  color: #9f1239;
}

.dash-panel .btn-small {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.dash-panel .holiday-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dash-info {
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.nav-section-label {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.hr-only-nav hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.85rem 0 0;
}

/* Ensure admin/manager nav blocks stay hidden even if other rules set display */
.dash-nav .hr-only-nav[hidden] {
  display: none !important;
}

.dash-panel .overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.35rem;
}

.dash-panel .stat-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.05rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.dash-panel .stat-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-panel .stat-value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dash-panel .stat-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.dash-panel .panel-subtitle {
  margin: 1.15rem 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dash-panel .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.dash-panel .filter-row button[data-filter] {
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  color: var(--muted);
}

.dash-panel .filter-row button[data-filter]:hover {
  background: #e2e8f0;
  color: var(--text);
}

.dash-panel .filter-row button[data-filter].active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.dash-panel .status-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-panel .status-pending {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.dash-panel .status-approved {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.dash-panel .status-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.dash-panel .status-cancelled {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--line-strong);
}

@media (max-width: 768px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.25rem;
  }

  .dash-main {
    padding: 1.25rem 1rem 1.5rem;
  }

  .dash-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-actions {
    justify-content: flex-start;
  }

  .dash-panel .manage-form-grid {
    grid-template-columns: 1fr;
  }
}

/* SaaS dashboard refresh */
.dash-body {
  background: #f3f6fb;
}

.dash-wrap {
  display: grid;
  grid-template-columns: 288px 1fr;
  min-height: 100vh;
  padding: 0;
}

.dash-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #0b1730 0%, #101f3f 100%);
  color: #cbd5e1;
  border-right: none;
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.12);
  padding: 1.15rem 0.9rem 1.4rem;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.dash-brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.dash-user-card {
  background: rgba(15, 23, 42, 0.38);
  border-radius: 16px;
  padding: 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.dash-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  margin-bottom: 0.45rem;
}

.dashboard-email {
  color: #e2e8f0;
}

.dashboard-meta {
  color: #94a3b8;
}

.admin-badge {
  margin-top: 0.6rem;
}

.dash-nav {
  margin-top: 0.95rem;
}

.btn-dash-nav {
  background: transparent;
  border: none;
  color: #cbd5e1;
  box-shadow: none;
  border-radius: 12px;
  gap: 0.6rem;
  padding: 0.62rem 0.7rem;
}

.btn-dash-nav i {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.btn-dash-nav:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.14);
  border-color: transparent;
}

.btn-dash-nav.is-active {
  background: rgba(59, 130, 246, 0.2);
  color: #eff6ff;
}

.nav-section-label {
  color: #94a3b8;
}

.hr-only-nav hr {
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.dash-main {
  background: #f5f7fb;
  padding: 0;
}

.dash-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #e5eaf2;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.dash-header h1 {
  font-size: 1.7rem;
}

.dash-subtitle {
  margin-top: 0.2rem;
}

.dash-actions {
  gap: 0.55rem;
}

.btn-dash-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  padding: 0;
  border: 1px solid #d8e1ef;
  background: #fff;
  color: #475569;
}

.btn-dash-icon:hover {
  background: #f8fafc;
}

.btn-dash-icon i {
  width: 16px;
  height: 16px;
}

.btn-dash-home {
  background: #2563eb;
  color: #fff;
  border: none;
}

.btn-dash-home:hover {
  background: #1d4ed8;
  color: #fff;
}

.dash-panel {
  margin: 1.2rem 1.2rem 1.4rem;
  border: none;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.dash-panel .overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-panel .stat-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dash-panel .stat-card-casual {
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
}

.dash-panel .stat-card-sick {
  background: linear-gradient(180deg, #f0fdf4, #f8fffb);
}

.dash-panel .stat-card-earned {
  background: linear-gradient(180deg, #faf5ff, #fcf9ff);
}

.dash-panel .stat-card-pending {
  background: linear-gradient(180deg, #fff7ed, #fffdf8);
}

.dash-panel .stat-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-panel .stat-head i {
  width: 16px;
  height: 16px;
  color: #475569;
}

.next-leave-card,
.holiday-list-card {
  border-radius: 16px;
  background: #f8fafc;
  padding: 0.9rem 1rem;
}

.next-leave-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.next-leave-row i {
  width: 16px;
  height: 16px;
  color: #2563eb;
  margin-top: 2px;
}

.next-leave-row p {
  margin: 0;
}

.holiday-rows li {
  align-items: center;
}

.holiday-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.holiday-left i {
  width: 15px;
  height: 15px;
  color: #6366f1;
}

.holiday-right {
  font-weight: 500;
  color: #0f172a;
}

.dash-panel .payslip-detail-wrap {
  margin: 0.5rem 0 1rem;
}

.dash-panel .payslip-detail-panel {
  border: 1px solid var(--line);
}

.dash-panel .payslip-breakdown {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.dash-panel .payslip-breakdown th,
.dash-panel .payslip-breakdown td {
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.dash-panel .payslip-breakdown tbody tr:first-child th,
.dash-panel .payslip-breakdown tbody tr:first-child td {
  border-top: none;
  padding-top: 0;
}

.dash-panel .payslip-breakdown th {
  font-weight: inherit;
  text-align: left;
}

.dash-panel .payslip-line-amount {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}

.dash-panel .payslip-section-label-row td {
  border-top: none;
  padding-top: 0.35rem;
  padding-bottom: 0;
}

.dash-panel .payslip-breakdown-total th {
  color: var(--text);
}

.dash-info {
  border: none;
  background: linear-gradient(180deg, #ecfeff, #f0f9ff);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.dash-info i {
  width: 15px;
  height: 15px;
  color: #0369a1;
  margin-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .dash-panel .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .dash-wrap {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: static;
    height: auto;
  }
}
