/* ============================================================================
   DinBackup.dk – Main Stylesheet
   Dark theme, custom properties, no framework
   ============================================================================ */

/* -------------------------  Custom Properties  ---------------------------- */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface-2:    #1c2128;
  --border:       #30363d;
  --border-light: #21262d;
  --text:         #e6edf3;
  --muted:        #8b949e;
  --muted-2:      #6e7681;
  --accent:       #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37,99,235,.15);
  --success:      #22c55e;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --trial:        #7c3aed;
  --trial-light:  rgba(124,58,237,.15);
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius:       8px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --shadow:       0 1px 3px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
  --shadow-lg:    0 4px 16px rgba(0,0,0,.5), 0 8px 32px rgba(0,0,0,.4);
  --transition:   0.18s ease;
}

/* -------------------------  Reset & Base  --------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* -------------------------  Typography  ----------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { color: var(--muted); line-height: 1.7; }

strong { color: var(--text); font-weight: 600; }
code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: .875em; color: #79c0ff; }

/* -------------------------  Layout  --------------------------------------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------------  Navigation  ----------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.site-nav .container {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 24px;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text) !important;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
}

.nav-links a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.nav-auth {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted) !important;
  font-size: .82rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-phone:hover { color: var(--text) !important; }
.nav-phone svg { flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  margin-left: auto;
}

/* -------------------------  Buttons  -------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* -------------------------  Forms  ---------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder { color: var(--muted-2); }

.form-check {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.form-hint { font-size: .8rem; color: var(--muted-2); margin-top: 4px; }
.form-error { font-size: .85rem; color: var(--danger); margin-top: 4px; }

/* -------------------------  Alerts  --------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #86efac; }
.alert-danger   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }
.alert-warning  { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #fcd34d; }
.alert-info     { background: var(--accent-light); border-color: rgba(37,99,235,.3);  color: #93c5fd; }

/* -------------------------  Cards  ---------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* -------------------------  Hero  ----------------------------------------- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(37,99,235,.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--trial-light);
  color: #c4b5fd;
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 1rem;
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto 1.25rem;
  color: var(--muted);
}

.hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--muted);
  font-size: .82rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 2rem;
}
.hero-trust svg { color: var(--accent); flex-shrink: 0; }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--muted-2);
}

/* -------------------------  Hero pills  ----------------------------------- */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 1.5rem auto 2rem;
  max-width: 760px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
}

.hero-pill--trial {
  background: var(--trial-light);
  border-color: rgba(124,58,237,.3);
  color: #c4b5fd;
}

/* -------------------------  Content blocks  ------------------------------- */
.content-block {
  max-width: 720px;
  margin: 0 auto;
}

.content-block p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.content-block p:last-child { margin-bottom: 0; }

.content-block--centered {
  text-align: center;
}

.content-callout {
  margin-top: 1.5rem !important;
  font-size: 1rem;
  color: var(--text) !important;
  font-weight: 500;
}

/* -------------------------  Checklist  ------------------------------------ */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 1.5rem auto 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

.checklist--centered {
  align-items: center;
  text-align: left;
}

.checklist-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34,197,94,.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* -------------------------  Section base  --------------------------------- */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 4rem;
}

.section-header p { font-size: 1.05rem; margin-top: .75rem; }

.section-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* -------------------------  Feature Grid  --------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 3rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-light), var(--shadow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-card h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.feature-card p  { font-size: .9rem; }

/* -------------------------  Pricing  -------------------------------------- */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.pricing-toggle label {
  font-size: .9rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
}

/* Radio-based toggle */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--muted);
  border-radius: 50%;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform var(--transition), background var(--transition);
}

.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translate(22px, -50%); background: #fff; }

/* Show/hide pricing based on toggle */
.price-monthly, .price-annual { display: none; }
#billing-toggle:not(:checked) ~ * .price-monthly { display: block; }
#billing-toggle:checked        ~ * .price-annual  { display: block; }

/* Savings badge */
.saving-badge {
  display: inline-block;
  background: rgba(34,197,94,.15);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.25);
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.pricing-card .plan-features {
  flex: 1 1 auto;
}

.pricing-card .btn {
  margin-top: auto;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-light), var(--shadow-lg);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-trial-badge {
  display: inline-block;
  background: var(--trial-light);
  color: #c4b5fd;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: .6rem;
  white-space: nowrap;
}

.plan-name { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }

.plan-price {
  margin: 1rem 0;
}

.plan-price .amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.plan-price .currency { font-size: 1.1rem; font-weight: 600; color: var(--muted); vertical-align: super; }
.plan-price .period   { font-size: .85rem; color: var(--muted); }
.plan-quota           { font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; }

.plan-features {
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 4px 0;
}

.plan-features li .check {
  color: var(--success);
  flex-shrink: 0;
}

