:root {
    --bg: #f3f5f7;
    --bg-warm: #f7f4ef;
    --card: #ffffff;
    --text: #17212b;
    --muted: #64717c;
    --brand-navy: #0F1B2D;
    --brand-blue: #1E5BAA;
    --brand-slate: #58646E;
    --accent: #D75B32;
    --accent-dark: #a94425;
    --line: #dbe1e6;
    --ok: #1f7a45;
    --danger: #b42318;
    --shadow: 0 10px 30px rgba(15, 27, 45, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(30, 91, 170, .10), transparent 26rem),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 38%, #fff 100%);
    line-height: 1.5;
}
a { color: var(--brand-blue); }
.header {
    background: rgba(15, 27, 45, .98);
    color: #fff;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(15, 27, 45, .15);
}
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 18px;
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand {
    display: flex;
    align-items: center;
    min-width: 260px;
}
.brand-logo {
    display: block;
    width: 285px;
    max-width: 100%;
    height: auto;
}
.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav a {
    color: #fff;
    text-decoration: none;
    opacity: .92;
    font-weight: 700;
    font-size: 14px;
}
.nav a:hover { opacity: 1; color: #f7c1ad; }
.nav .nav-cta {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 9px 14px;
}
.nav .nav-cta:hover { background: var(--accent-dark); color: #fff; }
.hero {
    padding: 54px 0 28px;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    gap: 30px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: .96;
    letter-spacing: -2px;
    margin: 16px 0 18px;
    color: var(--brand-navy);
}
.hero .lead {
    max-width: 740px;
    color: var(--brand-slate);
    font-size: 20px;
    margin: 0 0 22px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.hero-panel {
    background: var(--brand-navy);
    color: #fff;
    border-radius: 24px;
    padding: 24px;
    min-height: 310px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.hero-panel:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(30,91,170,.55), transparent 44%),
        repeating-linear-gradient(0deg, transparent 0 27px, rgba(255,255,255,.055) 28px),
        repeating-linear-gradient(90deg, transparent 0 27px, rgba(255,255,255,.055) 28px);
}
.hero-panel > * { position: relative; z-index: 1; }
.blueprint-gasket {
    width: 100%;
    height: 210px;
    margin-top: 12px;
}
.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.feature-pill {
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(219,225,230,.9);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(15,27,45,.05);
}
.feature-pill strong { display: block; color: var(--brand-navy); }
.feature-pill span { color: var(--muted); font-size: 13px; }
.grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 22px;
    align-items: start;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; color: var(--brand-navy); }
.quote-card {
    border-top: 5px solid var(--brand-blue);
}
.info-card {
    border-top: 5px solid var(--accent);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
label {
    display: block;
    margin: 0 0 6px;
    font-weight: 800;
    color: var(--brand-navy);
}
input, select, textarea {
    width: 100%;
    border: 1px solid #cbd4dc;
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(30,91,170,.14);
    border-color: var(--brand-blue);
}
textarea { min-height: 130px; }
.help {
    font-size: 13px;
    color: var(--muted);
    margin-top: 5px;
}
.field { margin-bottom: 15px; }
.btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 900;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(215,91,50,.22);
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary {
    background: var(--brand-navy);
    box-shadow: 0 8px 20px rgba(15,27,45,.18);
}
.btn.outline {
    background: transparent;
    color: var(--brand-navy);
    border: 2px solid var(--brand-navy);
    box-shadow: none;
}
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin: 16px 0;
}
.alert.error { background: #fff0ee; color: var(--danger); border: 1px solid #ffc7bd; }
.alert.ok { background: #edf9f2; color: var(--ok); border: 1px solid #bde6ce; }
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding: 9px 0;
}
.summary-row strong:last-child, .summary-row span:last-child { text-align: right; }
.total {
    font-size: 24px;
    font-weight: 900;
}
.badge {
    display: inline-block;
    background: #e9f0fa;
    color: var(--brand-blue);
    border: 1px solid #d2e1f3;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 900;
}
.brand-kicker {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 13px;
}
.footer {
    margin-top: 40px;
    padding: 34px 0;
    color: #dbe1e6;
    font-size: 14px;
    background: var(--brand-navy);
}
.footer a { color: #fff; }
.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}
.footer-logo {
    width: 260px;
    max-width: 100%;
    display: block;
    filter: brightness(1.8);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
th, td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 10px;
}
th { background: #f1f5f8; color: var(--brand-navy); }
.admin-wrap { padding: 30px 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.file-preview {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: #fbfaf8;
}
.file-preview-title { font-weight: 900; font-size: 18px; margin-bottom: 2px; color: var(--brand-navy); }
.file-preview-name { color: var(--muted); font-size: 13px; margin-bottom: 12px; overflow-wrap: anywhere; }
.file-preview-img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.file-preview-svg { min-height: 180px; }
.file-preview-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.file-preview-placeholder, .file-preview-empty { background: #fff; border: 1px dashed #cfc8bf; border-radius: 10px; padding: 18px; color: var(--muted); }
.dxf-preview-shell { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.dxf-preview-canvas { display: block; width: 100%; height: auto; background: #fff; }
.dxf-preview-status { border-top: 1px solid var(--line); padding: 10px 12px; font-size: 13px; color: var(--muted); background: #fcfbfa; }
.dxf-preview-status.ok { color: var(--ok); }
.dxf-preview-status.error { color: var(--danger); }
@media (max-width: 900px) {
    .hero-grid, .grid, .feature-strip { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .header .container { flex-direction: column; align-items: flex-start; }
    .nav { justify-content: flex-start; }
    .brand-logo { width: 250px; }
    .footer-grid { grid-template-columns: 1fr; }
}


/* Logo cleanup: single-colour wordmark, no clipping */
.header { background: #0F1B2D; }
.brand { min-width: 0; flex: 0 1 auto; }
.brand-logo {
    width: 400px;
    max-width: min(400px, 78vw);
    max-height: 92px;
    display: block;
}
@media (max-width: 1100px) {
    .brand-logo { width: 350px; max-width: 76vw; }
}
@media (max-width: 900px) {
    .brand-logo { width: min(360px, 92vw); max-width: 92vw; }
}


/* Footer logo contrast fix */
.footer-logo {
    width: 400px;
    max-width: min(400px, 92vw);
    filter: none;
}
@media (max-width: 900px) {
    .footer-logo { width: min(360px, 92vw); }
}
