:root {
    --navy: #0f2a44;
    --steel: #1e4d7b;
    --mist: #eef3f8;
}

body {
    background: linear-gradient(180deg, #eef3f8 0%, #f7f9fc 40%, #ffffff 100%);
    min-height: 100vh;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.bg-navy { background: var(--navy) !important; }

.stat-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid var(--steel);
    border-radius: .5rem;
    padding: 1rem 1.1rem;
    height: 100%;
}

.order-id {
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--navy);
}

.sketch-box {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: .5rem;
    padding: .75rem;
    display: inline-block;
}

.checklist-item.done {
    background: #e8f7ee;
}

/* —— Калькулятор окон —— */
.calc-page {
    max-width: none;
    width: 100%;
}

.calc-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: .75rem;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(15, 42, 68, .04);
}

.calc-step {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .85rem;
    font-size: 1.05rem;
}

.calc-hint {
    color: #5b6b7c;
    font-size: .92rem;
}

.layout-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.layout-btn {
    width: 78px;
    height: 72px;
    border: 2px solid #c5d3e2;
    background: #fff;
    border-radius: .55rem;
    color: #3d556e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    transition: border-color .15s, background .15s, color .15s;
}

.layout-btn svg { width: 52px; height: 38px; }

.layout-btn span { font-size: .75rem; font-weight: 600; }

.layout-btn:hover { border-color: #3d7ab8; }

.layout-btn.active {
    border-color: #1e5a96;
    background: #e8f2fb;
    color: #12406d;
    box-shadow: 0 0 0 1px #1e5a96 inset;
}

.calc-stage {
    background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
    border: 1px dashed #c5d3e2;
    border-radius: .65rem;
    padding: 1rem;
}

.dim-row { display: flex; justify-content: center; margin-bottom: .5rem; }

.calc-stage-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    .calc-stage-body { flex-wrap: wrap; }
}

.window-stage {
    flex: 1 1 auto;
    min-height: 220px;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    max-width: 100%;
    padding: .25rem 0;
}

.window-stage.wide {
    flex: 1 1 100%;
}

.window-svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.window-stage.wide .window-svg {
    width: 100%;
}

.dim-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: #5b6b7c;
    min-width: 110px;
}

.dim-input input {
    width: 120px;
    font-weight: 700;
    color: var(--navy);
}

.dim-height { align-self: center; }

.sash-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: .85rem;
    font-size: .82rem;
    color: #5b6b7c;
}

.handle-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px dashed #c5d3e2;
}

.handle-cell {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: .5rem;
    padding: .65rem .75rem;
}

.handle-cell.is-disabled {
    opacity: .55;
    background: #f7f9fc;
}

.handle-cell-title {
    font-size: .8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .35rem;
}

.handle-cell .btn.active {
    background: #1e5a96;
    border-color: #1e5a96;
    color: #fff;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: .35rem;
    border: 2px solid #94a3b8;
    padding: 0;
    cursor: pointer;
}

.color-swatch.active {
    outline: 2px solid #1e5a96;
    outline-offset: 2px;
}

.sash-legend .lg {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    margin-right: .35rem;
    vertical-align: -2px;
    border: 1px solid #24486f;
}

.lg-fixed { background: #9ec5e8; }
.lg-turn { background: #7eb6e6; }
.lg-tilt { background: #5aa4df; }

.calc-pricebar {
    position: sticky;
    bottom: .75rem;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #0f2a44;
    color: #fff;
    border-radius: .85rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 42, 68, .28);
}

.price-label { font-size: .85rem; opacity: .8; }
.price-value { font-size: 1.85rem; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.price-sub { font-size: .8rem; opacity: .75; margin-top: .15rem; }

.btn-accent {
    background: #e85d04;
    border-color: #e85d04;
    color: #fff;
    font-weight: 700;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
}

.btn-accent:hover {
    background: #d00000;
    border-color: #d00000;
    color: #fff;
}

@media (max-width: 576px) {
    .price-value { font-size: 1.45rem; }
    .calc-pricebar { position: static; }
}

@media print {
    .navbar, footer, .no-print, .alert, .calc-pricebar { display: none !important; }
    main { padding: 0 !important; }
}
