:root {
    --bg: #f4f2ea;
    --panel: #ffffff;
    --panel-soft: #faf8f2;
    --ink: #181a1f;
    --muted: #69707d;
    --line: #e3e0d6;
    --brand: #ff8a00;
    --brand-dark: #1f2328;
    --brand-soft: #fff1db;
    --success: #147d4f;
    --danger: #b42318;
    --shadow: 0 26px 80px rgba(23, 26, 31, .12);
    --glass: rgba(255, 255, 255, .72);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 138, 0, .20), transparent 30rem),
        radial-gradient(circle at 92% 8%, rgba(40, 44, 52, .09), transparent 24rem),
        linear-gradient(180deg, #fbfaf6 0%, var(--bg) 100%);
    color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}
body.nav-collapsed .shell { grid-template-columns: 84px minmax(0, 1fr); }
body.nav-collapsed .brand div,
body.nav-collapsed .nav a,
body.nav-collapsed .logout { font-size: 0; justify-content: center; }
body.nav-collapsed .nav a::first-letter,
body.nav-collapsed .logout::first-letter { font-size: 16px; }
body.nav-collapsed .brand { justify-content: center; padding-inline: 0; gap: 0; }
body.nav-collapsed .brand div { display: none; }
body.nav-collapsed .brand img { width: 42px; height: 42px; border-radius: 11px; }
body.nav-collapsed .side-toggle { font-size: 0; padding-inline: 0; }
body.nav-collapsed .side-toggle::after { content: "Aç"; font-size: 13px; }

.side {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255,138,0,.08), transparent 22rem),
        #15171c;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 22px;
}
.side-toggle {
    width: 100%;
    margin-bottom: 12px;
    min-height: 38px;
}
.brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 28px rgba(255,138,0,.28); }
.brand strong { display: block; font-size: 18px; letter-spacing: .2px; }
.brand span { display: block; color: #aeb6c2; font-size: 12px; margin-top: 2px; }

.nav { display: grid; gap: 6px; }
.nav a, .logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border: 0;
    border-radius: 10px;
    color: #eef1f4;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.nav a:hover, .logout:hover, .nav a.active {
    background: rgba(255,255,255,.09);
    box-shadow: inset 3px 0 0 var(--brand);
}

.mobile-bar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 14px;
    background: rgba(250,248,242,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
body.quote-focus .mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
body.quote-focus .shell {
    display: block;
}
body.quote-focus .side {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: var(--shadow);
}
body.quote-focus.nav-collapsed .shell { display: block; }
body.quote-focus.nav-collapsed .side { transform: translateX(-105%); }
body.quote-focus.nav-collapsed.menu-open .side { transform: translateX(0); }
body.quote-focus.menu-open .side { transform: translateX(0); }
body.quote-focus.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(0,0,0,.36);
}
body.quote-focus .main {
    padding: 18px clamp(14px, 2vw, 28px) 34px;
}
body.quote-focus .top {
    display: none;
}
.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-weight: 900;
}

.main { min-width: 0; padding: 30px; }
.top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(227,224,214,.82);
    border-radius: 18px;
    background: var(--glass);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(23,26,31,.07);
}
.command-zone { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { color: var(--brand); font-weight: 800; font-size: 12px; text-transform: uppercase; }
h1, h2 { letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.05; }
h2 { font-size: 18px; margin: 0 0 14px; }
.muted { color: var(--muted); }

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card {
    background: rgba(255,255,255,.78);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 18px 50px rgba(23,26,31,.055);
    backdrop-filter: blur(14px);
}
.metric { font-size: 24px; line-height: 1.1; font-weight: 850; margin-top: 6px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 10px 15px;
    background: var(--brand);
    color: #151515;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255,138,0,.22);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(255,138,0,.24); }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.warn { background: var(--brand-soft); color: #5c3200; border: 1px solid #ffd8a3; box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.18); box-shadow: none; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    outline: none;
    font-size: 16px;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(255,138,0,.13);
}
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #373b43; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.compact-table th, .compact-table td { padding: 10px 11px; font-size: 13px; }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); background: #fbfaf7; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef0f2;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.ok { background: #e3f6ec; color: var(--success); }
.bad { background: #fee4e2; color: var(--danger); }
.notice {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7e8;
    border: 1px solid #ffd8a3;
    margin-bottom: 16px;
}
.errors { background: #fff0f0; border-color: #ffd0d0; }

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
    background: #171a1f;
    color: #fff;
}
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 64px);
    overflow: hidden;
}
.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(23,26,31,.82), rgba(23,26,31,.46)), url("/images/genc-elektrik-logo.png") center / cover;
    opacity: .9;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-logo { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; box-shadow: 0 0 45px rgba(255,138,0,.38); }
