@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #14b8a6;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --success: #16a34a;
    --warning: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}
.nav-shell, .hero, .section, .footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}
.nav-shell, .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}
.brand span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}
.nav-links, .footer nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-weight: 700;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
    transition: transform 0.18s ease, background 0.18s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--primary-dark); outline: none; }
.button-small { min-height: 36px; padding: 0 14px; font-size: 0.9rem; }
.button-secondary { background: #eef4ff; color: var(--primary); box-shadow: none; }
.button-ghost { background: transparent; color: var(--primary); box-shadow: none; border: 1px solid var(--line); }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
    gap: 36px;
    align-items: center;
    padding: 76px 0 38px;
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 7vw, 4.75rem);
    line-height: 1;
}
.hero-subtitle, .section-heading p, .module-card p, .quote-card p, .preview-card p, .price-card p {
    color: var(--muted);
    line-height: 1.7;
}
.hero-actions, .proof-row, .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.proof-row {
    margin-top: 20px;
    color: var(--muted);
    font-weight: 800;
}
.platform-preview, .panel, .module-card, .quote-card, .price-card, .preview-card, .audit-card, .quote-document {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.platform-preview { overflow: hidden; }
.preview-topbar {
    display: flex;
    gap: 7px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}
.preview-topbar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}
.preview-body { padding: 24px; }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.metric {
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}
.metric span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}
.metric strong {
    display: block;
    margin-top: 4px;
    font-size: 1.45rem;
}
.section { padding: 74px 0 0; }
.section-heading {
    max-width: 760px;
    margin-bottom: 22px;
}
.section-heading h2 {
    margin-bottom: 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
}
.module-grid, .preview-grid, .feature-grid, .pricing-grid, .testimonials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.module-card, .preview-card, .quote-card, .price-card, .audit-card { padding: 22px; }
.module-card.active {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 22px 55px rgba(37, 99, 235, 0.16);
}
.module-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--primary);
    font-weight: 800;
}
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    background: #ecfdf5;
    color: var(--success);
    font-size: 0.82rem;
    font-weight: 800;
}
.pill.preview { background: #fffbeb; color: #92400e; }
.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: 28px;
    align-items: start;
}
.audit-form {
    display: grid;
    gap: 14px;
}
.audit-form button { width: 100%; }
label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 700;
}
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
}
input:focus, textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(37, 99, 235, 0.18);
}
.result-card {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}
.result-card[hidden] { display: none; }
.footer {
    margin-top: 76px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.dashboard-page { background: #eef2f7; }
.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 270px minmax(0, 1fr);
}
.sidebar {
    padding: 22px;
    border-right: 1px solid var(--line);
    background: #fff;
}
.sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 30px;
}
.sidebar nav a {
    padding: 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 800;
}
.sidebar nav a.active, .sidebar nav a:hover {
    background: #eef4ff;
    color: var(--primary);
}
.workspace { min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,0.84);
    backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; }
.user-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-weight: 800;
}
.user-menu a { color: var(--primary); }
.dashboard-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}
.panel { padding: 22px; }
.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    background: #fff;
}
th, td {
    padding: 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
td input { min-width: 120px; }
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}
.preview-list {
    display: grid;
    gap: 14px;
}
.preview-card {
    box-shadow: none;
}

.quote-page { min-height: 100vh; }
.quote-shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
}
.quote-document {
    padding: clamp(22px, 5vw, 40px);
}
.quote-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}
.quote-header h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
}
.quote-total {
    min-width: 180px;
    align-self: start;
    border-radius: 8px;
    padding: 18px;
    background: #eef4ff;
    text-align: right;
}
.quote-total span, .quote-totals span {
    color: var(--muted);
    font-weight: 700;
}
.quote-total strong {
    display: block;
    margin-top: 6px;
    color: var(--primary);
    font-size: 2rem;
}
.quote-totals {
    display: grid;
    gap: 8px;
    margin-left: auto;
    max-width: 340px;
}
.quote-totals p {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
}
.quote-totals p:last-child {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    font-size: 1.2rem;
}
.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    max-width: 320px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hero, .split-section, .dashboard-grid, .app-shell {
        grid-template-columns: 1fr;
    }
    .module-grid, .preview-grid, .feature-grid, .pricing-grid, .testimonials {
        grid-template-columns: 1fr;
    }
    .topbar, .nav-shell, .footer, .quote-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .nav-links, .footer nav { flex-wrap: wrap; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .quote-total { width: 100%; text-align: left; }
}

@media (max-width: 560px) {
    .hero { padding-top: 42px; }
    .metric-grid, .sidebar nav { grid-template-columns: 1fr; }
    .panel-heading { flex-direction: column; }
}
