/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f1f3d;
  --navy-dark: #091529;
  --blue: #1a6bdc;
  --blue-hover: #1559b8;
  --green: #16a34a;
  --green-hover: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  --grey-100: #f8f9fb;
  --grey-200: #eef0f4;
  --grey-300: #dde1ea;
  --grey-500: #8a94a8;
  --grey-700: #3e4a60;
  --grey-900: #1a2133;
  --text: #1a2133;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 12px rgba(15,31,61,.10);
  --shadow-lg: 0 6px 32px rgba(15,31,61,.15);
  --max-w: 1100px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1rem; color: var(--grey-700); }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-lg { padding: 6rem 0; }
.section-alt { background: var(--grey-100); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.text-center { text-align: center; }
.text-sm { font-size: .875rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===== NAV ===== */
.nav {
  background: var(--navy);
  padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 700; color: var(--white);
  text-decoration: none; white-space: nowrap;
}
.nav-logo span { color: #60a5fa; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { color: rgba(255,255,255,.85); font-size: .925rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  background: var(--blue); color: var(--white) !important;
  padding: .45rem 1.1rem; border-radius: var(--radius);
  font-weight: 600 !important; font-size: .875rem !important;
  transition: background .15s;
}
.nav-cta:hover { background: var(--blue-hover) !important; text-decoration: none !important; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: .25rem; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; transition: .2s; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: .75rem 1.75rem;
  border-radius: var(--radius); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all .15s; border: none; text-decoration: none;
  text-align: center; line-height: 1.3;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-hover); color: var(--white); text-decoration: none; }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: var(--green-hover); color: var(--white); text-decoration: none; }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); text-decoration: none; }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }
.btn-sm { padding: .45rem 1rem; font-size: .875rem; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1a3a6b 100%);
  color: var(--white); padding: 5rem 1.25rem 4.5rem;
  text-align: center;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero p { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 2.5rem; color: rgba(255,255,255,.65); font-size: .875rem; display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-trust span { display: flex; align-items: center; gap: .35rem; }
.hero-trust .check { color: #4ade80; }

/* ===== CARDS ===== */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 1.75rem; border: 1px solid var(--grey-200);
}
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); transition: all .2s; }
.card-icon { width: 48px; height: 48px; border-radius: 10px; background: #dbeafe; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.4rem; }

/* ===== STEPS ===== */
.steps { display: flex; gap: 2rem; counter-reset: steps; }
.step { flex: 1; text-align: center; counter-increment: steps; }
.step-num {
  width: 48px; height: 48px; background: var(--blue); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; margin: 0 auto 1rem;
}
.step h3 { margin-bottom: .5rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--navy); }
label .required { color: var(--red); margin-left: 2px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
  width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--grey-300);
  border-radius: var(--radius); font-size: 1rem; font-family: var(--font);
  color: var(--text); background: var(--white); transition: border .15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,107,220,.12);
}
input.error, select.error, textarea.error { border-color: var(--red); }
.field-error { font-size: .8rem; color: var(--red); margin-top: .25rem; }
textarea { resize: vertical; min-height: 90px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a94a8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-hint { font-size: .8rem; color: var(--grey-500); margin-top: .3rem; }
.checkbox-group { display: flex; align-items: flex-start; gap: .6rem; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.checkbox-group label { font-weight: 400; margin-bottom: 0; cursor: pointer; font-size: .9rem; }
.file-upload { border: 2px dashed var(--grey-300); border-radius: var(--radius); padding: 1.5rem; text-align: center; cursor: pointer; transition: border .15s; }
.file-upload:hover { border-color: var(--blue); }
.file-upload input[type="file"] { display: none; }
.file-upload-label { cursor: pointer; color: var(--blue); font-weight: 600; }
.form-section { border-top: 1px solid var(--grey-200); padding-top: 1.5rem; margin-top: 1.5rem; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.25rem; }

/* ===== ALERT / NOTICE ===== */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .9rem; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ===== BADGE ===== */
.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-grey { background: var(--grey-200); color: var(--grey-700); }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--grey-100); color: var(--navy); font-weight: 700; font-size: .85rem; padding: .75rem 1rem; text-align: left; border-bottom: 2px solid var(--grey-300); }
td { padding: .75rem 1rem; border-bottom: 1px solid var(--grey-200); font-size: .9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--grey-100); }

/* ===== FAQ ===== */
.faq-item { border: 1px solid var(--grey-200); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.faq-question { padding: 1.1rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--navy); background: var(--white); user-select: none; }
.faq-question:hover { background: var(--grey-100); }
.faq-chevron { transition: transform .25s; font-size: 1.1rem; color: var(--blue); flex-shrink: 0; }
.faq-answer { padding: 0 1.25rem; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s; color: var(--grey-700); font-size: .95rem; }
.faq-item.open .faq-answer { max-height: 400px; padding: 0 1.25rem 1.25rem; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .45rem; top: 0; bottom: 0; width: 2px; background: var(--grey-200); }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot { position: absolute; left: -1.75rem; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--blue); }
.timeline-dot.done { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.timeline-dot.pending { background: var(--grey-300); box-shadow: 0 0 0 2px var(--grey-300); }
.timeline-label { font-size: .78rem; color: var(--grey-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.timeline-content { font-size: .9rem; color: var(--grey-700); margin-top: .2rem; }

/* ===== PROGRESS BAR ===== */
.progress-bar { background: var(--grey-200); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--blue); transition: width .4s ease; }
.progress-fill.green { background: var(--green); }

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--grey-500); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--grey-500); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--grey-300); }