/* -------------------------  How it works  --------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: steps;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step h3 { margin-bottom: .4rem; }
.step p   { font-size: .9rem; }

/* -------------------------  FAQ  ------------------------------------------ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
  background: var(--surface);
}

details + details { }

summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  color: var(--text);
  transition: background var(--transition);
}

summary::-webkit-details-marker { display: none; }
summary:hover { background: var(--surface-2); }

summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--transition);
  font-weight: 300;
}

details[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

/* -------------------------  Newsletter  ----------------------------------- */
.newsletter-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 1.5rem auto 0;
}

.newsletter-form input[type="email"] {
  flex: 1;
}

/* -------------------------  Footer  --------------------------------------- */
.site-footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: .9rem;
  max-width: 320px;
  margin-top: .75rem;
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
  margin-bottom: 1rem;
}

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: var(--muted); font-size: .9rem; }
.footer-col ul li a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--muted-2);
  flex-wrap: wrap;
  gap: 12px;
}

/* -------------------------  Auth Pages  ----------------------------------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo a {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.auth-logo a span { color: var(--accent); }

.auth-card h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.auth-card > p { font-size: .9rem; margin-bottom: 2rem; }

.auth-divider {
  text-align: center;
  color: var(--muted-2);
  font-size: .85rem;
  margin: 1.25rem 0;
  position: relative;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 30px);
  height: 1px;
  background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--muted);
}

/* -------------------------  Dashboard  ------------------------------------ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  padding: 4px 12px;
  margin-bottom: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.sidebar-link:hover    { color: var(--text); background: var(--surface-2); }
.sidebar-link.active   { color: var(--text); background: var(--accent-light); }
.sidebar-link.active svg { color: var(--accent); }

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dashboard-main { padding: 32px; overflow-y: auto; }

.dashboard-title {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}

.dashboard-subtitle { font-size: .9rem; color: var(--muted); margin-bottom: 2rem; }

/* Storage progress bar */
.storage-bar {
  background: var(--surface-2);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0;
}

.storage-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--accent);
  transition: width .5s ease;
}

.storage-bar-fill.warning { background: var(--warning); }
.storage-bar-fill.danger  { background: var(--danger); }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-label { font-size: .8rem; color: var(--muted-2); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1.2; margin-top: 4px; }
.stat-sub   { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* File browser */
.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.file-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
  border-bottom: 1px solid var(--border);
}

.file-table td {
  padding: 10px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border-light);
}

.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover td { background: var(--surface-2); }

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}

.file-name a { color: var(--text); }
.file-name a:hover { color: var(--accent); }

.file-name svg { color: var(--muted); flex-shrink: 0; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--muted-2); }

/* Trial banner */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--trial-light);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 1.5rem;
  gap: 12px;
  flex-wrap: wrap;
}

.trial-banner p   { font-size: .9rem; color: #c4b5fd; }
.trial-banner .strong { color: #e9d5ff; font-weight: 600; }

/* Plan cards in subscription page */
.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 1.5rem;
}

.plan-option {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
}

.plan-option:hover { border-color: var(--accent); }
.plan-option.current { border-color: var(--success); }
.plan-option.featured-plan { border-color: var(--accent); background: var(--accent-light); }

/* -------------------------  Badges  --------------------------------------- */
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  vertical-align: middle;
}

