:root {
    --sg-primary: #0e7a55;
    --sg-primary-hover: #0b9258;
    --sg-primary-deep: #0f6b4f;
    --sg-primary-soft: #eaf8f1;
    --sg-primary-border: #bdefd6;
    --sg-text: #172033;
    --sg-muted: #667085;
    --sg-border: #dfe5ec;
    --sg-canvas: #fbfdfc;
    --sg-surface: #ffffff;
    --sg-danger: #b42318;
    --sg-danger-hover: #912018;
    --sg-danger-soft: #fff0f1;
    --sg-warning-soft: #fff6df;
    --sg-warning-text: #9a5b08;
    --sg-focus-ring: rgba(14, 122, 85, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--sg-canvas);
    color: var(--sg-text);
}

a {
    color: inherit;
}

.brand-link {
    display: inline-block;
    color: white;
    text-decoration: none;
}

.brand-link:hover {
    color: white;
    opacity: 0.9;
}

.brand-link h1 {
    margin: 0 0 6px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    background: #172033;
    color: white;
}

.topbar h1 {
    margin: 0 0 6px;
}

.topbar p {
    margin: 0;
    color: #b8c1d1;
}

.topbar-actions,
.account-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

button,
.button {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    background: var(--sg-primary);
    color: white;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--sg-primary-hover);
}

.button-primary {
    background: var(--sg-primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--sg-primary-hover);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.button-outline {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    color: #344054;
    font-weight: 600;
}

.button-outline:hover {
    background: #f9fafb;
    color: #172033;
}

.button-outline-danger {
    background: #fff5f5;
    border: 1px solid #fecdca;
    color: #b42318;
    font-weight: 600;
}

.button-outline-danger:hover {
    background: #fee4e2;
    color: #912018;
}

.button-small {
    padding: 10px 14px;
    font-size: 14px;
}

.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px 60px;
}

.welcome h2 {
    margin-bottom: 8px;
}

.welcome p,
.section-heading p,
.form-header p {
    color: #667085;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.card,
.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.06);
}

.card span,
.summary-card span {
    display: block;
    color: #667085;
    margin-bottom: 14px;
}

.card strong {
    font-size: 34px;
}

.summary-card strong {
    font-size: 22px;
}

.empty-state {
    margin-top: 30px;
    padding: 50px 20px;
    text-align: center;
    background: white;
    border: 1px dashed #c7ced9;
    border-radius: 12px;
}

.empty-state p {
    color: #667085;
    margin-bottom: 22px;
}

.compact-empty-state {
    margin-top: 0;
    padding: 38px 20px;
}

.projects-section,
.requests-section {
    margin-top: 34px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-heading h3 {
    margin: 0 0 5px;
}

.section-heading p {
    margin: 0;
}

.project-list,
.request-list {
    display: grid;
    gap: 16px;
}

.project-card {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 24px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.project-card-link {
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(18, 32, 51, 0.1);
}

.project-main {
    flex: 1;
}

.project-title-row,
.project-heading-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-title-row h4 {
    margin: 0;
    font-size: 19px;
}

.status-badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #18794e;
    font-size: 12px;
    font-weight: bold;
}

.client-name,
.project-client {
    margin: 8px 0;
    color: var(--sg-primary);
    font-weight: bold;
}

.project-description {
    margin: 12px 0 0;
    color: #667085;
    line-height: 1.6;
}

.project-details {
    display: flex;
    align-items: center;
    gap: 34px;
    min-width: 380px;
}

.project-details div {
    min-width: 105px;
}

.project-details span {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 13px;
}

.open-project {
    color: var(--sg-primary);
    font-weight: bold;
}

.form-container {
    max-width: 820px;
    margin: 45px auto;
    padding: 0 20px 60px;
}

.form-header {
    margin-bottom: 24px;
}

.form-header h2 {
    margin: 7px 0 10px;
    font-size: 30px;
}

.eyebrow {
    margin: 0;
    color: var(--sg-primary-deep) !important;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-form {
    padding: 30px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(18, 32, 51, 0.07);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid #cfd6e1;
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    color: #172033;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px var(--sg-focus-ring);
}

.success-message,
.error-message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: bold;
}

.success-message {
    border: 1px solid #b7e3c9;
    background: #eaf8ef;
    color: #18794e;
}

.error-message {
    border: 1px solid #f0b9b4;
    background: #fff0ef;
    color: #b42318;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #667085;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding-top: 8px;
    border-top: 1px solid #edf0f4;
}

.text-link {
    color: #667085;
    text-decoration: none;
    font-weight: bold;
}

.text-link:hover {
    color: #172033;
}

.project-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 28px;
}

.app-page-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.app-page-header.project-page-header,
.app-page-header.change-order-header,
.app-page-header.scope-decision-header {
    align-items: stretch;
    justify-content: flex-start;
}

.app-page-identity {
    min-width: 0;
}

.app-page-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.app-page-heading-row h2 {
    margin: 7px 0;
}

.app-page-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.app-page-action-bar .app-page-action-btn,
.app-page-action-bar .project-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    height: 42px;
    padding: 0 16px;
    box-sizing: border-box;
    line-height: 1.2;
    white-space: nowrap;
}

.app-page-action-bar .request-locked-notice {
    margin: 0;
}

.project-page-header h2 {
    margin: 7px 0;
    font-size: 32px;
}

.project-heading-row h2 {
    margin-right: 3px;
}

.project-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.scope-panel {
    margin-top: 24px;
    padding: 28px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf0f4;
}

.panel-heading h3 {
    margin: 7px 0 0;
}

.baseline-badge {
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-hover);
    font-size: 12px;
    font-weight: bold;
}

.scope-description,
.request-description {
    color: #455066;
    line-height: 1.7;
    white-space: pre-line;
}

.scope-description {
    margin: 22px 0 0;
}

.client-profile-panel {
    margin-top: 24px;
}

.client-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding-top: 22px;
}

.client-details-grid span {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 13px;
}

.client-details-grid strong {
    overflow-wrap: anywhere;
}

.muted {
    color: #8992a3;
}

.requests-heading {
    margin-bottom: 18px;
}

.request-card {
    padding: 24px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.request-card h4 {
    margin: 0 0 7px;
    font-size: 18px;
}

.request-meta {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.request-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.pending-badge,
.review-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.pending-badge {
    background: #fff4d8;
    color: #9a6700;
}

.review-badge {
    background: #eef1f5;
    color: #596273;
}

.request-description {
    margin: 18px 0 0;
}

@media (max-width: 700px) {
    .topbar,
    .project-page-header,
    .panel-heading,
    .request-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions,
    .account-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        padding: 20px;
    }

    .stats,
    .form-grid,
    .project-summary-grid,
    .client-details-grid {
        grid-template-columns: 1fr;
    }

    .project-card,
    .project-details {
        flex-direction: column;
    }

    .project-details {
        align-items: flex-start;
        min-width: 0;
        gap: 18px;
    }

    .project-form {
        padding: 22px;
    }

    .request-badges {
        justify-content: flex-start;
    }
}

.analysis-container {
    max-width: 1000px;
    margin: 45px auto;
    padding: 0 20px 60px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.comparison-card {
    padding: 25px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.request-comparison-card {
    border-top: 4px solid var(--sg-primary);
}

.comparison-card h3 {
    margin: 8px 0 15px;
}

.comparison-text {
    margin: 0;
    color: #455066;
    line-height: 1.7;
    white-space: pre-line;
}

.analysis-form {
    margin-top: 0;
}

.decision-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.decision-option {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    height: 100%;
    min-height: 115px;
    margin: 0 !important;
    padding: 17px;
    border: 1px solid #cfd6e1;
    border-radius: 10px;
    cursor: pointer;
}

.decision-option:hover {
    border-color: var(--sg-primary);
    background: #f8f9ff;
}

.decision-option input {
    width: auto;
    margin: 3px 0 0;
}

.decision-option span {
    display: block;
}

.decision-option strong {
    display: block;
    margin-bottom: 7px;
}

.decision-option small {
    margin: 0;
}

.request-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
}

.analysis-summary {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 20px;
    padding: 18px;
    background: #f8f9fb;
    border-radius: 10px;
}

.analysis-summary > div:first-child {
    flex: 1;
}

.analysis-summary span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.analysis-summary p {
    margin: 0;
    color: #455066;
    line-height: 1.6;
}

.analysis-numbers {
    display: flex;
    gap: 28px;
}

.analysis-numbers div {
    min-width: 90px;
}

.assessment-in-scope {
    background: #e8f7ee;
    color: #18794e;
}

.assessment-out-of-scope {
    background: #ffe9e7;
    color: #b42318;
}

.assessment-needs-clarification {
    background: #fff4d8;
    color: #9a6700;
}

.assessment-partially-in-scope {
    background: var(--sg-warning-soft);
    color: var(--sg-warning-text);
}

@media (max-width: 1024px) {
    .decision-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .comparison-grid,
    .decision-grid {
        grid-template-columns: 1fr;
    }

    .analysis-summary,
    .analysis-numbers {
        flex-direction: column;
    }
}

.button-light {
    background: #eef1f5;
    color: #344054;
}

.button-light:hover {
    background: #dfe4eb;
}

.button-success {
    background: var(--sg-primary);
}

.button-success:hover {
    background: var(--sg-primary-hover);
}

.button-danger {
    background: var(--sg-danger);
}

.button-danger:hover {
    background: var(--sg-danger-hover);
}

.request-actions {
    align-items: center;
    gap: 10px;
}

.request-actions form {
    margin: 0;
}

.change-order-container {
    max-width: 980px;
    margin: 45px auto;
    padding: 0 20px 70px;
}

.change-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 24px;
}

.app-page-header.change-order-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
}

.app-page-header.change-order-header .change-order-status {
    flex-shrink: 0;
}

.change-order-header h2 {
    margin: 7px 0 10px;
    font-size: 31px;
}

.change-order-header p {
    color: #667085;
}

.change-order-status {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.status-draft {
    background: #eef1f5;
    color: #596273;
}

.status-sent {
    background: #eef1f5;
    color: #596273;
}

.status-approved {
    background: #e8f7ee;
    color: #18794e;
}

.status-rejected {
    background: #ffe9e7;
    color: #b42318;
}

.change-order-document {
    padding: 38px;
    background: white;
    border: 1px solid #dfe4eb;
    border-radius: 15px;
    box-shadow: 0 10px 35px rgba(18, 32, 51, 0.08);
}

.document-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #172033;
}

.document-heading h3 {
    margin: 7px 0 0;
    font-size: 25px;
}