/* ===== SECTION HEADERS ===== */
.section-label { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: .75rem; }
.section-header { max-width: 640px; }
.section-header.center { margin: 0 auto; text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p { font-size: 1.05rem; }

/* ===== TRUST BAR ===== */
.trust-bar { background: var(--grey-100); border-top: 1px solid var(--grey-200); border-bottom: 1px solid var(--grey-200); padding: 1.25rem 1.25rem; }
.trust-bar-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; color: var(--grey-700); }
.trust-item .icon { color: var(--green); font-size: 1rem; }

/* ===== CTA BAND ===== */
.cta-band { background: var(--navy); color: var(--white); padding: 4rem 1.25rem; text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,.8); font-size: 1.05rem; max-width: 560px; margin: 0 auto 2rem; }

/* ===== REVIEW CARD ===== */
.review { padding: 1.5rem; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--grey-200); }
.review-stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: .6rem; }
.review-text { font-size: .9rem; color: var(--grey-700); margin-bottom: .75rem; font-style: italic; }
.review-author { font-size: .85rem; font-weight: 700; color: var(--navy); }

/* ===== STATS ===== */
.stat-block { text-align: center; }
.stat-block .stat-num { font-size: 2.5rem; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: .3rem; }
.stat-block .stat-label { font-size: .875rem; color: var(--grey-700); }

/* ===== TOOL OUTPUT ===== */
.tool-result { background: var(--grey-100); border: 1.5px solid var(--grey-200); border-radius: var(--radius-lg); padding: 2rem; margin-top: 2rem; }
.tool-result-value { font-size: 2.2rem; font-weight: 800; color: var(--navy); }
.tool-result-label { font-size: .9rem; color: var(--grey-500); margin-bottom: .5rem; }
.tool-result .cta-note { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--grey-300); }

/* ===== ARTICLE ===== */
.article-body { max-width: 720px; }
.article-body h2 { margin: 2rem 0 .75rem; }
.article-body h3 { margin: 1.5rem 0 .6rem; }
.article-body p { color: var(--grey-700); line-height: 1.75; margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin: .75rem 0 1.1rem 1.5rem; }
.article-body li { margin-bottom: .4rem; color: var(--grey-700); line-height: 1.65; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-byline { display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--grey-700); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--grey-200); }
.article-byline .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grey-200); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.article-byline strong { color: var(--navy); }

/* ===== FOOTER ===== */
footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 3rem 1.25rem 2rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand .logo { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: .75rem; }
.footer-brand .logo span { color: #60a5fa; }
.footer-brand p { font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.6); }
.footer-col h4 { font-size: .9rem; font-weight: 700; color: var(--white); margin-bottom: .9rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col a { color: rgba(255,255,255,.65); font-size: .875rem; }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: gap; gap: .75rem; font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-disclaimer { font-size: .8rem; color: rgba(255,255,255,.45); margin-top: 1.5rem; line-height: 1.6; border-top: 1px solid rgba(255,255,255,.07); padding-top: 1.25rem; }

/* ===== DASHBOARD ===== */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; min-height: calc(100vh - 60px); }
.sidebar { background: var(--grey-100); border-right: 1px solid var(--grey-200); padding: 1.5rem 0; }
.sidebar-link { display: flex; align-items: center; gap: .6rem; padding: .65rem 1.5rem; color: var(--grey-700); font-size: .9rem; font-weight: 500; text-decoration: none; border-left: 3px solid transparent; transition: .15s; }
.sidebar-link:hover, .sidebar-link.active { background: var(--white); color: var(--blue); border-left-color: var(--blue); text-decoration: none; }
.dashboard-main { padding: 2rem 1.5rem 2rem 0; }
.lod-card { background: var(--white); border: 1px solid var(--grey-200); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 1.25rem; }
.lod-card:hover { border-color: var(--blue); }
.lod-info { flex: 1; min-width: 0; }
.lod-debtor { font-weight: 700; color: var(--navy); }
.lod-meta { font-size: .82rem; color: var(--grey-500); margin-top: .2rem; }
.lod-amount { font-size: 1.25rem; font-weight: 800; color: var(--navy); white-space: nowrap; }

/* ===== STATUS PILL ===== */
.status { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-sent { background: #dbeafe; color: #1e40af; } .status-sent .status-dot { background: #3b82f6; }
.status-paid { background: #dcfce7; color: #166534; } .status-paid .status-dot { background: var(--green); }
.status-disputed { background: #fef3c7; color: #92400e; } .status-disputed .status-dot { background: var(--amber); }
.status-escalated { background: #f3e8ff; color: #6b21a8; } .status-escalated .status-dot { background: #9333ea; }
.status-draft { background: var(--grey-200); color: var(--grey-700); } .status-draft .status-dot { background: var(--grey-500); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .trust-bar-inner { gap: 1.25rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===== UTILITIES ===== */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.loading { opacity: .5; pointer-events: none; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: var(--white); border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { border: none; border-top: 1px solid var(--grey-200); margin: 2rem 0; }
.highlight { background: #fef9c3; padding: .1em .3em; border-radius: 3px; }
