:root {
    --navy: #17324d;
    --navy-dark: #0e2539;
    --blue: #176b87;
    --blue-light: #eaf5f8;
    --green: #178064;
    --green-light: #eaf7f2;
    --text: #1c2b36;
    --muted: #657582;
    --line: #dce4e8;
    --background: #f4f7f8;
    --white: #ffffff;
    --danger: #b42318;
    --danger-light: #fff1f0;
    --shadow: 0 18px 45px rgba(23, 50, 77, 0.09);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin-inline: auto;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--navy);
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    letter-spacing: 0.04em;
}

.brand small,
.secure-note {
    color: var(--muted);
    font-size: 13px;
}

.page-content {
    padding-block: 48px 72px;
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.6fr);
    gap: 32px;
    align-items: start;
}

.intro-panel {
    position: sticky;
    top: 28px;
    padding: 10px 6px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    color: var(--navy-dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.lead {
    color: var(--muted);
    font-size: 17px;
}

.steps {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.step {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--muted);
    font-size: 14px;
}

.step-number {
    width: 28px;
    height: 28px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    font-weight: 700;
}

.step.active {
    color: var(--navy);
    font-weight: 700;
}

.step.active .step-number {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

.card {
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid rgba(220, 228, 232, 0.9);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.card-header {
    margin-bottom: 28px;
}

.card-header h2 {
    margin-bottom: 7px;
    color: var(--navy-dark);
    font-size: 24px;
}

.card-header p {
    margin-bottom: 0;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: var(--navy-dark);
    font-size: 14px;
    font-weight: 700;
}

.required-mark {
    color: var(--danger);
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #c9d4da;
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    font: inherit;
    transition: border-color 150ms, box-shadow 150ms;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(23, 107, 135, 0.12);
}

.field-error {
    margin: 6px 0 0;
    color: var(--danger);
    font-size: 13px;
    font-weight: 650;
}

.error-summary {
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #f2b8b5;
    border-radius: 10px;
    background: var(--danger-light);
    color: var(--danger);
}

.details-panel {
    margin-top: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfcfc;
}

.details-panel summary {
    padding: 17px 19px;
    cursor: pointer;
    color: var(--navy);
    font-weight: 750;
}

.details-content {
    padding: 4px 19px 22px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--green);
    color: var(--white);
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: #106b53;
}

.button-secondary {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--line);
}

.button-secondary:hover {
    background: #f7f9fa;
}

.helper {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .secure-note {
        display: none;
    }

    .page-content {
        padding-block: 28px 48px;
    }

    .page-grid {
        grid-template-columns: 1fr;
    }

    .intro-panel {
        position: static;
    }

    .steps {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .card {
        padding: 22px 18px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .button {
        width: 100%;
    }
}

.status-banner {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid #b9dfd1;
    border-radius: 10px;
    background: var(--green-light);
    color: #12644f;
    font-weight: 650;
}

.draft-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.draft-summary h2,
.draft-summary p {
    margin-bottom: 3px;
}

.draft-summary a {
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
}

.draft-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.path-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.path-fieldset legend {
    margin-bottom: 14px;
    color: var(--navy-dark);
    font-size: 18px;
    font-weight: 750;
}

.path-list {
    display: grid;
    gap: 13px;
}

.path-option {
    display: block;
    cursor: pointer;
}

.path-option > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.path-card-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
    transition: border-color 150ms, background 150ms, box-shadow 150ms;
}

.path-option:hover .path-card-inner {
    border-color: #93b5c2;
    background: #fbfdfd;
}

.path-option input:checked + .path-card-inner {
    border-color: var(--blue);
    background: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.1);
}

.path-option input:focus-visible + .path-card-inner {
    outline: 3px solid rgba(23, 107, 135, 0.25);
}

.path-icon {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    background: #eef2f4;
    color: var(--navy);
    font-weight: 800;
}

.path-copy,
.path-title,
.path-description {
    display: block;
}

.path-copy {
    flex: 1;
}

.path-title {
    color: var(--navy-dark);
    font-weight: 750;
}

.path-description {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.path-check {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid #b8c5cc;
    border-radius: 50%;
    color: transparent;
    font-size: 14px;
}

.path-option input:checked + .path-card-inner .path-check {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
}

.tag {
    margin-left: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
}

.empty-note {
    margin-top: 22px;
    padding: 15px 17px;
    border-radius: 10px;
    background: #f5f7f8;
    color: var(--muted);
    font-size: 14px;
}

.empty-note strong {
    color: var(--navy);
}

@media (max-width: 620px) {
    .draft-summary {
        flex-direction: column;
    }

    .path-card-inner {
        align-items: flex-start;
    }

    .path-check {
        display: none;
    }
}

.list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.list-header h1 {
    margin-bottom: 8px;
}

.list-header .lead {
    margin-bottom: 0;
}

.quotation-list {
    display: grid;
    gap: 14px;
}

.quotation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 26px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 8px 25px rgba(23, 50, 77, 0.05);
}

.quotation-main {
    min-width: 0;
}

.quotation-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 12px;
}

.draft-badge {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 800;
}

.quotation-row h2 {
    margin-bottom: 2px;
    color: var(--navy-dark);
    font-size: 21px;
}

.quotation-customer {
    margin-bottom: 8px;
    color: var(--navy);
    font-weight: 650;
}

.quotation-description {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.quotation-actions {
    display: grid;
    flex: 0 0 auto;
    gap: 9px;
    text-align: center;
}

.edit-link {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.empty-state {
    max-width: 650px;
    margin-inline: auto;
    text-align: center;
}

.empty-state p {
    max-width: 470px;
    margin: 0 auto 24px;
    color: var(--muted);
}

.empty-symbol {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 15px;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 30px;
}

@media (max-width: 700px) {
    .list-header,
    .quotation-row {
        align-items: stretch;
        flex-direction: column;
    }

    .list-header .button {
        width: 100%;
    }
}


/* SISSO-9 review workspace */

.review-page {
    display: grid;
    gap: 24px;
}

.review-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.review-hero h1 {
    margin-bottom: 8px;
}

.review-readiness {
    max-width: 330px;
    padding: 14px 16px;
    border: 1px solid #f0c3bf;
    border-radius: 12px;
    background: var(--danger-light);
    color: var(--danger);
}

.review-readiness.is-ready {
    border-color: #b9dfd2;
    background: var(--green-light);
    color: var(--green);
}

.review-readiness strong,
.review-readiness span {
    display: block;
}

.review-readiness span {
    margin-top: 3px;
    font-size: 13px;
}

.workflow-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    list-style: none;
}

.workflow-bar li {
    padding: 13px 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.workflow-bar li span {
    margin-left: 5px;
}

.workflow-bar .is-complete {
    color: var(--green);
    background: var(--green-light);
}

.workflow-bar .is-current {
    color: var(--white);
    background: var(--blue);
}

.review-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.review-totals > div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.review-totals span,
.price-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.review-totals strong {
    display: block;
    margin-top: 5px;
    color: var(--navy-dark);
    font-size: 21px;
}

.review-filters {
    position: sticky;
    z-index: 10;
    top: 10px;
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(23, 50, 77, 0.07);
}

.review-filters a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.review-filters a span {
    min-width: 24px;
    padding: 2px 6px;
    border-radius: 99px;
    background: var(--background);
    text-align: center;
}

.review-filters a.is-active {
    background: var(--navy);
    color: var(--white);
}

.review-filters a.is-active span {
    background: rgba(255, 255, 255, 0.16);
}

.review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: start;
}

.review-sections,
.review-item-list {
    display: grid;
    gap: 18px;
}

.review-section {
    scroll-margin-top: 86px;
}

.review-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--navy);
    color: var(--white);
}