.document-label {
    margin: 0;
    color: var(--sg-primary);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.document-number {
    text-align: right;
}

.document-number span,
.document-info-grid span,
.change-order-totals span {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.document-number strong {
    font-size: 22px;
}

.document-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #e4e8ef;
}

.document-section {
    padding: 25px 0;
    border-bottom: 1px solid #e4e8ef;
}

.document-section h4,
.approval-note h4 {
    margin: 0 0 12px;
}

.document-section p,
.approval-note p {
    margin: 0;
    color: #455066;
    line-height: 1.75;
    white-space: pre-line;
}

.client-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.client-contact-grid div {
    min-width: 0;
    padding: 14px 16px;
    background: #f8f9fb;
    border-radius: 9px;
}

.client-contact-grid span {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.client-contact-grid strong {
    display: block;
    color: #172033;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.change-order-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 25px 0;
}

.change-order-totals div {
    padding: 20px;
    background: #f8f9fb;
    border-radius: 10px;
}

.change-order-totals strong {
    font-size: 22px;
}

.approval-note {
    padding: 22px;
    background: var(--sg-primary-soft);
    border-left: 4px solid var(--sg-primary);
    border-radius: 8px;
}

.change-order-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.change-order-actions form {
    margin: 0;
}

.change-order-actions-sent {
    align-items: center;
}

.change-order-sent-indicator {
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.change-order-locked-notice {
    margin-top: 22px;
    padding: 18px 22px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #d8e0ef;
    color: #334155;
    font-weight: 600;
}

.change-order-locked-notice p {
    margin: 0;
}

@media (max-width: 700px) {
    .change-order-header,
    .document-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-info-grid,
    .change-order-totals {
        grid-template-columns: 1fr;
    }

    .change-order-document {
        padding: 24px;
    }

    .document-number {
        text-align: left;
    }

    .change-order-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .change-order-actions button,
    .change-order-actions form {
        width: 100%;
    }
}

.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
}

.page-navigation a {
    color: var(--sg-primary);
    font-weight: bold;
    text-decoration: none;
}

.page-navigation a:hover {
    text-decoration: underline;
}

.timeline-section {
    margin-top: 40px;
}

.timeline {
    position: relative;
    display: grid;
    gap: 0;
    margin-top: 20px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 10px;
    width: 2px;
    background: #dfe4eb;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 16px;
    padding-bottom: 20px;
}

.timeline-marker {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    margin-top: 18px;
    border: 5px solid var(--sg-primary-soft);
    border-radius: 50%;
    background: var(--sg-primary);
}

.timeline-content {
    padding: 18px 20px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.timeline-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.timeline-heading h4 {
    margin: 0;
}

.timeline-heading time {
    color: #667085;
    font-size: 13px;
    white-space: nowrap;
}

.timeline-content p {
    margin: 10px 0;
    color: #455066;
    line-height: 1.6;
}

.timeline-type {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef1f5;
    color: #596273;
    font-size: 11px;
    font-weight: bold;
}

@media (max-width: 700px) {
    .page-navigation,
    .timeline-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .timeline-heading time {
        white-space: normal;
    }
}

.project-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 700px) {
    .project-header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .project-header-actions .button {
        text-align: center;
    }
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, var(--sg-primary-soft), transparent 38%),
        var(--sg-canvas);
}

.auth-container {
    width: min(460px, calc(100% - 40px));
    margin: 0 auto;
    padding: 55px 0 70px;
}

.auth-brand {
    margin-bottom: 26px;
    text-align: center;
}

.auth-logo {
    color: #172033;
    font-size: 31px;
    font-weight: bold;
    text-decoration: none;
}

.auth-brand p {
    margin: 8px 0 0;
    color: #667085;
}

.auth-card {
    padding: 34px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(18, 32, 51, 0.09);
}

.auth-card h1 {
    margin: 8px 0 10px;
    font-size: 28px;
}

.auth-subtitle {
    margin: 0 0 25px;
    color: #667085;
    line-height: 1.6;
}

.auth-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #f2b8b5;
    border-radius: 8px;
    background: #fff0ef;
    color: #b42318;
    font-weight: bold;
}

.auth-submit {
    width: 100%;
    padding: 13px 18px;
}

.auth-switch {
    margin: 24px 0 0;
    color: #667085;
    text-align: center;
}

.auth-switch a {
    color: var(--sg-primary);
    font-weight: bold;
    text-decoration: none;
}

.auth-switch a:hover {
    color: var(--sg-primary-hover);
    text-decoration: underline;
}

.account-container {
    max-width: 900px;
    margin: 45px auto;
    padding: 0 20px 70px;
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 28px;
}

.account-header h2 {
    margin: 8px 0;
    font-size: 31px;
}

.account-header p {
    color: #667085;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.account-panel {
    margin-top: 24px;
    padding: 28px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.05);
}

.account-panel h3 {
    margin-top: 0;
}

.account-panel p {
    color: #667085;
    line-height: 1.7;
}

@media (max-width: 700px) {
    .auth-card {
        padding: 25px;
    }

    .account-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }
}

.public-approval-link-panel {
    margin-top: 24px;
    padding: 24px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.05);
}

.public-approval-link-panel h3 {
    margin: 7px 0 8px;
}

.public-approval-link-panel p {
    color: #667085;
    line-height: 1.6;
}

.public-link-box {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.public-link-box input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cfd6e1;
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    color: #455066;
    background: #f8f9fb;
}

.public-approval-body {
    min-height: 100vh;
    background: #f4f6f8;
}

.public-approval-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 38px 20px 70px;
}

.public-brand {
    margin-bottom: 28px;
    text-align: center;
}

.public-brand h1 {
    margin: 0;
    font-size: 31px;
}

.public-brand p {
    margin: 8px 0 0;
    color: #667085;
}

.public-approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.public-approval-header h2 {
    margin: 8px 0 10px;
    font-size: 30px;
}

.public-approval-header p {
    margin: 0;
    color: #667085;
    line-height: 1.6;
}

.public-document {
    box-shadow: 0 10px 35px rgba(18, 32, 51, 0.08);
}

.public-decision-panel {
    margin-top: 24px;
    padding: 28px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.05);
}

.public-decision-panel h3 {
    margin-top: 0;
}

.public-decision-panel p {
    color: #667085;
    line-height: 1.6;
}

.public-decision-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.public-decision-actions form {
    margin: 0;
}

.public-result-card {
    max-width: 620px;
    margin: 70px auto;
    padding: 40px;
    text-align: center;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(18, 32, 51, 0.09);
}

.public-result-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    color: white;
    font-size: 36px;
    font-weight: bold;
}

.public-result-approved {
    background: #18794e;
}

.public-result-rejected {
    background: #b42318;
}

.public-result-card h2 {
    margin-bottom: 10px;
}

.public-result-card > p {
    color: #667085;
}

.public-result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
    padding: 20px;
    text-align: left;
    background: #f8f9fb;
    border-radius: 10px;
}

.public-result-details span {
    color: #667085;
}

.public-result-details strong {
    text-align: right;
}

.public-close-note {
    margin-top: 25px;
    font-size: 14px;
}

.public-provider-note {
    margin: 10px 0 0;
    color: #667085;
    font-size: 14px;
}

.public-clarification-note,
.public-locked-notice {
    margin-top: 24px;
    padding: 20px 24px;
    background: #f8fafc;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
}

.public-clarification-note h4,
.public-locked-notice h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.public-clarification-note p,
.public-locked-notice p {
    margin: 0;
    color: #667085;
    line-height: 1.6;
}

.public-invalid-link-card {
    text-align: center;
}

.approval-link-status-line {
    margin: 12px 0 0;
    color: #667085;
    font-size: 14px;
}

.approval-link-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.approval-link-status-active {
    background: #e8f8ef;
    color: #16794a;
}

.approval-link-status-revoked,
.approval-link-status-expired {
    background: #fdecec;
    color: #b42318;
}

.approval-link-status-locked {
    background: #eef2f7;
    color: #475467;
}

.approval-link-meta {
    margin: 8px 0 0;
    color: #667085;
    font-size: 13px;
}

.revoke-approval-link-form {
    margin-top: 14px;
}

@media (max-width: 700px) {
    .public-link-box,
    .public-approval-header,
    .public-decision-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .client-contact-grid {
        grid-template-columns: 1fr;
    }

    .public-link-box button,
    .public-decision-actions form,
    .public-decision-actions button {
        width: 100%;
    }

    .public-result-card {
        padding: 26px;
    }
}

.page-navigation-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.button-print {
    padding: 9px 14px;
    font-size: 13px;
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    body {
        background: white;
        color: black;
    }

    .topbar,
    .page-navigation,
    .change-order-header,
    .public-approval-link-panel,
    .change-order-actions {
        display: none !important;
    }

    .change-order-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .change-order-document {
        padding: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .document-heading,
    .document-info-grid,
    .document-section {
        break-inside: avoid;
    }

    .change-order-totals {
        break-inside: avoid;
    }

    .approval-note {
        break-inside: avoid;
    }

    .document-section p,
    .approval-note p {
        color: #222;
    }
}

@media (max-width: 700px) {
    .page-navigation-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .page-navigation-actions .button {
        width: 100%;
        text-align: center;
    }
}

.public-decision-form {
    margin-top: 22px;
}

.public-decision-form .form-group {
    margin-bottom: 18px;
}

.public-decision-form input,
.public-decision-form textarea {
    width: 100%;
    border: 1px solid #cfd6e1;
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    color: #172033;
    background: white;
}

.public-decision-form input:focus,
.public-decision-form textarea:focus {
    outline: none;
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px var(--sg-focus-ring);
}

.optional-label {
    margin-left: 6px;
    color: #8992a3;
    font-size: 12px;
    font-weight: normal;
}

.public-client-note {
    margin-top: 22px;
    padding: 18px;
    text-align: left;
    background: #f8f9fb;
    border-radius: 10px;
}

.public-client-note span {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.public-client-note p {
    margin: 0;
    color: #455066;
    line-height: 1.6;
}


.topbar-logout-form {
    margin: 0;
}

.change-password-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.change-password-form label {
    display: grid;
    gap: 8px;
    font-weight: bold;
}

.change-password-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c7ced9;
    border-radius: 8px;
    font: inherit;
}

.change-password-form button {
    justify-self: start;
    align-self: end;
}

@media (max-width: 760px) {
    .change-password-form {
        grid-template-columns: 1fr;
    }
}


.password-settings-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.password-settings-copy p {
    margin-bottom: 0;
}

.change-password-details {
    min-width: 190px;
}

.change-password-details summary {
    list-style: none;
}

.change-password-details summary::-webkit-details-marker {
    display: none;
}

.change-password-toggle {
    cursor: pointer;
    text-align: center;
}

.change-password-details[open] {
    width: 100%;
}

.change-password-details[open] .change-password-toggle {
    width: fit-content;
    margin-left: auto;
}

.change-password-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5ec;
}

.password-policy-note {
    margin: 0;
    color: #59657a;
}

@media (max-width: 760px) {
    .password-settings-panel {
        display: block;
    }

    .change-password-details {
        margin-top: 18px;
        min-width: 0;
    }

    .change-password-toggle {
        width: 100%;
    }
}