.auth-title { max-width: 760px; }
.auth-title h1 { font-size: clamp(38px, 7vw, 82px); }
.auth-title p { max-width: 560px; color: #e2e4e7; font-size: 18px; line-height: 1.55; }
.auth-panel {
    display: grid;
    place-items: center;
    padding: 28px;
    background: #f7f4ec;
    color: var(--ink);
}
.auth-card { width: min(460px, 100%); background: #fff; border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.step {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }

.landing {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(255,138,0,.22), transparent 30rem),
        radial-gradient(circle at 82% 0%, rgba(255,255,255,.12), transparent 24rem),
        #171a1f;
    color: #fff;
}
.landing-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 18px;
}
.landing-brand img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 34px rgba(255,138,0,.32);
}
.landing-hero {
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 88px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    padding: 34px 0 72px;
}
.landing-copy h1 {
    font-size: clamp(48px, 8vw, 104px);
    line-height: .92;
    margin: 10px 0 22px;
}
.lead {
    max-width: 720px;
    color: #e6e8eb;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.55;
}
.hero-actions { margin-top: 28px; }
.landing-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.landing-proof span {
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: #f4f6f8;
    background: rgba(255,255,255,.06);
    font-weight: 750;
    font-size: 13px;
}
.landing-preview {
    position: relative;
    min-height: 560px;
    border-radius: 28px;
    overflow: hidden;
    background: #24272d;
    box-shadow: 0 34px 110px rgba(0,0,0,.36);
}
.landing-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(23,26,31,.86));
}
.landing-preview img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    opacity: .82;
}
.preview-panel {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    display: grid;
    gap: 10px;
}
.preview-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(12px);
}
.preview-row strong { color: #ffb34d; white-space: nowrap; }
.landing-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 80px 0;
}
.section-head {
    display: grid;
    grid-template-columns: .55fr 1.45fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 28px;
}
.section-head h2, .split-band h2, .landing-cta h2 {
    font-size: clamp(30px, 4vw, 56px);
    line-height: 1.02;
    margin: 0;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.feature {
    min-height: 190px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(255,255,255,.07);
}
.feature strong { display: block; font-size: 18px; margin-bottom: 10px; }
.feature p, .flow p { color: #cbd0d7; line-height: 1.55; margin: 0; }
.split-band {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 30px;
    align-items: start;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.flow {
    display: grid;
    gap: 14px;
}
.flow div {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px 16px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
}
.flow span {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--brand);
    color: #171a1f;
    font-weight: 900;
}
.landing-cta {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    border-radius: 28px 28px 0 0;
    background: #f7f4ec;
    color: var(--ink);
}
.landing-cta .actions { flex-shrink: 0; }

.quote-workspace {
    display: grid;
    grid-template-columns: minmax(360px, .96fr) minmax(520px, 1.04fr);
    align-items: start;
    gap: 24px;
    overflow: visible;
}
.quote-workspace.pdf-mode {
    grid-template-columns: minmax(0, 1fr);
}
.quote-workspace > .grid { min-width: 0; }
.quote-workspace.pdf-mode > .grid {
    display: none;
}
.quote-workspace.pdf-mode .quote-builder-card,
.quote-workspace.pdf-mode .quote-items-card,
.quote-workspace.pdf-mode .quote-total-card { display: none; }
.quote-workspace.pdf-mode .quote-summary {
    position: static;
    width: 100%;
}
.quote-workspace.pdf-mode .quote-paper {
    width: min(100%, 980px);
    min-height: 1280px;
}
.quote-workspace.pdf-mode .quote-paper-panel {
    min-height: calc(100vh - 142px);
}
.quote-summary { position: static; min-width: 0; max-width: 100%; z-index: 1; display: grid; gap: 16px; }
.quote-summary .card {
    background:
        radial-gradient(circle at top right, rgba(255,138,0,.24), transparent 12rem),
        #171a1f;
    color: #fff;
    border-color: #171a1f;
}
.quote-summary .muted { color: #b6bdc7; }
.quote-total { font-size: 34px; font-weight: 900; }
.quote-paper-panel {
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.68));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 18px 50px rgba(23,26,31,.055);
}
.paper-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.paper-toolbar h2 { margin: 0; }
.quote-paper {
    width: min(100%, 794px);
    min-height: 1123px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(23,26,31,.16);
    color: #24272d;
}
.paper-top {
    position: relative;
    min-height: 170px;
    padding: 30px 42px;
    background:
        linear-gradient(135deg, #15171c 0%, #2c3036 62%, #ff8a00 62%, #ffad3d 100%);
    color: #fff;
}
.paper-logo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 0 32px rgba(255,138,0,.32);
    background: rgba(255,255,255,.08);
}
.paper-title {
    position: absolute;
    right: 42px;
    bottom: 30px;
    max-width: 360px;
    text-align: right;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
}
.paper-info {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 42px 12px;
    font-size: 13px;
}
.paper-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}
.paper-info .right { text-align: right; }
.quote-paper-table {
    width: calc(100% - 84px);
    margin: 14px 42px 0;
    border-collapse: collapse;
    min-width: 0;
    font-size: 13px;
}
.quote-paper-table th {
    padding: 10px 12px;
    background: #1f2328;
    color: #fff;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.quote-paper-table td {
    padding: 10px 12px;
    border-bottom: 2px solid #dce3ec;
}
.quote-paper-table th:nth-child(2),
.quote-paper-table td:nth-child(2) { text-align: center; width: 18%; }
.quote-paper-table th:nth-child(3),
.quote-paper-table td:nth-child(3) { text-align: right; width: 24%; font-weight: 850; }
.paper-total-zone {
    display: grid;
    justify-items: end;
    gap: 8px;
    padding: 20px 42px 8px;
}
.paper-recipient {
    color: #5c3200;
    font-weight: 850;
    text-transform: uppercase;
}
.paper-pill {
    display: inline-flex;
    padding: 9px 18px;
    border-radius: 999px;
    background: #ff8a00;
    color: #151515;
    font-weight: 900;
}
.paper-pill[hidden] { display: none; }
.paper-pill.secondary { background: #2b3036; color: #fff; }
.paper-cell {
    border: 1px solid transparent;
    background: transparent;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 13px;
}
.paper-cell:focus {
    border-color: #9ac7ff;
    box-shadow: 0 0 0 3px rgba(73, 150, 255, .14);
    background: #fff;
}
.paper-qty {
    text-align: center;
    max-width: 92px;
    margin: 0 auto;
}
.paper-price-cell {
    display: grid;
    grid-template-columns: minmax(86px, 1fr) auto 28px;
    align-items: center;
    gap: 8px;
}
.paper-price-cell strong {
    white-space: nowrap;
}
.paper-discount {
    margin-top: 4px;
    color: #717985;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.35;
}
.paper-delete {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #fee4e2;
    color: var(--danger);
    font-weight: 900;
    cursor: pointer;
}
.paper-note {
    margin: 18px 42px 26px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #62676f;
    color: #fff;
    text-align: center;
    line-height: 1.45;
    font-size: 12px;
}
body.quote-focus .quote-studio-head {
    margin-top: 12px;
}
body.quote-focus .quote-studio-head h2 {
    font-size: clamp(22px, 3vw, 40px);
}
.two-col { grid-template-columns: 1fr 1fr; }
.inline-details {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.54);
}
.inline-details summary {
    cursor: pointer;
    font-weight: 850;
}
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.quote-studio-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid rgba(227,224,214,.82);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(255,138,0,.18), transparent 18rem),
        rgba(255,255,255,.80);
    box-shadow: 0 18px 55px rgba(23,26,31,.06);
    backdrop-filter: blur(14px);
}
.quote-studio-head h2 {
    margin: 4px 0 7px;
    font-size: clamp(22px, 2.7vw, 34px);
}
.quote-studio-head p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.studio-pill-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 260px;
}
.studio-pill-grid span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: #373b43;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}
.mode-tab {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 850;
    cursor: pointer;
}
.mode-tab.active {
    background: #171a1f;
    color: #fff;
    border-color: #171a1f;
}
.mode-help {
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid #ffd8a3;
    color: #5c3200;
    font-weight: 750;
    line-height: 1.4;
}
.dealer-tip {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #d7dce3;
    font-size: 13px;
    line-height: 1.45;
}
.search-box {
    position: relative;
    display: block;
}
.search-results {
    position: absolute;
    z-index: 45;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 6px;
    max-height: 330px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow);
}
.search-results[hidden] { display: none; }
.search-result {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.search-result:hover { background: #fff7e8; }
.search-result strong { color: var(--brand); }
.search-result span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result em {
    color: var(--muted);
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}
body.quote-focus.nav-collapsed .shell { grid-template-columns: 84px minmax(0, 1fr); }
.floating-cart {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: min(520px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.pdf-frame {
    width: 100%;
    min-height: 72vh;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.preview-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0,0,0,.42);
}
.preview-drawer[hidden] { display: none; }
.preview-sheet {
    width: min(720px, 100%);
    max-height: 86vh;
    overflow: auto;
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.preview-sheet.compact-modal { width: min(560px, 100%); }
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.page-link, .page-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-weight: 800;
    font-size: 13px;
}
.page-link.disabled { opacity: .45; }
.page-info { color: var(--muted); }

@media (max-width: 1180px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quote-workspace { grid-template-columns: 1fr; }
    .quote-workspace.pdf-mode { grid-template-columns: 1fr; }
    .quote-workspace.pdf-mode > .grid { display: none; }
    .quote-summary { position: static; }
}

@media (max-width: 860px) {
    .mobile-bar { display: flex; justify-content: space-between; align-items: center; }
    .shell { display: block; }
    .side {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: min(86vw, 320px);
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: var(--shadow);
    }
    body.menu-open .side { transform: translateX(0); }
    body.menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0,0,0,.36);
    }
    .main { padding: 16px; }
    .top { flex-direction: column; border-radius: 14px; padding: 14px; }
    .command-zone { width: 100%; justify-content: stretch; }
    .command-zone > * { flex: 1 1 100%; }
    .form-grid, .stats { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .card { padding: 15px; border-radius: 12px; }
    .quote-studio-head {
        display: grid;
        padding: 16px;
        border-radius: 14px;
    }
    .studio-pill-grid {
        min-width: 0;
        justify-content: flex-start;
    }
    .actions .btn, .actions select, .actions input { flex: 1 1 100%; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { min-height: 42vh; padding: 24px; }
    .auth-panel { padding: 16px; }
    table { min-width: 0; }
    .table-wrap { overflow: visible; border: 0; background: transparent; }
    .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; width: 100%; }
    .table-wrap thead { display: none; }
    .table-wrap tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }
    .table-wrap td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid var(--line);
        text-align: right;
    }
    .table-wrap td::before {
        content: attr(data-label);
        min-width: 96px;
        color: var(--muted);
        font-weight: 850;
        text-align: left;
    }
    .table-wrap td:empty { display: none; }
    .quote-items td { display: grid; grid-template-columns: 1fr; text-align: left; }
    .quote-items td::before { min-width: 0; }
    .quote-paper-panel { padding: 10px; border-radius: 14px; }
    .paper-toolbar { align-items: flex-start; flex-direction: column; }
    .quote-paper {
        width: 100%;
        min-height: auto;
        border-radius: 12px;
    }
    .paper-top { min-height: 132px; padding: 20px; }
    .paper-logo { width: 72px; height: 72px; border-radius: 12px; }
    .paper-title {
        right: 20px;
        bottom: 20px;
        max-width: 210px;
        font-size: 16px;
    }
    .paper-info {
        padding: 18px 20px 8px;
        display: grid;
    }
    .paper-info .right { text-align: left; }
    .quote-paper-table {
        width: calc(100% - 40px);
        margin: 12px 20px 0;
        font-size: 12px;
    }
    .quote-paper-table th,
    .quote-paper-table td { padding: 8px 7px; }
    .paper-total-zone { padding: 16px 20px 8px; align-items: stretch; }
    .paper-pill { width: 100%; justify-content: center; text-align: center; }
    .paper-note { margin: 14px 20px 20px; }
    .search-results {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
        max-height: min(52vh, 420px);
    }
    .search-result {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .search-result span { white-space: normal; }
    .money { text-align: right; }
    .floating-cart {
        left: 12px;
        right: 12px;
        bottom: 12px;
        display: grid;
    }
    .landing-nav {
        align-items: flex-start;
        flex-direction: column;
    }
    .landing-nav .actions { width: 100%; }
    .landing-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 20px;
    }
    .landing-preview { min-height: 360px; border-radius: 20px; }
    .landing-preview img { min-height: 360px; }
    .section-head, .feature-grid, .split-band {
        grid-template-columns: 1fr;
    }
    .feature { min-height: auto; }
    .landing-section { padding: 54px 0; }
    .landing-cta {
        display: grid;
        padding: 24px;
        border-radius: 22px 22px 0 0;
    }
}