.review-section-header span {
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.75;
}

.review-section-header h2 {
    margin: 3px 0 0;
    font-size: 21px;
}

.review-section-header p {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.78;
}

.section-summary {
    flex: 0 0 auto;
    text-align: right;
}

.section-summary strong {
    display: block;
    margin-top: 3px;
}

.review-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 8px 26px rgba(23, 50, 77, 0.05);
}

.review-item.needs-review {
    border-left: 4px solid #d59b23;
}

.review-item.has-error {
    border-left: 4px solid var(--danger);
}

.review-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.position-heading {
    display: flex;
    min-width: 0;
    gap: 13px;
}

.position-number {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.position-heading h3 {
    margin-bottom: 7px;
    color: var(--navy-dark);
    font-size: 17px;
}

.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 99px;
    background: var(--background);
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.badge-warning {
    background: #fff6df;
    color: #8a5b00;
}

.badge-error {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-success {
    background: var(--green-light);
    color: var(--green);
}

.item-total {
    flex: 0 0 auto;
    color: var(--navy-dark);
    font-size: 18px;
}

.customer-view {
    padding: 20px;
}

.area-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.area-heading span {
    color: var(--navy);
    font-weight: 800;
}

.area-heading small {
    color: var(--muted);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.price-grid > div {
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--background);
}

.price-grid strong {
    display: block;
    margin-top: 2px;
}

.long-text {
    max-height: 230px;
    padding: 14px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #3d4d58;
    font-size: 14px;
}

.empty-text {
    color: var(--muted);
    font-style: italic;
}

.item-messages,
.item-questions,
.review-alert {
    margin: 0 20px 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff8e7;
    color: #775313;
    font-size: 13px;
}

.item-messages p,
.item-questions p,
.review-alert p {
    margin-bottom: 6px;
}

.item-messages p:last-child,
.item-questions p:last-child,
.review-alert p:last-child {
    margin-bottom: 0;
}

.item-messages .is-error,
.review-alert-error {
    color: var(--danger);
}

.review-alert-error {
    margin: 0;
    border: 1px solid #f0c3bf;
    background: var(--danger-light);
}

.internal-calculation {
    border-top: 1px solid var(--line);
    background: #fafcfc;
}

.internal-calculation summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    color: var(--navy);
    font-weight: 750;
}

.internal-calculation summary span {
    color: var(--muted);
    font-size: 12px;
}

.internal-content {
    padding: 0 20px 20px;
}

.calculation-table-wrap {
    overflow-x: auto;
}

.calculation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.calculation-table th,
.calculation-table td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.calculation-table th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.additional-costs,
.calculation-note {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 9px;
    background: var(--white);
    font-size: 13px;
}

.additional-costs p {
    margin: 5px 0 0;
}

.review-sidebar {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 14px;
}

.sidebar-card {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
}

.sidebar-card h2 {
    margin-bottom: 12px;
    color: var(--navy-dark);
    font-size: 15px;
}

.sidebar-card > a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-card > a:last-child {
    border-bottom: 0;
}

.sidebar-card details {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.sidebar-card summary {
    cursor: pointer;
    color: var(--navy);
    font-weight: 700;
}

.sidebar-card details p {
    margin: 8px 0;
    color: var(--muted);
}

.review-empty {
    padding: 30px;
    border: 1px dashed #b8c6cd;
    border-radius: 14px;
    background: var(--white);
    text-align: center;
}

.review-actions {
    position: sticky;
    z-index: 12;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 35px rgba(23, 50, 77, 0.14);
}

.ready-note {
    color: var(--green);
    font-weight: 750;
}

.blocked-note {
    color: var(--danger);
    font-weight: 750;
}

@media (max-width: 900px) {
    .review-layout {
        grid-template-columns: 1fr;
    }

    .review-sidebar {
        position: static;
        grid-row: 1;
    }

    .review-totals {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .review-hero,
    .review-section-header,
    .review-item-header,
    .review-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .review-readiness {
        max-width: none;
    }

    .workflow-bar {
        grid-template-columns: 1fr;
    }

    .workflow-bar li {
        display: none;
    }

    .workflow-bar .is-current {
        display: block;
    }

    .review-totals,
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-summary {
        text-align: left;
    }

    .item-total {
        padding-left: 45px;
    }
}


/* SISSO-9 customer editing */

.customer-edit-panel {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcfc;
}

.customer-edit-panel > summary {
    padding: 13px 15px;
    cursor: pointer;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
}

.customer-edit-form {
    padding: 4px 15px 16px;
}

.customer-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    align-self: end;
    gap: 9px;
    min-height: 48px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
}

.checkbox-field input {
    width: 19px;
    height: 19px;
    accent-color: var(--green);
}

.manual-price-note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff6df;
    color: #775313;
    font-size: 13px;
}

.inline-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

@media (max-width: 680px) {
    .customer-edit-grid {
        grid-template-columns: 1fr;
    }
}


/* SISSO-9 component editing */

.component-editors {
    display: grid;
    gap: 9px;
    margin-top: 16px;
}

.component-editor {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
}

.component-editor > summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px;
    cursor: pointer;
    color: var(--navy);
    font-size: 13px;
    font-weight: 750;
}