/* ScopeGuard public landing page */
.landing-body,
.legal-body {
    --landing-font-heading: "Manrope", "Segoe UI", sans-serif;
    --landing-font-body: "Inter", "Segoe UI", sans-serif;
    font-family: var(--landing-font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.landing-body h1,
.landing-body h2,
.landing-body h3,
.landing-body .landing-brand,
.legal-body h1,
.legal-body h2,
.legal-body h3,
.legal-body .landing-brand {
    font-family: var(--landing-font-heading);
}

.landing-body {
    min-height: 100vh;
    background: #f7f8fb;
    color: #13203a;
}

.landing-body .button {
    font-family: var(--landing-font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.landing-nav {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #13203a;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.landing-brand .scopeguard-brand-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
}

.landing-brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--sg-primary);
    color: white;
    font-size: 18px;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-text-link {
    margin-right: 6px;
    color: #536079;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}

.landing-text-link:hover,
.landing-demo-link:hover {
    color: var(--sg-primary);
}

.landing-login {
    color: #263550;
    background: white;
    border-color: #d7ddea;
}

.landing-login:hover {
    color: #13203a;
    background: #f1f3f8;
}

.landing-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 32px 72px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
    align-items: center;
    gap: 64px;
}

.landing-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--sg-primary);
    font-family: var(--landing-font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.landing-hero h1 {
    max-width: 640px;
    margin: 0;
    font-size: clamp(2.5rem, 4.4vw, 3.625rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.landing-lead {
    max-width: 580px;
    margin: 22px 0 0;
    color: #5c677a;
    font-size: 1.125rem;
    line-height: 1.7;
}

.landing-hero-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
}

.landing-primary-cta {
    padding: 12px 26px;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(14, 122, 85, 0.24);
}

.landing-demo-link {
    color: #263550;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.landing-secondary-cta {
    border: 1px solid #d6dcf3;
    color: #263550;
    background: white;
}

.landing-trust-line {
    margin: 22px 0 0;
    color: #7a8497;
    font-size: 0.875rem;
    line-height: 1.5;
}

.landing-product-preview {
    position: relative;
}

.landing-product-preview::before {
    content: "";
    position: absolute;
    inset: -36px -28px -44px 58px;
    border-radius: 40px;
    background: linear-gradient(145deg, rgba(14, 122, 85, 0.16), rgba(14, 122, 85, 0.03));
    transform: rotate(3deg);
}

.preview-window {
    position: relative;
    overflow: hidden;
    border: 1px solid #dde2ec;
    border-radius: 18px;
    background: white;
    box-shadow: 0 26px 70px rgba(28, 42, 76, 0.16);
}

.preview-window-bar {
    height: 50px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 7px;
    background: #172033;
    color: white;
}

.preview-window-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.preview-window-bar strong {
    margin-left: auto;
    margin-right: auto;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.preview-content {
    padding: 28px;
}

.preview-summary,
.preview-request-head,
.preview-change-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.preview-summary {
    margin-bottom: 18px;
}

.preview-summary small,
.preview-request small,
.preview-change-order small {
    display: block;
    margin-bottom: 6px;
    color: #7b8699;
    font-family: var(--landing-font-body, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.preview-summary strong,
.preview-request strong,
.preview-change-order strong {
    color: #172033;
}

.preview-status,
.preview-approved,
.preview-out-scope {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.preview-status,
.preview-approved {
    background: #e8f7ee;
    color: #18794e;
}

.preview-out-scope {
    background: #fff1e8;
    color: #b45309;
}

.preview-request {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid #e4e8ef;
    border-radius: 13px;
    background: #fbfcfe;
}

.preview-request p {
    margin: 16px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.55;
}

.preview-change-order {
    padding: 18px 20px;
    border-radius: 12px;
    background: #f2f5ff;
}

.preview-request-compact {
    margin: 0 0 16px;
    padding: 18px 20px;
}

.preview-ai-card {
    padding: 20px;
    border: 1px solid #e4e8ef;
    border-radius: 13px;
    background: #fbfcfe;
}

.preview-ai-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.preview-ai-card-head small {
    display: block;
    margin-bottom: 0;
    color: #7b8699;
    font-family: var(--landing-font-body, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.preview-ai-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.preview-assessment-badge,
.preview-meta-badge,
.preview-risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.preview-assessment-badge.assessment-out-of-scope {
    background: #ffe9e7;
    color: #b42318;
}

.preview-meta-badge {
    background: #eef1f5;
    color: #596273;
}

.preview-risk-badge.risk-high {
    background: #ffe9e7;
    color: #b42318;
}

.preview-ai-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e4e8ef;
}

.preview-ai-metric small {
    display: block;
    margin-bottom: 6px;
    color: #7b8699;
    font-family: var(--landing-font-body, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.preview-ai-metric strong {
    color: #172033;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.preview-human-review {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #eef1f5;
}

.preview-human-review small {
    display: block;
    margin-bottom: 4px;
    color: #596273;
    font-family: var(--landing-font-body, "Inter", sans-serif);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.preview-human-review strong {
    color: #263550;
    font-size: 0.9375rem;
    font-weight: 600;
}

.landing-proof-strip {
    padding: 20px 32px;
    border-top: 1px solid #e2e6ee;
    border-bottom: 1px solid #e2e6ee;
    background: white;
    text-align: center;
}

.landing-example-section {
    padding-top: 28px;
    padding-bottom: 40px;
}

.landing-example-card {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #e1e5ed;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 14px 32px rgba(20, 34, 61, 0.06);
}

.landing-example-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.12fr);
    gap: 12px;
    align-items: start;
}

.landing-example-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    padding: 16px 16px 14px;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    background: white;
}

.landing-example-step-result {
    border-color: var(--sg-primary-border);
    background: var(--sg-canvas);
    box-shadow: inset 0 0 0 1px rgba(14, 122, 85, 0.04);
}

.landing-example-step-label {
    color: var(--sg-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-example-detail-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-example-detail-list li {
    position: relative;
    padding-left: 13px;
    color: #344054;
    font-size: 0.875rem;
    line-height: 1.45;
}

.landing-example-detail-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #98a2b3;
}

.landing-example-step p {
    margin: 0;
    color: #344054;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.landing-example-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    align-self: center;
    opacity: 0.85;
}

.landing-example-connector span {
    display: block;
    width: 100%;
    height: 1px;
    border-radius: 999px;
    background: #d0d5dd;
}

.landing-example-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.landing-example-metrics {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-example-metrics li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f4f6fb;
}

.landing-example-metrics span {
    color: #667085;
    font-size: 0.8125rem;
}

.landing-example-metrics strong {
    color: #172033;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
}

.landing-example-next-step {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 0;
    padding-top: 10px;
    border-top: 1px solid #e4e8ef;
}

.landing-example-next-step span {
    color: #667085;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.landing-example-next-step strong {
    color: #13203a;
    font-size: 0.9375rem;
    font-weight: 700;
}

@media (max-width: 960px) {
    .landing-example-flow {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .landing-example-connector {
        width: auto;
        height: 16px;
        align-self: stretch;
    }

    .landing-example-connector span {
        width: 1px;
        height: 100%;
        margin: 0 auto;
        background: #d0d5dd;
    }
}

.landing-proof-strip p {
    margin: 0;
    color: #5c677a;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

.landing-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 80px 32px;
}

.landing-section-heading {
    max-width: 680px;
    margin: 0 auto 40px;
    text-align: center;
}

.landing-section-heading-left {
    margin-left: 0;
    text-align: left;
}

.landing-section-heading h2,
.landing-cta h2 {
    margin: 0;
    color: #13203a;
    font-size: clamp(1.75rem, 3.2vw, 2.375rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.landing-section-heading p {
    margin: 14px 0 0;
    color: #667085;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.landing-steps-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-steps-five article {
    min-height: auto;
}

.landing-steps article {
    min-height: 230px;
    padding: 26px;
    border: 1px solid #e1e5ed;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 28px rgba(20, 34, 61, 0.05);
}

.landing-step-number {
    display: inline-block;
    color: var(--sg-primary);
    font-family: var(--landing-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.landing-steps h3,
.landing-benefits h3 {
    margin: 24px 0 8px;
    color: #172033;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.landing-steps p,
.landing-benefits p {
    margin: 0;
    color: #667085;
    font-size: 1rem;
    line-height: 1.65;
}

.landing-step-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #667085;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.landing-step-list li + li {
    margin-top: 4px;
}

.landing-benefits-section {
    padding-top: 24px;
}

.landing-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.landing-benefits article {
    display: flex;
    gap: 18px;
    padding: 28px;
    border-top: 1px solid #dce2ec;
}

.landing-benefit-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary);
    font-size: 17px;
    font-weight: 900;
}

.landing-benefits h3 {
    margin: 2px 0 8px;
}

.landing-pricing-section {
    padding-top: 24px;
    padding-bottom: 24px;
}

.landing-pricing-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 44px;
    border: 1px solid #e1e5ed;
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 28px rgba(20, 34, 61, 0.05);
}

.landing-pricing-copy {
    max-width: 640px;
}

.landing-pricing-copy h2 {
    margin: 0;
    color: #13203a;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.landing-pricing-amount {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.landing-pricing-value {
    color: #13203a;
    font-family: var(--landing-font-heading);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.landing-pricing-unit {
    color: #5c677a;
    font-size: 1.0625rem;
    font-weight: 600;
}

.landing-pricing-description,
.landing-pricing-note {
    margin: 14px 0 0;
    color: #667085;
    font-size: 1rem;
    line-height: 1.65;
}

.landing-pricing-note {
    margin-top: 10px;
    color: #7a8497;
    font-size: 0.9375rem;
    font-weight: 500;
}

.landing-pricing-action {
    flex: 0 0 auto;
}

.landing-cta {
    max-width: 1180px;
    margin: 8px auto 72px;
    padding: 42px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    border-radius: 20px;
    background: #172033;
    color: white;
    box-shadow: 0 22px 55px rgba(23, 32, 51, 0.2);
}

.landing-cta h2 {
    color: white;
}

.landing-cta p {
    max-width: 620px;
    margin: 12px 0 0;
    color: #bdc6d6;
    font-size: 1.0625rem;
    line-height: 1.65;
}

.landing-eyebrow-light {
    color: #9fb0ff;
}

.landing-cta-button {
    flex: 0 0 auto;
    padding: 12px 22px;
}

.landing-footer {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px 36px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px 32px;
    border-top: 1px solid #dfe5ec;
    background: rgba(247, 248, 251, 0.72);
}

.landing-footer strong {
    display: block;
    font-family: var(--landing-font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #172033;
}

.landing-footer p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.5;
}

.landing-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 22px;
    margin: 0;
    padding: 0;
    color: #667085;
    font-size: 0.875rem;
    font-weight: 500;
}

.landing-footer-links a {
    color: #5f6b7f;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.landing-footer-links a:hover {
    color: var(--sg-primary);
}

@media (max-width: 960px) {
    .landing-hero {
        grid-template-columns: 1fr;
        gap: 62px;
        padding-top: 52px;
    }

    .landing-hero-copy {
        max-width: 760px;
    }

    .landing-steps,
    .landing-steps-five {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-benefits {
        grid-template-columns: 1fr;
    }

    .landing-pricing-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 28px;
    }
}

@media (max-width: 680px) {
    .landing-nav {
        padding: 18px 20px;
    }

    .landing-text-link,
    .landing-login {
        display: none;
    }

    .landing-hero,
    .landing-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .landing-hero {
        padding-top: 44px;
        padding-bottom: 62px;
        gap: 48px;
    }

    .landing-hero h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }

    .landing-lead {
        font-size: 1.0625rem;
    }

    .landing-hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .landing-product-preview::before {
        inset: -20px -8px -28px 28px;
    }

    .preview-content {
        padding: 20px;
    }

    .preview-change-order,
    .preview-ai-card-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .landing-steps,
    .landing-steps-five {
        grid-template-columns: 1fr;
    }

    .landing-steps article {
        min-height: auto;
    }

    .landing-cta {
        margin: 0 20px 64px;
        padding: 36px 28px;
        align-items: flex-start;
        flex-direction: column;
    }

    .landing-footer {
        padding: 24px 20px 32px;
        flex-direction: column;
        align-items: flex-start;
    }

    .landing-footer-links {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .landing-footer-links a {
        white-space: normal;
    }
}


/* SCOPEGUARD LEGAL PAGES */
.legal-body { background: #f7f8fb; color: #172033; }
.legal-nav { background: rgba(255,255,255,0.96); }
.legal-page { max-width: 900px; margin: 0 auto; padding: 64px 28px 80px; }
.legal-heading { margin-bottom: 28px; }
.legal-heading h1 {
    margin: 10px 0 10px;
    color: #172033;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
}
.legal-heading p { margin: 0; color: #7a8497; font-size: 0.9375rem; line-height: 1.5; }
.legal-card { padding: 40px 46px; border: 1px solid #e2e6ee; border-radius: 20px; background: white; box-shadow: 0 18px 50px rgba(20,34,61,0.07); }
.legal-intro { margin: 0 0 30px; color: #4f5b70; font-size: 1.0625rem; line-height: 1.75; }
.legal-card section { padding: 22px 0; border-top: 1px solid #edf0f5; }
.legal-card section:first-of-type { border-top: 0; }
.legal-card h2 { margin: 0 0 10px; color: #172033; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.015em; }
.legal-card p { margin: 0; color: #5f6b7f; font-size: 1rem; line-height: 1.7; }
.legal-card ul { margin: 10px 0 0; padding-left: 1.25rem; color: #5f6b7f; font-size: 1rem; line-height: 1.7; }
.legal-card li + li { margin-top: 6px; }
.legal-card code { font-size: 0.92em; }
.legal-notice { margin-top: 28px; padding: 18px 20px; border-radius: 12px; background: #f2f4ff; color: #4d5d83; font-size: 0.875rem; line-height: 1.65; }
.legal-footer { background: rgba(247, 248, 251, 0.72); }
.auth-legal-footer,
.public-legal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
    padding: 18px 20px 28px;
    color: #7a8497;
    font-size: 0.875rem;
}
.auth-legal-footer a,
.public-legal-footer a {
    color: #5f6b7f;
    text-decoration: none;
}
.auth-legal-footer a:hover,
.public-legal-footer a:hover {
    color: #172033;
    text-decoration: underline;
}
@media (max-width: 680px) { .legal-page { padding: 40px 20px 56px; } .legal-card { padding: 26px 22px; } }

/* Compact project detail UI - v8 */
.project-detail-compact {
    max-width: 1180px;
}

.compact-project-header {
    margin-bottom: 20px;
}

.project-inbox-section {
    margin-top: 24px;
    margin-bottom: 28px;
}

.project-inbox-module {
    margin-top: 24px;
    margin-bottom: 28px;
    padding: 20px 22px;
    border: 1px solid #d8e0f3;
    border-radius: 14px;
    background: #f8faff;
}

.project-request-inbox-module {
    border-color: #b8e6d0;
    background: linear-gradient(180deg, #f0faf5 0%, #ffffff 100%);
}

.project-request-inbox-eyebrow {
    color: #0f766e;
}

.project-request-inbox-intro {
    margin: 8px 0 0;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.5;
}

.project-inbox-item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.project-inbox-delete-form {
    margin: 0;
}

.project-inbox-delete-btn {
    white-space: nowrap;
}

.project-inbox-module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
}

.project-inbox-module-forwarding {
    margin-top: 14px;
}

.project-inbox-module-received {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dfe4eb;
}

.project-inbox-received-label {
    margin: 0 0 12px;
    color: #475467;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.scopeguard-forwarding-copy-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #dfe4eb;
    border-radius: 999px;
    background: #ffffff;
    color: #24324a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.3;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.scopeguard-forwarding-copy-pill:hover {
    background: #f0f4ff;
    border-color: #c8d4ef;
}

.scopeguard-forwarding-copy-pill:focus-visible {
    outline: 2px solid var(--sg-primary);
    outline-offset: 2px;
}

.scopeguard-forwarding-copy-pill.is-copied {
    background: var(--sg-primary-soft);
    border-color: var(--sg-primary);
    color: #2f4fd0;
}

.scopeguard-forwarding-copy-label {
    overflow-wrap: anywhere;
}

.project-inbox-heading {
    align-items: center;
    margin-bottom: 12px;
}

.project-inbox-heading-copy {
    min-width: 0;
}

.project-inbox-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
    color: #172033;
    font-size: 1.25rem;
    font-weight: 700;
}

.project-inbox-title-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-inbox-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--sg-primary);
    flex-shrink: 0;
}

.project-inbox-icon svg {
    width: 20px;
    height: 20px;
}

.project-inbox-count {
    color: #667085;
    font-size: 0.875rem;
    font-weight: 600;
}

.project-inbox-count.project-inbox-count-badge {
    color: var(--sg-primary-hover);
    font-size: 0.75rem;
}

.project-inbox-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 14px;
    flex-shrink: 0;
}

.project-inbox-import-btn {
    white-space: nowrap;
}

.project-inbox-section .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.project-inbox-future-note {
    margin-top: 6px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.project-inbox-forwarding-address {
    margin-top: 10px;
}

.project-inbox-forwarding-address-page {
    margin-top: 12px;
}

.project-inbox-forwarding-label {
    margin: 0 0 6px;
    color: #475467;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-inbox-address-value {
    display: inline-block;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    background: #f8f9fc;
    color: #344054;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-all;
}

.project-inbox-forwarding-note {
    margin: 8px 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.project-inbox-empty-state {
    margin-top: 0;
    padding: 16px 18px;
    text-align: left;
    border-style: solid;
    border-color: #e4e8ef;
    background: #fafbfc;
    box-shadow: none;
}

.project-inbox-empty-state p {
    margin: 0;
}

.project-inbox-empty-title {
    color: #344054;
    font-weight: 600;
    margin-bottom: 4px !important;
}

.project-inbox-empty-copy {
    color: #667085;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.project-inbox-page-nav {
    margin-bottom: 18px;
}

.project-inbox-page-header {
    margin-bottom: 22px;
}

.project-inbox-page-project-title {
    margin: 0 0 6px;
}

.project-inbox-page-section {
    margin-top: 0;
}

.project-inbox-list-title {
    margin: 0;
    color: #172033;
    font-size: 1.125rem;
    font-weight: 700;
}

.project-inbox-list-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.project-inbox-count-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-hover);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.project-inbox-list {
    display: grid;
    gap: 12px;
}

.project-inbox-list-compact .project-inbox-item {
    padding: 16px 18px;
}

.project-inbox-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.project-inbox-item-main {
    min-width: 0;
    flex: 1;
}

.project-inbox-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 6px;
}

.project-inbox-sender-email {
    color: #667085;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-inbox-item h4 {
    margin: 0 0 6px;
    color: #172033;
    font-size: 1rem;
    font-weight: 600;
}

.project-inbox-preview {
    margin: 0;
    color: #667085;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.project-inbox-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf0f4;
}

.project-inbox-attachments-label {
    margin: 0 0 6px;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-inbox-attachment-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-top: 4px;
}

.project-inbox-attachment-filename {
    color: #344054;
    font-size: 0.875rem;
    font-weight: 600;
}

.project-inbox-attachment-details {
    color: #667085;
    font-size: 0.8125rem;
    font-weight: 500;
}

.project-inbox-attachment-actions {
    margin-left: 8px;
    white-space: nowrap;
}

.project-inbox-attachment-link {
    color: var(--sg-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.project-inbox-attachment-link:hover {
    text-decoration: underline;
}

.project-inbox-attachment-action-sep {
    margin: 0 4px;
    color: #98a2b3;
}

.project-inbox-attachment-missing {
    margin-left: 8px;
    color: #98a2b3;
    font-size: 0.75rem;
    font-style: italic;
}

.project-inbox-review-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--sg-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.project-inbox-review-link:hover {
    text-decoration: underline;
}

.project-inbox-item-meta .project-inbox-review-link {
    margin-top: 10px;
}

.inbox-request-review-page .inbox-review-source-panel,
.inbox-request-review-page .inbox-review-suggestions-section {
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    background: #fff;
}

.inbox-review-source-panel h3,
.inbox-review-suggestions-section h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.inbox-review-source-meta p {
    margin: 0 0 4px;
    color: #475467;
    font-size: 0.8125rem;
}

.inbox-review-source-body {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f9fc;
    color: #344054;
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.inbox-review-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.inbox-review-disclaimer {
    margin: 4px 0 0;
    color: #667085;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.inbox-review-suggestion-list {
    display: grid;
    gap: 10px;
}

.inbox-review-suggestion-card {
    padding: 12px 14px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: var(--sg-canvas);
}

.inbox-review-suggestion-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.inbox-review-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #344054;
    font-size: 0.8125rem;
    font-weight: 600;
}

.inbox-review-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.inbox-review-badge {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.inbox-review-badge-confidence-high {
    background: #ecfdf3;
    color: #027a48;
}

.inbox-review-badge-confidence-medium {
    background: #eff8ff;
    color: #175cd3;
}

.inbox-review-badge-confidence-low {
    background: #f2f4f7;
    color: #475467;
}

.inbox-review-badge-status-ready {
    background: var(--sg-primary-soft);
    color: #3538cd;
}

.inbox-review-badge-status-needs_clarification {
    background: #fff6ed;
    color: #b54708;
}

.inbox-review-field {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

.inbox-review-field span {
    color: #475467;
    font-size: 0.75rem;
    font-weight: 600;
}

.inbox-review-field input,
.inbox-review-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
}

.inbox-review-field textarea {
    min-height: 3.25rem;
    resize: vertical;
}

.inbox-review-source-excerpt {
    margin-top: 2px;
}

.inbox-review-source-excerpt blockquote {
    margin: 0;
    padding: 7px 10px;
    border-left: 3px solid #c7d2fe;
    background: #f8f9fc;
    color: #475467;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.inbox-review-source-excerpt-label {
    margin: 0 0 4px;
    color: #667085;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.inbox-review-source-also-found {
    margin: 0 0 6px;
    color: #475467;
    font-size: 0.8125rem;
}

.inbox-review-supporting-source {
    margin-top: 10px;
}

.inbox-review-heading-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.inbox-review-rerun-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.inbox-review-rerun-hint {
    margin: 0;
    color: #667085;
    font-size: 0.75rem;
    text-align: right;
}

.inbox-review-optional-notes {
    margin: 6px 0 0;
    color: #667085;
    font-size: 0.75rem;
    line-height: 1.4;
}

.inbox-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.page-alert-warning {
    background: #fffaeb;
    border-color: #fec84b;
    color: #7a2e0e;
}

.project-inbox-attachment-summary {
    margin: 0;
    color: #667085;
    font-size: 0.8125rem;
    font-weight: 600;
}

.project-inbox-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    color: #98a2b3;
    font-size: 0.8125rem;
    white-space: normal;
}

.project-inbox-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.project-inbox-status-new {
    background: var(--sg-primary-soft);
    color: #3b5ccc;
}

.project-inbox-status-reviewed {
    background: #f2f4f7;
    color: #475467;
}

.project-inbox-status-imported {
    background: #ecfdf3;
    color: #027a48;
}

@media (max-width: 720px) {
    .project-inbox-item {
        flex-direction: column;
    }

    .project-inbox-section .section-heading,
    .project-inbox-module-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.compact-summary-grid .summary-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 22px;
}

.compact-information-stack {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.compact-disclosure,
.compact-request-card {
    overflow: hidden;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.compact-disclosure > summary,
.compact-request-card > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.compact-disclosure > summary::-webkit-details-marker,
.compact-request-card > summary::-webkit-details-marker {
    display: none;
}

.compact-disclosure > summary:hover,
.compact-request-card > summary:hover {
    background: #f8f9fc;
}

.disclosure-title {
    display: grid;
    gap: 5px;
}

.disclosure-title strong {
    font-size: 17px;
}

.disclosure-preview {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    color: #667085;
    font-size: 14px;
}

.disclosure-preview > span:not(.disclosure-action):not(.baseline-badge):not(.section-count) {
    padding-left: 14px;
    border-left: 1px solid #dfe4eb;
}

.disclosure-action {
    color: var(--sg-primary);
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.disclosure-action::after {
    content: " +";
}

.compact-disclosure[open] .disclosure-action::after,
.compact-request-card[open] .disclosure-action::after {
    content: " −";
}

.disclosure-body,
.request-details-body {
    padding: 20px;
    border-top: 1px solid #edf0f4;
}

.disclosure-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.compact-client-grid {
    padding-top: 0;
}

.compact-scope-text {
    max-width: 900px;
    margin-top: 0;
}

.compact-requests-section {
    margin-top: 30px;
}

.section-count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 7px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-hover);
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
}

.compact-request-list {
    display: grid;
    gap: 10px;
}

.request-summary-main {
    min-width: 0;
}

.request-summary-main h4 {
    margin: 0 0 9px;
    font-size: 17px;
}

.compact-badges {
    justify-content: flex-start;
}

.request-summary-numbers {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    min-width: 330px;
}

.request-summary-numbers > div {
    min-width: 92px;
}

.request-summary-numbers span:not(.disclosure-action) {
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.request-summary-numbers strong {
    font-size: 15px;
}

.request-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 24px;
}

.detail-label {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.request-detail-grid .request-description,
.request-detail-grid .request-meta {
    margin: 0;
}

.compact-analysis-box {
    margin-top: 18px;
    padding: 16px 18px;
    background: #f8f9fb;
    border-radius: 9px;
}

.compact-analysis-box p {
    margin: 0;
    color: #455066;
    line-height: 1.6;
}

.source-backed-analysis {
    display: grid;
    gap: 14px;
    margin: 0 0 18px;
}

.source-backed-analysis-compact {
    margin: 0;
    gap: 12px;
}

.source-backed-block {
    display: grid;
    gap: 6px;
}

.source-backed-disclosure {
    overflow: hidden;
    border: 1px solid #e4e9f2;
    border-radius: 10px;
    background: #ffffff;
}

.source-backed-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.source-backed-disclosure > summary::-webkit-details-marker {
    display: none;
}

.source-backed-disclosure > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -2px;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.source-backed-disclosure[open] > summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.source-backed-disclosure > summary:hover {
    background: #f8f9fc;
}

.source-backed-disclosure > summary .detail-label {
    margin: 0;
}

.source-backed-disclosure-body {
    display: grid;
    gap: 6px;
    padding: 0 12px 12px;
}

.source-backed-disclosure-body p {
    margin: 0;
    color: #26344d;
    line-height: 1.55;
    white-space: pre-wrap;
}

.source-backed-block p {
    margin: 0;
    color: #26344d;
    line-height: 1.55;
    white-space: pre-wrap;
}

.source-backed-preline {
    white-space: pre-wrap;
}

.source-backed-contract-note {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f6fb;
    border: 1px solid #e4e9f2;
}

.source-backed-contract-note small {
    color: #475467;
    line-height: 1.45;
}

.source-backed-contract-note .muted,
.source-backed-contract-note small.muted {
    color: #667085;
}

.compact-analysis-box .source-backed-analysis {
    margin-bottom: 0;
}

.compact-request-actions {
    margin-top: 18px;
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.compact-request-actions .button-outline,
.compact-request-actions .button-outline-danger {
    background: #ffffff;
}

.request-archive-form {
    margin: 0;
}

.compact-timeline-section {
    margin-top: 26px;
}

.timeline-disclosure-body {
    padding-top: 14px;
}

.timeline-intro {
    margin: 0 0 14px;
    color: #667085;
}

.timeline-disclosure .timeline {
    margin-top: 0;
}

@media (max-width: 800px) {
    .compact-disclosure > summary,
    .compact-request-card > summary,
    .request-summary-numbers,
    .disclosure-preview {
        align-items: flex-start;
        flex-direction: column;
    }

    .request-summary-numbers {
        min-width: 0;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .request-summary-numbers .disclosure-action {
        grid-column: 1 / -1;
    }

    .request-detail-grid {
        grid-template-columns: 1fr;
    }

    .disclosure-preview {
        justify-content: flex-start;
        gap: 8px;
    }

    .disclosure-preview > span:not(.disclosure-action):not(.baseline-badge):not(.section-count) {
        padding-left: 0;
        border-left: 0;
    }

    .compact-request-actions,
    .disclosure-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .compact-request-actions .button,
    .compact-request-actions form,
    .compact-request-actions form button,
    .disclosure-footer .button {
        width: 100%;
        text-align: center;
    }
}

/* Project value summary refinement - v9 */
.compact-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
}

.total-value-card {
    border-color: #d9e1ff;
    background: var(--sg-canvas);
}

.total-value-card small {
    display: block;
    margin-top: auto;
    padding-top: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
}

.deadline-summary-card .deadline-status-label {
    display: block;
    margin-top: 8px;
    color: #344054;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1.35;
}

.deadline-summary-card .deadline-helper-lines {
    display: grid;
    gap: 2px;
    margin-top: auto;
    padding-top: 8px;
}

.deadline-summary-card small {
    display: block;
    margin-top: 0;
    padding-top: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}

.deadline-summary-card > small {
    margin-top: auto;
    padding-top: 8px;
}

@media (max-width: 1024px) {
    .compact-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .compact-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* Bug fixes and project management refinements - v10 */
.account-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.account-panel-heading h3,
.account-panel-heading p { margin: 0; }
.account-panel-heading p { margin-top: 6px; color: #667085; }
.account-project-list { display: grid; gap: 10px; margin-top: 20px; }
.account-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    background: #fbfcfe;
}
.account-project-row div { display: grid; gap: 5px; }
.account-project-row span { color: #667085; font-size: 14px; }
.danger-zone {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid #f1c8c4;
    border-radius: 12px;
    background: #fffafa;
}
.danger-zone h3 { margin: 4px 0 8px; }
.danger-zone p { color: #667085; }
.danger-zone form { display: grid; gap: 12px; margin-top: 18px; }
.danger-zone input { width: 100%; }
.danger-zone .button-danger { justify-self: start; }
.danger-eyebrow { color: #b42318; }
@media (max-width: 680px) {
    .account-panel-heading,
    .account-project-row { align-items: stretch; flex-direction: column; }
    .account-panel-heading .button,
    .account-project-row .button { width: 100%; text-align: center; }
    .danger-zone .button-danger { width: 100%; }
}


/* SCOPEGUARD_DELETE_PROJECT_FINAL_FIX */
.danger-zone {
    scroll-margin-top: 24px;
}
.danger-zone:target {
    border-width: 2px;
}
.project-page-actions .button-danger {
    background: #b42318;
    color: #ffffff;
}
.project-page-actions .button-danger:hover {
    background: #912018;
}


/* SCOPEGUARD_SECURE_PROJECT_DELETE_V11 */
.project-header-actions {
    gap: 10px;
    width: 100%;
}

.project-normal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.app-page-header .project-header-actions,
.app-page-header .project-normal-actions {
    width: 100%;
}

.project-header-actions .project-header-btn,
.project-normal-actions .project-header-btn,
.app-page-action-bar .app-page-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    height: 42px;
    padding: 0 16px;
    box-sizing: border-box;
    line-height: 1.2;
    white-space: nowrap;
}

.project-more-menu {
    position: relative;
    display: inline-flex;
}

.project-more-menu > summary {
    list-style: none;
    cursor: pointer;
}

.project-more-menu > summary::-webkit-details-marker {
    display: none;
}

.project-more-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 200px;
    padding: 8px;
    border: 1px solid #d9dee8;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.12);
    display: grid;
    gap: 4px;
}

.project-more-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #344054;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.project-more-item:hover {
    background: #f3f6fb;
}

.project-more-item-danger {
    color: #b42318;
}

.project-more-item-danger:hover {
    background: #fff4f3;
}

.project-more-divider {
    height: 1px;
    margin: 4px 4px;
    background: #e4e8ef;
}

.project-reopen-form {
    display: block;
    margin: 0;
}

.standalone-close-zone {
    margin-top: 24px;
    padding: 30px;
    border: 1px solid #d9dee8;
    border-radius: 12px;
    background: #f8fafc;
}

.standalone-close-zone h3 {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 23px;
}

.standalone-close-zone > div > p {
    max-width: 700px;
    color: #596273;
    line-height: 1.65;
}

.danger-zone {
    margin-top: 42px;
    padding: 30px;
    border: 2px solid #e7aaa4;
    background: #fff7f6;
}

.danger-zone h3 {
    margin: 7px 0 10px;
    color: #8f1d15;
    font-size: 23px;
}

.danger-zone > div > p:not(.eyebrow) {
    max-width: 700px;
    color: #596273;
    line-height: 1.65;
}

.secure-delete-form {
    display: grid;
    gap: 20px;
    max-width: 650px;
    margin-top: 24px;
}

.danger-form-group {
    display: grid;
    gap: 9px;
}

.danger-form-group label {
    color: #344054;
    font-weight: bold;
}

.danger-form-group input {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid #c8ced9;
    border-radius: 9px;
    background: white;
    color: #172033;
    font: inherit;
    font-size: 16px;
}

.danger-form-group input:focus {
    outline: none;
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.danger-form-group small {
    color: #667085;
    line-height: 1.5;
}

.secure-delete-form .button-danger {
    min-height: 48px;
    justify-self: start;
    margin-top: 4px;
    padding: 13px 20px;
}

@media (max-width: 900px) {
    .project-header-actions,
    .project-normal-actions,
    .app-page-action-bar {
        width: 100%;
        align-items: stretch;
    }

    .project-header-actions .project-header-btn,
    .project-normal-actions .project-header-btn,
    .app-page-action-bar .app-page-action-btn {
        width: auto;
        flex: 1 1 auto;
        text-align: center;
    }

    .project-more-menu {
        flex: 1 1 auto;
    }

    .project-more-menu > summary {
        width: 100%;
    }

    .project-more-panel {
        left: 0;
        right: 0;
        min-width: 0;
    }
}


/* SCOPEGUARD_DELETE_PAGE_REFINEMENT_V13 */
.delete-project-container {
    width: min(820px, calc(100% - 40px));
    margin: 46px auto 70px;
}

.delete-page-header {
    margin-bottom: 24px;
}

.delete-page-header .eyebrow {
    display: none;
}

.delete-page-header h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 30px;
    line-height: 1.2;
}

.delete-page-header p {
    margin: 0;
    color: #667085;
    font-size: 16px;
    line-height: 1.6;
}

.standalone-danger-zone {
    margin-top: 0;
    padding: 32px;
}

.standalone-danger-zone > div:first-child {
    padding-bottom: 22px;
    border-bottom: 1px solid #f0c8c4;
}

.standalone-danger-zone h3 {
    margin: 0 0 10px;
}

.delete-page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

@media (max-width: 680px) {
    .delete-project-container {
        width: min(100% - 28px, 820px);
        margin-top: 28px;
    }

    .standalone-danger-zone {
        padding: 24px 20px;
    }

    .delete-page-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .delete-page-actions .button,
    .delete-page-actions button {
        width: 100%;
        text-align: center;
    }
}

/* ScopeGuard official header logo */
.landing-brand-logo {
    width: 38px;
    height: 38px;
    display: block;
    object-fit: contain;
    border-radius: 10px;
}

/* ScopeGuard unified application branding */
.scopeguard-brand-logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: block;
    object-fit: contain;
    border-radius: 9px;
}

.brand-link,
.auth-logo,
.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-logo {
    text-decoration: none;
}

.public-brand h1,
.brand-link h1 {
    margin: 0;
}


/* ScopeGuard private contract attachments */
.contract-upload-group {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #dfe4eb;
    border-radius: 14px;
    background: #f8faff;
}

.contract-upload-group input[type="file"] {
    width: 100%;
    margin-top: 10px;
}

.current-contract,
.contract-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 12px 0 16px;
    padding: 14px 16px;
    border: 1px solid #dfe4eb;
    border-radius: 12px;
    background: #ffffff;
}

.current-contract div,
.contract-summary div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.current-contract strong,
.contract-summary strong {
    overflow-wrap: anywhere;
}

.field-error {
    margin: 10px 0 0;
    color: #b42318;
    font-weight: 700;
}

.contract-empty {
    margin-top: 14px;
}

@media (max-width: 640px) {
    .current-contract,
    .contract-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ScopeGuard public approval header refinement */
.public-brand-header {
    display: grid;
    justify-items: start;
    gap: 4px;
    margin-bottom: 34px;
}

.public-brand-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.public-brand-row h1 {
    margin: 0;
}

.public-brand-header p {
    margin: 0 0 0 46px;
    color: #536079;
}

/* Center ScopeGuard branding on public approval pages */
.public-brand-header {
    justify-items: center;
    text-align: center;
}

.public-brand-header p {
    margin-left: 0;
}


/* ScopeGuard read-only demo mode */
.demo-read-only-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 26px;
    padding: 16px 18px;
    border: 1px solid var(--sg-primary-border);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sg-primary-soft), #ffffff);
    box-shadow: 0 5px 18px rgba(14, 122, 85, 0.08);
}

.demo-read-only-banner div {
    display: grid;
    gap: 4px;
}

.demo-read-only-banner strong {
    color: var(--sg-primary-deep);
    font-size: 15px;
}

.demo-read-only-banner span {
    color: #536079;
    line-height: 1.45;
}

.demo-read-only-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--sg-primary);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.demo-public-banner {
    margin-bottom: 30px;
}

@media (max-width: 640px) {
    .demo-read-only-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ScopeGuard one-click live demo */
.landing-demo-button {
    white-space: nowrap;
}

.landing-demo-cta {
    border: 1px solid #d6dcf3;
}

.landing-final-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-demo-panel {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--sg-primary-border);
    border-radius: 12px;
    background: var(--sg-primary-soft);
}

.auth-demo-panel div {
    display: grid;
    gap: 4px;
}

.auth-demo-panel strong {
    color: var(--sg-primary-deep);
}

.auth-demo-panel span {
    color: #667085;
    font-size: 14px;
}

.auth-demo-button {
    text-align: center;
}

@media (max-width: 760px) {
    .landing-nav-actions .landing-demo-button {
        display: none;
    }

    .landing-final-actions {
        width: 100%;
    }
}

/* PROJECT CREDIT UI */
.project-credit-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin: 24px 0;
    padding: 22px 24px;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    background: #f8fafc;
}

.project-credit-panel h3 {
    margin: 4px 0 6px;
}

.project-credit-panel p {
    margin: 0;
}

.project-credit-warning {
    max-width: 360px;
    padding: 14px 16px;
    border: 1px solid #f0b8b8;
    border-radius: 10px;
    background: #fff4f4;
    color: #8a1c1c;
}

.project-credit-warning p {
    margin-top: 6px;
}

.form-message-error {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #f0b8b8;
    border-radius: 10px;
    background: #fff4f4;
    color: #8a1c1c;
    font-weight: 600;
}

.project-form button:disabled {
    cursor: not-allowed;
    background: #e8edea;
    color: #8a958f;
    border: 1px solid #d7e0db;
    opacity: 1;
}

@media (max-width: 720px) {
    .project-credit-panel {
        flex-direction: column;
        align-items: stretch;
    }
}

.buy-credit-button {
    display: inline-flex;
    margin-top: 14px;
    text-decoration: none;
    white-space: nowrap;
}

/* DASHBOARD CREDIT CARD */
.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.credit-stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.credit-stat-card a {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1000px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .stats {
        grid-template-columns: 1fr;
    }
}

/* ACCOUNT CREDIT UI */
.account-credit-panel {
    border-color: #cfe0ff;
    background: #f8fbff;
}

.account-credit-balance {
    min-width: 120px;
    padding: 14px 18px;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
}

.account-credit-balance span {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #64748b;
}

.account-credit-balance strong {
    font-size: 28px;
}

.account-credit-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

@media (max-width: 720px) {
    .account-credit-balance {
        width: 100%;
        text-align: left;
    }
}

/* ACCOUNT SUMMARY CARDS */
.account-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
}

/* AI SCOPE ANALYSIS */
.ai-analysis-section {
    margin-bottom: 28px;
    padding: 28px;
    background: linear-gradient(180deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid #d8e0f5;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(79, 109, 247, 0.08);
}

.ai-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.ai-section-header h3 {
    margin: 6px 0 0;
}

.ai-powered-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #4f6df7;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.ai-empty-state {
    padding: 18px 0 4px;
}

.ai-empty-state p {
    margin: 0 0 12px;
    color: #455066;
    line-height: 1.7;
}

.ai-disclaimer {
    color: #667085 !important;
    font-size: 14px;
}

.ai-loading {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    color: #344054;
}

.ai-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #d8e0f5;
    border-top-color: #4f6df7;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

.ai-inline-error,
.page-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.ai-inline-error {
    background: #ffe9e7;
    color: #912018;
    border: 1px solid #fecdca;
}

.page-alert-success {
    background: #e8f7ee;
    color: #18794e;
    border: 1px solid #abefc6;
}

.page-alert-info {
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
    border: 1px solid var(--sg-primary-border);
}

.page-alert-error {
    background: #ffe9e7;
    color: #912018;
    border: 1px solid #fecdca;
}

.hidden {
    display: none !important;
}

.ai-result-card {
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.ai-result-header h4 {
    margin: 6px 0 0;
}

.ai-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ai-status-pending {
    background: #fff4d8;
    color: #9a6700;
}

.ai-status-accepted {
    background: #e8f7ee;
    color: #18794e;
}

.ai-status-overridden {
    background: #eef1f5;
    color: #475467;
}

.ai-result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.ai-risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.risk-low {
    background: #e8f7ee;
    color: #18794e;
}

.risk-medium {
    background: #fff4d8;
    color: #9a6700;
}

.risk-high {
    background: #ffe9e7;
    color: #b42318;
}

.ai-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ai-result-block {
    padding: 14px 16px;
    background: #f8f9fb;
    border-radius: 10px;
}

.ai-result-block-wide {
    grid-column: 1 / -1;
}

.ai-result-block span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ai-result-block p,
.ai-result-block strong {
    margin: 0;
    color: #26344d;
    line-height: 1.6;
}

.ai-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ai-result-actions .button:disabled,
.ai-empty-state .button:disabled {
    background: #e8edea;
    color: #8a958f;
    border: 1px solid #d7e0db;
    opacity: 1;
    cursor: not-allowed;
}

.client-response-options .client-response-cards {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.client-response-card {
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
}

.client-response-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.client-response-card h4 {
    margin: 0;
    color: #1d2939;
    font-size: 15px;
}

.client-response-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2f6;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.client-response-card p {
    margin: 0;
    color: #26344d;
    line-height: 1.6;
    white-space: pre-wrap;
}

.decision-impact-card,
.launch-impact-block .decision-impact-card {
    margin: 0;
    padding: 16px 18px;
    background: #f4f8fc;
    border: 1px solid #d8e4f2;
    border-radius: 12px;
}

.decision-impact-card h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #1f3552;
}

.decision-impact-summary,
.decision-impact-intro {
    margin: 0 0 10px;
    color: #26344d;
    line-height: 1.6;
}

.decision-impact-options {
    margin: 0;
    padding-left: 1.2rem;
    color: #26344d;
    line-height: 1.6;
}

.decision-impact-options li + li {
    margin-top: 4px;
}

.decision-impact-section {
    margin-top: 8px;
}

.human-final-summary,
.manual-analysis-section {
    margin-bottom: 28px;
}

.human-final-summary {
    padding: 24px;
    background: #f8f9fb;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
}

.human-final-header h3,
.manual-analysis-header h3 {
    margin: 6px 0 10px;
}

.human-final-grid {
    display: grid;
    gap: 16px;
}

.human-final-grid span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.human-final-grid p,
.human-final-grid strong {
    margin: 0;
    color: #26344d;
    line-height: 1.6;
}

.manual-analysis-header p {
    margin: 0 0 18px;
    color: #667085;
}

.ai-request-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ai-request-ai-suggested,
.ai-request-ai-suggestion {
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
}

.ai-request-ai-accepted,
.ai-request-human-confirmed {
    background: #e8f7ee;
    color: #18794e;
}

.ai-request-ai-overridden {
    background: #eef1f5;
    color: #475467;
}

.ai-request-reanalysis-needed {
    background: #fff7ed;
    color: #9a3412;
}

.request-text-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.app-page-header .request-text-actions {
    margin-top: 0;
}

.request-correction-warning {
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.request-correction-warning p {
    margin: 0;
    font-weight: 600;
    line-height: 1.45;
}

.request-locked-notice {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #d8e0ef;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .ai-section-header,
    .ai-result-header,
    .ai-result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ai-result-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard approved layout */
.dashboard-page {
    margin: 0;
    background: var(--sg-canvas);
    color: var(--sg-text);
    min-height: 100vh;
}

.account-page {
    background: var(--sg-canvas);
}

.dashboard-app {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    background: linear-gradient(180deg, #1a2438 0%, #141d2e 100%);
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
}

.dashboard-sidebar-brand-block {
    margin-bottom: 20px;
}

.dashboard-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 4px 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-sidebar-brand:hover {
    color: #ffffff;
    opacity: 0.92;
}

.dashboard-sidebar-brand .scopeguard-brand-logo {
    width: 28px;
    height: 28px;
}

.dashboard-sidebar-tagline {
    margin: 0;
    padding: 0 8px;
    color: #9aa8be;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.dashboard-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-sidebar-section-label {
    margin: 0 0 6px;
    padding: 0 12px;
    color: #6f7f98;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-sidebar-footer .dashboard-sidebar-section-label {
    margin-bottom: 2px;
}

.dashboard-sidebar-link {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #c5d0e3;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dashboard-sidebar-link.is-active {
    background: rgba(14, 122, 85, 0.22);
    color: #ffffff;
}

.dashboard-sidebar-logout-form,
.dashboard-mobile-logout-form {
    margin: 0;
}

.dashboard-sidebar-logout {
    color: #d9c4c2;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-sidebar-logout:hover {
    background: rgba(180, 35, 24, 0.14);
    border-color: rgba(180, 35, 24, 0.28);
    color: #f5dedc;
}

.dashboard-mobile-bar {
    display: none;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
    margin-left: 220px;
    padding: 28px 36px 48px;
}

.dashboard-main-inner {
    max-width: 1040px;
    margin: 0 auto;
}

.dashboard-welcome-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-welcome-copy h1 {
    margin: 0 0 8px;
    font-size: clamp(1.75rem, 2.5vw, 2.125rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dashboard-welcome-copy p {
    margin: 0;
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.55;
}

.dashboard-welcome-action {
    flex-shrink: 0;
    white-space: nowrap;
}

.dashboard-section-intro {
    margin-bottom: 14px;
}

.dashboard-section-intro h2 {
    margin: 0 0 4px;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475467;
}

.dashboard-section-intro p {
    margin: 0;
    color: #667085;
    font-size: 0.9375rem;
}

.dashboard-section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.dashboard-view-all-link {
    color: var(--sg-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-view-all-link:hover {
    color: var(--sg-primary-hover);
    text-decoration: underline;
}

.dashboard-projects-module {
    margin-bottom: 28px;
}

.dashboard-projects-card {
    border: 1px solid #dde4f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(18, 32, 51, 0.06);
}

.dashboard-project-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #e8edf5;
    transition: background 0.12s ease;
}

.dashboard-project-row:last-child {
    border-bottom: none;
}

.dashboard-project-row:hover {
    background: #f8faff;
}

.dashboard-project-row-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dashboard-project-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-hover);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.dashboard-project-row-copy {
    min-width: 0;
}

.dashboard-project-name {
    display: block;
    margin-bottom: 3px;
    color: #172033;
    font-size: 1rem;
    line-height: 1.35;
}

.dashboard-project-client {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.4;
}

.dashboard-project-status {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
}

.dashboard-project-meta {
    display: block;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.4;
}

.dashboard-project-open {
    flex-shrink: 0;
}

.dashboard-projects-empty {
    padding: 36px 24px;
    text-align: center;
}

.dashboard-projects-empty h3 {
    margin: 0 0 8px;
}

.dashboard-projects-empty p {
    margin: 0 0 18px;
    color: #667085;
}

.dashboard-quick-actions {
    margin-top: 8px;
}

.dashboard-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-quick-action-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid #dde4f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(18, 32, 51, 0.05);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

a.dashboard-quick-action-tile:hover {
    border-color: #b8e6d0;
    box-shadow: 0 10px 24px rgba(14, 122, 85, 0.1);
    transform: translateY(-1px);
}

a.dashboard-quick-action-tile:focus-visible {
    outline: 2px solid var(--sg-primary);
    outline-offset: 2px;
}

.dashboard-quick-action-tile strong {
    color: #172033;
    font-size: 0.98rem;
}

.dashboard-quick-action-tile span {
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.45;
}

.pending-intake-email-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px 24px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--sg-primary-border);
    background: var(--sg-primary-soft);
    box-shadow: 0 8px 22px rgba(14, 122, 85, 0.08);
}

.pending-intake-notice-dashboard {
    border-color: #b8dcc8;
    background: linear-gradient(180deg, #f3faf6 0%, #ffffff 100%);
    box-shadow: 0 8px 22px rgba(24, 121, 78, 0.08);
}

.pending-intake-notice-account {
    border-color: var(--sg-primary-border);
    background: linear-gradient(180deg, var(--sg-primary-soft) 0%, #ffffff 100%);
    box-shadow: 0 4px 14px rgba(18, 32, 51, 0.05);
}

.pending-intake-email-notice-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pending-intake-email-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #e8f7ee;
    color: #18794e;
}

.pending-intake-email-icon svg {
    width: 22px;
    height: 22px;
}

.pending-intake-notice-dashboard .pending-intake-email-eyebrow {
    color: #18794e;
}

.pending-intake-email-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #18794e;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

.pending-intake-email-helper {
    margin: 10px 0 0;
    color: #5b6578;
    font-size: 0.875rem;
    line-height: 1.45;
}

.pending-intake-email-actions-dashboard {
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
}

.dashboard-intake-action-primary {
    background: #18794e;
    border-color: #18794e;
}

.dashboard-intake-action-primary:hover {
    background: #146c43;
    border-color: #146c43;
}

.pending-intake-email-preview-dashboard {
    width: 100%;
}

.dashboard-intake-preview-button {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    list-style: none;
    cursor: pointer;
}

.dashboard-intake-preview-button::-webkit-details-marker {
    display: none;
}

.pending-intake-email-eyebrow {
    margin: 0 0 10px;
    color: var(--sg-primary-hover);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pending-intake-email-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: #172033;
}

.pending-intake-email-lead {
    margin: 0 0 10px;
    color: #5b6578;
    line-height: 1.5;
}

.pending-intake-email-meta {
    margin: 0;
    color: #344054;
    line-height: 1.55;
}

.pending-intake-email-meta p {
    margin: 0 0 4px;
}

.pending-intake-email-meta-label {
    color: #667085;
    font-weight: 600;
}

.pending-intake-email-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    flex-shrink: 0;
}

.pending-intake-email-preview {
    margin: 0;
}

.pending-intake-email-preview summary {
    list-style: none;
    cursor: pointer;
    color: var(--sg-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.pending-intake-email-preview summary::-webkit-details-marker {
    display: none;
}

.pending-intake-email-preview summary:hover {
    color: var(--sg-primary-hover);
    text-decoration: underline;
}

.pending-intake-email-preview-body {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #dde4f0;
    border-radius: 10px;
    background: #ffffff;
    color: #475467;
    font-size: 0.875rem;
    line-height: 1.55;
    max-width: 420px;
}

.pending-intake-email-preview-body p {
    margin: 0 0 8px;
}

.account-topbar {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.account-topbar-brand {
    min-width: 0;
}

.account-topbar-actions {
    gap: 10px;
}

.account-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 32px 40px 56px;
}

.account-header {
    margin-bottom: 22px;
}

.account-header h2 {
    margin: 8px 0 6px;
    font-size: clamp(1.65rem, 2.2vw, 2rem);
    letter-spacing: -0.02em;
}

.account-header-email {
    margin: 0;
    color: #667085;
}

.account-page .account-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.account-summary-card {
    padding: 20px 22px;
    border: 1px solid #dde4f0;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(18, 32, 51, 0.05);
}

.account-flash {
    margin-bottom: 18px;
}

.account-page .account-panel {
    margin-top: 20px;
    padding: 24px 26px;
    border: 1px solid #dde4f0;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(18, 32, 51, 0.05);
}

.account-page .account-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.account-page .account-panel-heading h3 {
    margin: 0 0 6px;
}

.account-page .account-panel-heading p {
    margin: 0;
}

.account-credit-buy-link {
    margin-left: auto;
}

.account-credit-note {
    margin-top: 14px;
}

.account-project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e8edf5;
}

.account-project-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.account-project-row-copy strong {
    display: block;
    margin-bottom: 4px;
    color: #172033;
}

.account-project-row-copy span {
    color: #667085;
    font-size: 0.9rem;
}

@media (max-width: 1000px) {
    .dashboard-sidebar {
        width: 210px;
    }

    .dashboard-main {
        margin-left: 210px;
        padding: 28px 24px 48px;
    }

    .dashboard-quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .account-page .account-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-app {
        flex-direction: column;
    }

    .dashboard-sidebar {
        display: none;
    }

    .dashboard-main {
        margin-left: 0;
    }

    .dashboard-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        background: #172033;
        color: #ffffff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dashboard-mobile-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #ffffff;
        font-weight: 700;
        font-size: 0.95rem;
        text-decoration: none;
    }

    .dashboard-mobile-brand .scopeguard-brand-logo {
        width: 24px;
        height: 24px;
    }

    .dashboard-mobile-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .dashboard-mobile-nav-link {
        color: #c5d0e3;
        font-size: 0.8125rem;
        font-weight: 600;
        text-decoration: none;
    }

    .dashboard-mobile-nav-link:hover {
        color: #ffffff;
    }

    .dashboard-main {
        padding: 24px 16px 48px;
    }

    .dashboard-welcome-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-welcome-action {
        align-self: flex-start;
    }

    .pending-intake-email-notice {
        flex-direction: column;
    }

    .pending-intake-email-actions-dashboard {
        align-items: stretch;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .account-shell {
        padding: 20px 16px 56px;
    }

    .account-topbar {
        padding: 18px 16px;
    }

    .account-page .account-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-project-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-project-open {
        align-self: flex-end;
    }

    .account-page .account-panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .account-credit-buy-link {
        margin-left: 0;
    }

    .account-project-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.user-intake-forwarding-card {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 22px;
    border: 1px solid #dde4f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(18, 32, 51, 0.05);
}

.dashboard-forwarding-card,
.account-forwarding-card,
.new-project-intake-card {
    border-color: #b8cff9;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
    padding: 18px 20px;
}

.compact-intake-card-eyebrow {
    margin: 0 0 6px;
    color: var(--sg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compact-intake-card-main {
    width: 100%;
}

.compact-intake-card-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8edf5;
}

.compact-intake-card-heading {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: #172033;
}

.compact-intake-card-intro {
    margin: 0;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.5;
}

.compact-intake-email-list {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8edf5;
}

.compact-intake-email-list-title {
    margin: 0;
    color: #475467;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compact-intake-email-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.compact-intake-clear-form {
    margin: 0;
    flex-shrink: 0;
}

.compact-intake-clear-btn {
    white-space: nowrap;
}

.compact-intake-email-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.compact-intake-email-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.compact-intake-email-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.compact-intake-delete-form {
    margin: 0;
}

.compact-intake-delete-btn {
    white-space: nowrap;
}

.compact-intake-email-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.compact-intake-email-row-copy strong {
    display: block;
    margin-bottom: 2px;
    color: #172033;
    font-size: 0.9375rem;
    line-height: 1.35;
}

.compact-intake-email-row-copy span {
    display: block;
    color: #667085;
    font-size: 0.8125rem;
}

.compact-intake-email-use {
    flex-shrink: 0;
    white-space: nowrap;
}

.compact-intake-email-empty {
    margin: 14px 0 0;
    color: #667085;
    font-size: 0.875rem;
    line-height: 1.45;
}

.account-forwarding-card {
    margin-top: 0;
}

.user-intake-forwarding-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary);
}

.user-intake-forwarding-card-icon svg {
    width: 22px;
    height: 22px;
}

.user-intake-forwarding-card-main {
    min-width: 0;
    flex: 1;
}

.user-intake-forwarding-card-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: #172033;
}

.user-intake-forwarding-card-copy {
    margin: 0 0 12px;
    color: #667085;
    line-height: 1.45;
}

.user-intake-forwarding-card-label {
    margin: 0 0 6px;
    color: #475467;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-intake-forwarding-pending-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8edf5;
}

.user-intake-forwarding-pending-label {
    margin: 0 0 8px;
    color: #475467;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-intake-forwarding-pending-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.user-intake-forwarding-pending-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 6px 0;
    font-size: 0.875rem;
}

.user-intake-forwarding-pending-list a {
    color: var(--sg-primary);
    font-weight: 600;
    text-decoration: none;
}

.user-intake-forwarding-pending-list a:hover {
    text-decoration: underline;
}

.user-intake-forwarding-pending-list span {
    color: #667085;
}

.forwarded-email-selector {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 10px 0 12px;
    padding: 10px 12px;
    border: 1px solid #cfd6e1;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    color: #172033;
}

.forwarded-email-selector-label {
    display: block;
    margin-top: 10px;
    color: #475467;
    font-size: 0.875rem;
    font-weight: 600;
}

.forwarded-email-preview-panel {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid #e4e8ef;
    border-radius: 8px;
    background: #f8f9fc;
    color: #475467;
    font-size: 0.875rem;
    line-height: 1.55;
}

.forwarded-email-preview-panel p {
    margin: 0 0 8px;
}

.scope-decision-screen {
    max-width: 100%;
    width: 100%;
}

.app-shell-page .analysis-container.scope-decision-screen {
    max-width: 1040px;
    padding-left: 0;
    padding-right: 0;
}

.scope-decision-header h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.25;
}

.scope-decision-subtitle {
    margin: 0;
    color: #5c6578;
    font-size: 0.95rem;
}

.scope-decision-card {
    margin-bottom: 18px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(18, 32, 51, 0.05);
}

.scope-decision-card-top {
    display: grid;
    gap: 16px;
}

.scope-decision-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.scope-decision-badges .scope-ai-source-badge {
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
    font-weight: 600;
}

.scope-impact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.scope-impact-card {
    padding: 14px 16px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: #f8f9fc;
}

.scope-impact-card span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scope-impact-card strong {
    color: #172033;
    font-size: 1.15rem;
}

.scope-review-actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e4e8ef;
}

.scope-review-actions .button {
    min-width: 0;
}

.scope-review-actions .button-outline {
    background: #ffffff;
}

.scope-details-body .scope-details-text {
    max-height: 280px;
    overflow: auto;
    font-size: 0.95rem;
}

.scope-decision-summary-label {
    margin: 0 0 8px;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 700;
}

.scope-decision-summary-text {
    margin: 0;
    color: #455066;
    line-height: 1.65;
}

.scope-decision-note {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f9fc;
    border: 1px solid #e4e8ef;
}

.scope-decision-note span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scope-decision-note p {
    margin: 0;
    color: #5c6578;
    font-size: 0.92rem;
    line-height: 1.55;
}

.ai-action-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
}

.scope-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.scope-decision-primary-action {
    margin: 0;
}

.scope-response-panel {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e4e8ef;
}

.scope-response-label {
    margin: 0 0 10px;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 700;
}

.scope-response-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.scope-response-tab {
    border: 1px solid #cfd6e1;
    border-radius: 999px;
    background: #ffffff;
    color: #344054;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.scope-response-tab.active {
    border-color: var(--sg-primary);
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
}

.scope-response-tabpanel {
    padding: 14px 16px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: #f8f9fc;
    color: #455066;
    line-height: 1.65;
}

.scope-response-tabpanel p {
    margin: 0;
    white-space: pre-line;
}

.scope-context-card {
    margin: 0 0 12px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
    display: grid;
    gap: 10px;
}

.scope-context-card .scope-details-text {
    font-size: 0.98rem;
    line-height: 1.7;
    max-height: 240px;
    overflow: auto;
    padding-right: 4px;
}

.scope-context-label {
    display: block;
    color: #344054;
    font-size: 0.95rem;
    font-weight: 600;
}

.scope-agreement-accordion {
    margin: 0 0 16px;
    box-shadow: 0 4px 16px rgba(18, 32, 51, 0.04);
}

.scope-details-stack {
    display: grid;
    gap: 10px;
}

.scope-details-accordion {
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: #ffffff;
}

.scope-details-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 600;
    color: #344054;
    list-style: none;
}

.scope-details-accordion > summary::-webkit-details-marker {
    display: none;
}

.scope-details-accordion > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -2px;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.scope-details-accordion[open] > summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.scope-accordion-summary-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.scope-accordion-title {
    font-weight: 600;
    color: #344054;
}

.scope-accordion-subtext {
    font-weight: 400;
    font-size: 0.88rem;
    color: #667085;
}

.scope-details-accordion > summary:hover {
    background: #f8f9fc;
}

.scope-details-body {
    padding: 0 16px 16px;
}

.scope-details-text {
    margin: 0;
    color: #455066;
    line-height: 1.65;
}

.scope-details-preline {
    white-space: pre-line;
}

.scope-recorded-review {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eef8f1;
    border: 1px solid #c9e9d4;
    color: #1f5d3f;
    font-size: 0.9rem;
}

.scope-manual-disclosure {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .scope-impact-grid {
        grid-template-columns: 1fr;
    }
}

/* Sample Change Order walkthrough */
.sample-co-body {
    margin: 0;
    min-height: 100vh;
    background: #f6f8f7;
    color: #0b1720;
}

.sample-co-page {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.sample-co-hero {
    margin-bottom: 36px;
}

.sample-co-hero h1 {
    margin: 8px 0 14px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.sample-co-lead {
    margin: 0 0 14px;
    max-width: 720px;
    font-size: 1.12rem;
    line-height: 1.55;
    color: #455066;
}

.sample-co-context {
    margin: 0;
    max-width: 760px;
    color: #5b6978;
    line-height: 1.55;
}

.sample-co-steps {
    display: grid;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sample-co-card {
    padding: 22px 22px 18px;
    border: 1px solid #dfe8e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(11, 23, 32, 0.06);
}

.sample-co-card-copy {
    margin-bottom: 16px;
}

.sample-co-step-label {
    margin: 0 0 6px;
    color: #0e7a55;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sample-co-card-copy p:last-child {
    margin: 0;
    color: #31404c;
    font-size: 1.02rem;
    line-height: 1.5;
}

.sample-co-figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid #e4ece8;
    border-radius: 12px;
    background: #edf2ef;
}

.sample-co-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.sample-co-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 36px;
    padding: 22px 24px;
    border-radius: 16px;
    background: #0b1720;
    color: #fff;
}

.sample-co-cta p {
    margin: 0;
    font-size: 1.05rem;
}

@media (max-width: 720px) {
    .sample-co-page {
        width: min(1120px, calc(100% - 28px));
        padding-top: 28px;
    }

    .sample-co-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ScopeGuard Pro — shared shell refinements (Phase 1) */
.topbar-actions .button-danger,
.topbar-logout-form .button-danger,
.dashboard-mobile-logout-form .button-danger {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f3d1cf;
    font-weight: 600;
}

.topbar-actions .button-danger:hover,
.topbar-logout-form .button-danger:hover,
.dashboard-mobile-logout-form .button-danger:hover {
    background: rgba(180, 35, 24, 0.24);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* ScopeGuard Pro — shared app shell (Phase 1B) */
.app-shell-page .container,
.app-shell-page .form-container,
.app-shell-page .change-order-container,
.app-shell-page .analysis-container,
.app-shell-page .account-shell {
    margin-top: 0;
    max-width: 100%;
}

.app-shell-page .form-container,
.app-shell-page .change-order-container,
.app-shell-page .analysis-container {
    max-width: 980px;
}

.app-shell-page .account-shell {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

.app-shell-page .container {
    max-width: 1100px;
}

.app-page-toolbar {
    margin: 0 0 18px;
}

.app-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sg-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.app-page-back:hover {
    color: var(--sg-primary-hover);
    text-decoration: underline;
}

.dashboard-mobile-logout {
    width: auto;
    padding: 8px 12px;
    font-size: 0.875rem;
}

.dashboard-mobile-nav-link.is-active {
    color: #ffffff;
    background: rgba(14, 122, 85, 0.22);
    border-radius: 8px;
    padding: 6px 10px;
}

/* ScopeGuard Pro — final internal UI polish */
.app-shell-page .compact-project-header {
    margin-bottom: 24px;
}

.app-shell-page .project-inbox-module {
    padding: 22px 24px;
}

.app-shell-page .project-inbox-page-header {
    margin-bottom: 18px;
}

.app-shell-page .change-order-container,
.app-shell-page .analysis-container {
    margin-top: 0;
    padding-top: 4px;
    padding-bottom: 48px;
}

.app-shell-page .form-container {
    padding-top: 4px;
}

.app-shell-page .account-shell {
    padding-top: 4px;
}

.app-shell-page .account-panel {
    margin-bottom: 18px;
}

.app-shell-page .page-navigation {
    margin-bottom: 16px;
}

.app-shell-page .project-detail-compact > .success-message,
.app-shell-page .project-detail-compact > .demo-read-only-banner {
    margin-bottom: 16px;
}

.project-inbox-heading {
    gap: 16px;
}

.project-inbox-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

/* ScopeGuard Pro — auth page brand color lock */
.auth-body .eyebrow {
    color: var(--sg-primary-deep);
}

.auth-body .auth-card .eyebrow {
    color: var(--sg-primary-deep);
}

.auth-body .auth-submit {
    background: var(--sg-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
}

.auth-body .auth-submit:hover {
    background: var(--sg-primary-hover);
    color: #ffffff;
}

.auth-body .auth-submit:focus-visible {
    outline: 2px solid var(--sg-primary-deep);
    outline-offset: 2px;
}

.auth-body .auth-switch a {
    color: var(--sg-primary);
}

.auth-body .auth-switch a:hover {
    color: var(--sg-primary-hover);
}

.auth-body .form-group input:focus,
.auth-body .form-group textarea:focus {
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px var(--sg-focus-ring);
}

.auth-body .auth-success {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--sg-primary-border);
    border-radius: 8px;
    background: var(--sg-primary-soft);
    color: var(--sg-primary-deep);
    font-weight: 600;
    line-height: 1.5;
}
