:root {
  --color-bg: #0a0e1a;
  --color-bg-secondary: #111827;
  --color-surface: #1e293b;
  --color-surface-elevated: #334155;
  --color-text: #f1f5f9;
  --color-text-secondary: #cbd5e1;
  --color-text-tertiary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border: #334155;
  --color-border-subtle: #1e293b;
  --color-accent: #3b82f6;
  --color-accent-light: #60a5fa;
  --color-accent-dark: #2563eb;
  --color-danger: #f07171;
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.3);
  --transition-base: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

body,
p,
span,
div {
  font-family: "DM Sans", sans-serif;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0e1a;
  color: #f1f5f9;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

::selection {
  background: rgba(59, 130, 246, 0.2);
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover,
a:focus-visible {
  color: var(--color-accent);
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.container .container {
  padding: 0;
}

main {
  padding-top: 6.5rem;
}

.main-content {
  padding-bottom: 4.5rem;
}

section {
  padding: 64px 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Sora", "DM Sans", sans-serif;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 56px;
  font-weight: 800;
}

h2 {
  font-size: 36px;
}

h3 {
  font-size: 28px;
}

h4 {
  font-size: 20px;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
}

ul,
ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

small,
.muted {
  color: var(--color-text-muted);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(10, 14, 26, 0.8);
  border-bottom: 1px solid var(--color-border-subtle);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  min-height: 72px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.nav-links a {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

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

.logout-form {
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-accent-light);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-accent-light);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge.badge-primary {
  background: rgba(59, 130, 246, 0.25);
  color: var(--color-accent-light);
}

.card {
  background: #1e293b;
  border-radius: 16px;
  border: 1px solid #334155;
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: #475569;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}

.card-elevated {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid #475569;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.card-muted {
  background: var(--color-bg-secondary);
  border-color: var(--color-border-subtle);
  box-shadow: none;
}

.card-muted:hover {
  transform: none;
  box-shadow: none;
}

.card-accent {
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: var(--shadow-soft);
}

.card-accent-secondary {
  border: 1px solid #475569;
}

.card-highlight {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: #475569;
  box-shadow: var(--shadow-card);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  max-width: 18ch;
}

.hero-subtitle {
  color: var(--color-text-tertiary);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.2), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(96, 165, 250, 0.18), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.metric {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-accent);
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

.grid {
  display: grid;
  gap: 1.6rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-two {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  font-family: "DM Sans", sans-serif;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  outline: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #1e293b;
  color: #f1f5f9;
  padding: 14px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "DM Sans", sans-serif;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #334155;
  border-color: #475569;
  transform: translateY(-1px);
  outline: none;
}

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

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  outline: none;
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  margin-left: 0.5rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form {
  display: grid;
  gap: 0.8rem;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label,
.input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: none;
}

input,
select,
textarea,
.input-field,
.select-field {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #334155;
  padding: 14px 18px;
  background: #1e293b;
  font-size: 16px;
  color: #f1f5f9;
  transition: all 0.2s ease;
  font-family: "DM Sans", sans-serif;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

select,
.select-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

input[type="checkbox"] {
  width: auto;
}

input:focus,
select:focus,
textarea:focus,
.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: #111827;
}

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

.form-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-text);
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-danger {
  border: 1px solid rgba(240, 113, 113, 0.6);
  color: #ffd9d9;
  background: rgba(240, 113, 113, 0.12);
}

.notice {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(96, 165, 250, 0.12);
  color: var(--color-text);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
}

tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.text-right {
  text-align: right;
}

.page-header {
  margin-bottom: 2rem;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.page-hero {
  box-shadow: var(--shadow-card);
}

.dashboard-hero {
  padding: 32px 0 24px;
  margin-bottom: 32px;
}

.dashboard-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-bottom: 0.5rem;
}

.plan-pill {
  display: inline-flex;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.15);
  font-weight: 600;
  color: var(--color-accent-light);
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tile-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.tile-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  background: rgba(59, 130, 246, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-light);
}

.tile-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.tile-subtitle {
  margin-top: 0.2rem;
  color: var(--color-text-tertiary);
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 32px;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-page {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
}

.auth-card {
  width: min(460px, 100%);
}

.footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 48px 0;
  color: var(--color-text-muted);
}

.footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

#faq {
  background: #111827;
  padding: 100px 32px;
}

#faq h2 {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 64px;
}

.faq-item {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.faq-question {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}

.faq-answer {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
}

.icon-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-tertiary);
  font-size: 0.95rem;
  margin-top: 0.6rem;
}

.icon-row svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent-light);
}

.empty-state {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px dashed #475569;
  background: rgba(17, 24, 39, 0.8);
  color: var(--color-text-tertiary);
}

.pricing-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-card {
  position: relative;
  text-align: center;
}

.pricing-card ul {
  text-align: left;
  margin-top: 16px;
}

.pricing-card.recommended::before {
  content: "Recommended";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.pricing-card .metric {
  margin: 16px 0;
}

.calculator-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.results-panel {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 32px;
  height: fit-content;
}

.result-highlight {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.rich-text p {
  color: var(--color-text-secondary);
}

@media (max-width: 1024px) {
  section {
    padding: 56px 0;
  }

  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .results-panel {
    position: static;
  }
}

@media (max-width: 968px) {
  section {
    padding: 72px 20px !important;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }

  .container {
    padding: 0 20px;
  }

  main {
    padding-top: 6rem;
  }

  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 20px;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  section {
    padding: 56px 20px !important;
  }

  .hero {
    min-height: auto;
  }

  .hero-title {
    font-size: 32px;
  }

  button,
  .btn {
    width: 100%;
  }
}