.component-editor > summary span:last-child {
    color: var(--blue);
    font-size: 12px;
}

.component-editor-new {
    border-style: dashed;
    background: var(--blue-light);
}

.component-editor-content {
    padding: 4px 13px 14px;
    border-top: 1px solid var(--line);
}

.component-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 13px;
}

.component-form-field label:not(.checkbox-field) {
    display: block;
    margin-bottom: 5px;
    color: var(--navy-dark);
    font-size: 12px;
    font-weight: 750;
}

.component-form-field.field-wide {
    grid-column: 1 / -1;
}

.component-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 14px;
}

.button-small {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
}

.text-button {
    padding: 7px 5px;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.text-button-danger {
    margin-right: auto;
    color: var(--danger);
}

@media (max-width: 760px) {
    .component-form-grid {
        grid-template-columns: 1fr;
    }

    .component-form-field.field-wide {
        grid-column: auto;
    }
}


/* SISSO-9 additional-cost editing */

.additional-cost-editors {
    display: grid;
    gap: 9px;
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.internal-subheading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.internal-subheading strong {
    color: var(--navy-dark);
    font-size: 14px;
}

.internal-subheading span {
    color: var(--muted);
    font-size: 12px;
}

.additional-cost-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 13px;
}

.additional-cost-field label:not(.checkbox-field) {
    display: block;
    margin-bottom: 5px;
    color: var(--navy-dark);
    font-size: 12px;
    font-weight: 750;
}

.additional-cost-field.field-wide {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .additional-cost-form-grid {
        grid-template-columns: 1fr;
    }

    .additional-cost-field.field-wide {
        grid-column: auto;
    }

    .internal-subheading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* SISSO-9 section and item structure */

.section-tools {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin: -4px 0 12px;
}

.section-tools > details {
    position: relative;
}

.section-tools > details > summary {
    padding: 7px 11px;
    cursor: pointer;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    list-style: none;
}

.section-tools > details > summary::-webkit-details-marker {
    display: none;
}

.section-tool-content {
    width: min(680px, calc(100vw - 48px));
    margin-top: 7px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.structure-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.structure-form-field label:not(.checkbox-field) {
    display: block;
    margin-bottom: 5px;
    color: var(--navy-dark);
    font-size: 12px;
    font-weight: 750;
}

.structure-form-field.field-wide {
    grid-column: 1 / -1;
}

.sidebar-card > details > summary {
    cursor: pointer;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.sidebar-form-content {
    margin-top: 12px;
}

.sidebar-form-content .structure-form-grid {
    grid-template-columns: 1fr;
}

.sidebar-form-content .structure-form-field.field-wide {
    grid-column: auto;
}

@media (max-width: 680px) {
    .section-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .section-tool-content {
        width: 100%;
    }

    .structure-form-grid {
        grid-template-columns: 1fr;
    }

    .structure-form-field.field-wide {
        grid-column: auto;
    }
}


/* SISSO-9 item actions */

.item-header-actions {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
}

.item-action-menu {
    position: relative;
}

.item-action-menu > summary {
    cursor: pointer;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    list-style: none;
}

.item-action-menu > summary::-webkit-details-marker {
    display: none;
}

.item-action-menu-content {
    position: absolute;
    z-index: 15;
    top: calc(100% + 7px);
    right: 0;
    width: 190px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.item-action-menu-content form {
    margin: 0;
}

.item-action-menu-content button {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.item-action-menu-content form:last-child button {
    border-bottom: 0;
}

.item-action-menu-content button:hover {
    background: var(--background);
}

.item-action-menu-content button.danger-action {
    color: var(--danger);
}

@media (max-width: 680px) {
    .item-header-actions {
        align-items: flex-start;
        padding-left: 45px;
    }

    .item-header-actions .item-total {
        padding-left: 0;
    }

    .item-action-menu-content {
        right: auto;
        left: 0;
    }
}


/* SISSO-9 text and notice editing */

.text-block-editors {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.text-block-editor summary,
.text-block-sidebar summary {
    line-height: 1.4;
}

.text-block-form {
    display: grid;
    gap: 14px;
}

.text-block-form textarea {
    min-height: 120px;
    resize: vertical;
}

.text-block-form .form-field {
    margin: 0;
}

.text-block-form .form-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 750;
}

.text-block-form input[type="text"],
.text-block-form select,
.text-block-form textarea {
    width: 100%;
}

.text-block-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.text-block-sidebar > details {
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.text-block-sidebar .sidebar-form-content {
    padding-top: 14px;
}

.compact-actions {
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.button-danger {
    background: #fff;
    color: var(--danger);
    border: 1px solid currentColor;
}

.button-danger:hover {
    background: #fff4f4;
}

@media (max-width: 760px) {
    .compact-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .compact-actions .button {
        width: 100%;
    }
}

/* SISSO-10 guided position creation */

.guided-page {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 80px;
}

.guided-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 26px;
    align-items: start;
}

.guided-layout > main {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.guided-layout > aside {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 24px;
}

.guided-conversation {
    display: grid;
    gap: 18px;
}

.guided-conversation h2,
.guided-preview h2,
.guided-confirmation h2 {
    margin: 0;
}

.guided-message {
    max-width: 82%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.guided-message > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.guided-message p {
    margin: 0;
    line-height: 1.55;
}

.guided-message.is-user {
    margin-left: auto;
    background: #edf8f4;
    border-bottom-right-radius: 4px;
}

.guided-message.is-assistant {
    background: #f5f7fa;
    border-bottom-left-radius: 4px;
}

.guided-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.guided-examples > strong {
    width: 100%;
    color: var(--navy);
    font-size: 13px;
}

.guided-examples button {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.guided-examples button:hover {
    border-color: var(--green);
    background: #edf8f4;
}

.guided-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.internal-heading {
    margin: 30px 0 12px;
    padding: 16px 18px;
    border-left: 4px solid var(--blue);
    border-radius: 0 10px 10px 0;
    background: #f4f7fb;
}

.internal-heading h3,
.internal-heading p {
    margin: 0;
}

.internal-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.guided-preview {
    overflow: hidden;
}

.guided-preview > p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.6;
}

.guided-preview dl {
    display: grid;
    gap: 0;
    margin: 22px 0 0;
    border-top: 1px solid var(--line);
}

.guided-preview dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.guided-preview dt {
    color: var(--muted);
}

.guided-preview dd {
    margin: 0;
    color: var(--navy);
    font-weight: 800;
    text-align: right;
}

.guided-confirmation {
    display: grid;
    gap: 17px;
}

.guided-confirmation form {
    display: grid;
    gap: 15px;
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--navy);
    line-height: 1.45;
    cursor: pointer;
}

.confirmation-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--green);
    flex: 0 0 auto;
}

.review-alert-success {
    border-color: #a8dbc9;
    background: #edf8f4;
    color: #0c654e;
}

.review-alert-warning {
    border-color: #e8d28e;
    background: #fff9e7;
    color: #71580d;
}

.guided-confirmation .text-button-danger {
    justify-self: start;
    margin-top: 2px;
}

@media (max-width: 1050px) {
    .guided-layout {
        grid-template-columns: 1fr;
    }

    .guided-layout > aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .guided-page {
        width: min(100% - 24px, 1440px);
        padding-top: 20px;
    }

    .guided-layout > aside,
    .guided-form-grid {
        grid-template-columns: 1fr;
    }

    .guided-message {
        max-width: 94%;
    }

    .review-hero > .button {
        width: 100%;
    }
}

.guided-template-card {
    display: grid;
    gap: 14px;
    border-color: #b9d8cc;
    background: linear-gradient(180deg, #f7fcfa 0%, #ffffff 100%);
}

.guided-template-card h2,
.guided-template-card p {
    margin: 0;
}

.guided-template-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.guided-template-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.guided-template-card dt {
    color: var(--muted);
}

.guided-template-card dd {
    margin: 0;
    color: var(--navy);
    font-weight: 800;
    text-align: right;
}

.guided-template-card form {
    display: grid;
    gap: 14px;
}

/* Live save notice (offer editor, calculation price source): fixed to the
   viewport, overlays the page, never pushes content. */
.offer-live-notice { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(640px, calc(100% - 32px)); }
.offer-live-notice[hidden] { display: none; }
.offer-notice { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 15px; border-radius: 10px; font-weight: 650; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16); }
.offer-notice-progress { border: 1px solid var(--line); background: var(--white); color: var(--text); }
.offer-notice-success { border: 1px solid #b9dfd1; background: var(--green-light); color: #12644f; }
.offer-notice-error { border: 1px solid #f2b8b5; background: var(--danger-light); color: var(--danger); }
.offer-notice-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.offer-notice-dismiss { border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header account area and the one login page */
.topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 18px;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.login-card {
    max-width: 440px;
    margin-inline: auto;
    padding: 36px;
}

.login-card h1 {
    margin-top: 0;
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.login-form .error-summary {
    margin-bottom: 0;
}

.login-form .error-summary p {
    margin: 0;
}

.login-submit {
    width: 100%;
}

@media (max-width: 520px) {
    .login-card {
        padding: 24px 18px;
    }

    .topbar-account .secure-note {
        display: none;
    }
}