.badge-starter  { background: rgba(107,114,128,.2); color: #d1d5db; }
.badge-basic    { background: rgba(59,130,246,.2);  color: #93c5fd; }
.badge-standard { background: var(--accent-light);  color: #93c5fd; }
.badge-pro      { background: var(--trial-light);   color: #c4b5fd; }
.badge-business { background: rgba(245,158,11,.15); color: #fcd34d; }

.badge-trial    { background: var(--trial-light);   color: #c4b5fd; border: 1px solid rgba(124,58,237,.3); }
.badge-active   { background: rgba(34,197,94,.15);  color: #86efac; border: 1px solid rgba(34,197,94,.3); }
.badge-expired  { background: rgba(239,68,68,.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* -------------------------  Tables  --------------------------------------- */
.table-responsive { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border-light);
}

.data-table tr:hover td { background: var(--surface-2); }

/* -------------------------  Utilities  ------------------------------------ */
.text-center  { text-align: center; }
.text-muted   { color: var(--muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex  { display: flex; }
.gap-1   { gap: 0.5rem; }
.gap-2   { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.w-full  { width: 100%; }
.hidden  { display: none !important; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* -------------------------  Responsive  ----------------------------------- */
@media (max-width: 1024px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar-label    { display: none; }
  .dashboard-main   { padding: 24px 16px; }
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Hide mobile-only extras on desktop */
.nav-mobile-extras { display: none; }

@media (max-width: 768px) {
  .nav-links        { display: none; }
  .nav-toggle       { display: flex; }
  .nav-toggle svg   { width: 22px; height: 22px; }
  .nav-auth         { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    z-index: 99;
  }

  .nav-mobile-extras {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
  }

  .nav-mobile-extras .nav-phone {
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    color: var(--muted) !important;
  }

  .nav-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero            { padding: 64px 0 56px; }
  .section         { padding: 56px 0; }
  .pricing-grid    { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
  .tools-grid      { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid     { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom   { flex-direction: column; text-align: center; }
  .auth-card       { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .container, .container-sm { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* -------------------------  Software Pages  -------------------------------- */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.software-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.software-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  background: var(--surface-2);
}

.software-card h3 {
  margin-top: 0;
}

.software-card .tagline {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.software-card .btn {
  display: inline-block;
  margin-top: 1rem;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.3;
}

.benefits-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.benefit {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
  border: 1px solid var(--border);
}

.benefit h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.5rem 0 0.5rem 2rem;
  position: relative;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 1.5rem 0;
}

.pros, .cons {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pros {
  border-left: 3px solid var(--success);
}

.cons {
  border-left: 3px solid var(--warning);
}

.pros h3, .cons h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.pros ul, .cons ul {
  margin: 0;
  padding-left: 1.5rem;
}

.pros ul li, .cons ul li {
  margin-bottom: 0.5rem;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.software-article {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.software-article h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.nav-spacer {
  flex: 1;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.tagline {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.cta-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(37,99,235,.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.cta-section p {
  margin-bottom: 1.25rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }

  .article-nav {
    flex-direction: column;
  }

  .cta-section {
    padding: 1.5rem 1rem;
  }
}

/* -------------------------  Tools Grid  ---------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 3rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  color: inherit;
  text-decoration: none;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-light), var(--shadow);
  transform: translateY(-4px);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.tool-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text);
}

.tool-card p {
  flex: 1;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.tool-cta {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.tool-card:hover .tool-cta {
  color: var(--accent-hover);
}

/* -------------------------  Article Cards (index)  ------------------------ */
.article-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-card p:not(.tagline) {
  flex: 1;
}

.article-card .btn {
  align-self: flex-start;
  margin-top: 1.25rem;
}

/* -------------------------  Software Page Centering  ---------------------- */
/* Add class="software-page" to <main> on every software page to get centered
   content while keeping two-column pros-cons and article-nav readable.        */

.software-page .hero .container,
.software-page .hero h1,
.software-page .hero p.lead {
  text-align: center;
}

.software-page .section .container > h2,
.software-page .section .container > h3,
.software-page .section .container > p {
  text-align: center;
}

/* Constrain paragraphs so centered long text stays readable */
.software-page .section .container > p {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* software-article inner content */
.software-page .software-article .container > h2,
.software-page .software-article .container > h3 {
  text-align: center;
}

.software-page .software-article .container > p {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Alert boxes */
.software-page .alert {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Feature lists: center the block, keep text left-aligned inside for readability */
.software-page .feature-list,
.software-page ol,
.software-page .software-article ul:not(.pros ul):not(.cons ul) {
  display: inline-block;
  text-align: left;
  max-width: 640px;
  width: 100%;
}

/* Wrap lists in a centering container by applying text-align:center to parent,
   then the inline-block list auto-centres. We set it on the section container. */
.software-page .software-article .container {
  text-align: center;
}

/* Override back to left for list items themselves */
.software-page .software-article .container li {
  text-align: left;
}

/* pros-cons: keep two columns; center h3, left-align list items */
.software-page .pros h3,
.software-page .cons h3 {
  text-align: center;
}

.software-page .pros ul li,
.software-page .cons ul li {
  text-align: left;
}

/* Software-card text centred */
.software-page .software-card,
.software-page .article-card {
  text-align: center;
}

.software-page .software-card .btn,
.software-page .article-card .btn {
  display: inline-flex;
}

/* article-card: override btn align-self since container is now centered */
.software-page .article-card .btn {
  align-self: center;
}

/* Benefits */
.software-page .benefit {
  text-align: center;
}

/* FAQ items */
.software-page .faq-item h3,
.software-page .faq-item p {
  text-align: center;
}

/* article-nav stays as-is (space-between) */
.software-page .article-nav {
  text-align: left;
}

/* CTA section already centred – no change needed */

@media (max-width: 768px) {
  .software-page .section .container > p {
    max-width: 100%;
  }
  .software-page .software-article .container > p {
    max-width: 100%;
  }
}

/* -------- Force centering on ALL software pages (high-specificity override) -------- */
main.software-page,
main.software-page .container,
main.software-page h1,
main.software-page h2,
main.software-page h3,
main.software-page h4,
main.software-page p,
main.software-page .lead,
main.software-page .alert,
main.software-page .benefit,
main.software-page .faq-item,
main.software-page .software-card,
main.software-page .article-card {
  text-align: center !important;
}

/* Lists: centered as block, text left-aligned inside for readability */
main.software-page ul,
main.software-page ol {
  text-align: left;
  display: inline-block;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* pros-cons grid stays two columns; headings centered, list items left */
main.software-page .pros,
main.software-page .cons {
  text-align: center !important;
}
main.software-page .pros ul,
main.software-page .cons ul {
  display: block;
  max-width: none;
}

/* Constrain paragraph width for readability */
main.software-page p,
main.software-page .lead {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Article-nav (prev/next links) stays default */
main.software-page .article-nav,
main.software-page .article-nav * {
  text-align: left !important;
}
