/* =========================================================
   AI OFFERT - APPLICATION STYLES
   ========================================================= */
/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
    /* Brand */
    --color-primary: #166534;
    --color-primary-dark: #14532d;
    --color-primary-light: #f0fdf4;
    --color-primary-soft: #dcfce7;
    --color-primary-border: #bbf7d0;
    /* Text */
    --color-text: #17202a;
    --color-text-dark: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    /* Background */
    --color-background: #f5f7f9;
    --color-surface: #ffffff;
    --color-surface-muted: #f8fafc;
    /* Borders */
    --color-border: #e2e8f0;
    --color-border-light: #edf0f4;
    --color-border-dark: #cbd5e1;
    /* Status */
    --color-success: #166534;
    --color-success-bg: #ecfdf5;
    --color-warning: #a16207;
    --color-warning-bg: #fef9c3;
    --color-danger: #b42318;
    --color-danger-dark: #8f1d14;
    --color-danger-bg: #fff5f4;
    --color-danger-border: #e2c5c2;
    /* Radius */
    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.08);
    /* Layout */
    --content-width: 1100px;
    --home-width: 1180px;
}


/* =========================================================
   2. BASE
   ========================================================= */

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: 62px;
    background: var(--color-background);
    color: var(--color-text);
    font: 16px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bg-none {
    background-color: transparent !important;
}

.container {
    width: calc(100% - 40px);
    max-width: var(--content-width);
    margin: 0 auto;
}

.offer-total {
    border-top: 1px solid #ccc;
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================================
   3. FOCUS / ACCESSIBILITY
   ========================================================= */

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--color-primary);
}


/* =========================================================
   4. GENERAL ELEMENTS
   ========================================================= */

/*button {
    border: 0;
    border-radius: var(--radius-md);
    padding: 13px 20px;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

    button:hover {
        background: var(--color-primary-dark);
    }*/


/* =========================================================
   5. SITE HEADER / MAIN NAVIGATION
   ========================================================= */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0;
}

.site-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}

    .site-brand strong {
        font-size: 1.15rem;
    }

    .site-brand span {
        color: var(--color-text-muted);
        font-size: 0.9rem;
    }

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .site-nav a {
        display: inline-block;
        padding: 9px 14px;
        border-radius: var(--radius-sm);
        color: #344054;
        text-decoration: none;
        font-weight: 600;
        white-space: nowrap;
    }

        .site-nav a:hover {
            background: #f2f4f7;
            color: var(--color-text);
        }

        .site-nav a.active {
            background: var(--color-primary);
            color: white;
        }

/* ==========================================
   LOGIN CHOICE PAGE
========================================== */

.login-choice-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f5f7f9;
}

.login-choice-card {
    width: 100%;
    max-width: 680px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 42px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
}

.login-choice-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

    .login-choice-logo img {
        max-width: 175px;
        max-height: 65px;
        object-fit: contain;
    }

.login-choice-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-choice-eyebrow {
    display: inline-block;
    color: #166534;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.login-choice-header h1 {
    color: #0f172a;
    font-size: 27px;
    font-weight: 750;
    margin-bottom: 9px;
}

.login-choice-header p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Options */

.login-choice-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-choice-option {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    transition: all .2s ease;
}

    .login-choice-option:hover {
        text-decoration: none;
        color: inherit;
        border-color: #166534;
        box-shadow: 0 8px 22px rgba(22, 101, 52, 0.08);
        transform: translateY(-2px);
    }

    .login-choice-option:focus-visible {
        outline: 3px solid rgba(22, 101, 52, 0.25);
        outline-offset: 3px;
    }

/* Icons */

.login-choice-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 21px;
}

.company-icon {
    color: #166534;
    background: #dcfce7;
}

.customer-icon {
    color: #2563eb;
    background: #eff6ff;
}

/* Content */

.login-choice-content {
    flex: 1;
    min-width: 0;
}

.login-choice-label {
    display: block;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 5px;
}

.login-choice-content h2 {
    color: #0f172a;
    font-size: 17px;
    font-weight: 750;
    margin: 0 0 7px;
}

.login-choice-content p {
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 13px;
}

/* Login method indicators */

.login-choice-methods {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

    .login-choice-methods span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
    }

    .login-choice-methods i {
        color: #166534;
    }

/* Arrow */

.login-choice-arrow {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    color: #166534;
    background: #f0fdf4;
    border-radius: 50%;
    transition: all .2s ease;
}

.login-choice-option:hover .login-choice-arrow {
    color: #ffffff;
    background: #166534;
}

/* Footer */

.login-choice-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 28px;
}

    .login-choice-footer i {
        color: #166534;
    }

/* Responsive */

@media (max-width: 575.98px) {

    .login-choice-page {
        padding: 20px 12px;
    }

    .login-choice-card {
        padding: 28px 18px;
        border-radius: 17px;
    }

    .login-choice-header h1 {
        font-size: 23px;
    }

    .login-choice-option {
        padding: 17px 13px;
        gap: 12px;
    }

    .login-choice-icon {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
        font-size: 18px;
    }

    .login-choice-content h2 {
        font-size: 15px;
    }

    .login-choice-arrow {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .login-choice-methods {
        gap: 7px 10px;
    }
}
/* =========================================================
   6. LOGIN
   ========================================================= */

.login-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 521px;
    padding: 42px;
    background: var(--color-surface);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.login-header {
    margin-bottom: 34px;
    text-align: center;
}

.login-logo {
    min-width: 110px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 0 16px;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: white;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.login-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-header p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 15px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-button {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: white;
    color: #111827;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

    .login-button:hover {
        color: #111827;
        text-decoration: none;
        border-color: var(--color-primary);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

    button.login-button:hover {
        color: #111827;
        text-decoration: none;
        border-color: var(--color-primary);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.login-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .login-icon img {
        display: block;
        width: 32px;
        height: 32px;
        object-fit: contain;
    }

.logo-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-icon img {
        display: block;
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

.bankid-icon img {
    width: 62px;
    height: 62px;
}

.login-button-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .login-button-text strong {
        font-size: 15px;
        font-weight: 600;
    }

    .login-button-text small {
        color: var(--color-text-muted);
        font-size: 12px;
    }

.login-arrow {
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

/*.login-button:hover .login-arrow {
    transform: translateX(3px);
    color: var(--color-primary);
}*/

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: var(--color-text-light);
    font-size: 12px;
}

/* Show password section when browser autofills the email */
.email-login-form:has(#loginEmail:autofill) #passwordSection {
    display: block;
}

/* Hide it otherwise */
.email-login-form #passwordSection {
    display: none;
}
/* End of login */
.btn-success {
    background-color: #166534;
    border-color: #166534;
}

    .btn-success:hover {
        background-color: #14532d;
        border-color: #14532d;
    }

.text-success {
    color: #166534 !important;
}

/* =========================================================
   AI OFFER - COMPANY SETUP
   ========================================================= */
.company-setup {
    min-height: calc(100vh - 70px);
    padding: 36px 24px 60px;
    background: #f8fafc;
}

.company-setup-container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.company-setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.company-setup-title {
    min-width: 0;
}

.company-setup .brand {
    margin-bottom: 12px;
    color: #166534;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.company-setup-header h1 {
    margin: 0;
    color: #17202a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.company-setup-header p {
    max-width: 680px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.setup-step {
    flex-shrink: 0;
    margin-top: 3px;
    padding: 6px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    background: #f0fdf4;
    color: #166534;
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================
   OFFER WORKFLOW
========================================== */

.offer-workflow {
    --workflow-green: #166534;
    --workflow-green-dark: #14532d;
    --workflow-green-light: #f0fdf4;
    --workflow-green-soft: #dcfce7;
    --workflow-green-border: #bbf7d0;
    --workflow-border: #e2e8f0;
    --workflow-muted: #64748b;
    --workflow-muted-light: #94a3b8;
    background: #ffffff;
    border: 1px solid var(--workflow-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.035);
}


/* ==========================================
   HEADER
========================================== */

.workflow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.workflow-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--workflow-green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
    margin-bottom: 8px;
}

.workflow-title {
    color: #0f172a;
    font-size: 19px;
    font-weight: 750;
    margin: 0 0 5px;
}

.workflow-description {
    color: var(--workflow-muted);
    font-size: 13px;
    margin: 0;
}


/* ==========================================
   CURRENT STATUS
========================================== */

.workflow-current-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: 30px;
    background: var(--workflow-green-light);
    color: var(--workflow-green);
    border: 1px solid var(--workflow-green-border);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .workflow-current-status.accepted {
        background: var(--workflow-green);
        border-color: var(--workflow-green);
        color: #ffffff;
    }

.workflow-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--workflow-green);
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.10);
}

.workflow-current-status.accepted .workflow-status-dot {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}


/* ==========================================
   HORIZONTAL SCROLL
========================================== */

.workflow-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

    .workflow-scroll::-webkit-scrollbar {
        height: 5px;
    }

    .workflow-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .workflow-scroll::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }


/* ==========================================
   WORKFLOW TRACK
========================================== */

.workflow-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(115px, 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 760px;
}

.workflow-step {
    position: relative;
    min-width: 0;
}


/* ==========================================
   MARKER AND CONNECTOR
========================================== */

.workflow-marker-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    margin-bottom: 14px;
}

.workflow-connector {
    position: absolute;
    height: 3px;
    left: calc(50% + 23px);
    right: -50%;
    top: 21px;
    border-radius: 10px;
    background: #e2e8f0;
    z-index: 0;
    transition: background .25s ease;
}

    .workflow-connector.is-complete {
        background: var(--workflow-green);
    }


/* ==========================================
   STEP ICONS
========================================== */

.workflow-marker {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    font-size: 15px;
    transition: all .25s ease;
}

/* Completed */

.workflow-step.is-completed .workflow-marker {
    background: var(--workflow-green-soft);
    border-color: var(--workflow-green-border);
    color: var(--workflow-green);
}

/* Current */

.workflow-step.is-current .workflow-marker {
    background: var(--workflow-green);
    border-color: var(--workflow-green);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(22, 101, 52, 0.12);
    transform: scale(1.08);
}

/* Accepted */

.workflow-step.is-accepted .workflow-marker {
    background: var(--workflow-green);
    border-color: var(--workflow-green);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(22, 101, 52, 0.15);
    transform: scale(1.08);
}


/* ==========================================
   STEP CONTENT
========================================== */

.workflow-step-content {
    text-align: center;
    padding: 0 5px;
}

.workflow-step-number {
    display: block;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.workflow-step-title {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
}

.workflow-step-description {
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.4;
    min-height: 28px;
}


/* ==========================================
   STEP STATUS
========================================== */

.workflow-step-state {
    margin-top: 9px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}

    .workflow-step-state i {
        margin-right: 3px;
    }

/* Completed */

.workflow-step.is-completed .workflow-step-title,
.workflow-step.is-completed .workflow-step-state {
    color: var(--workflow-green);
}

/* Current */

.workflow-step.is-current .workflow-step-title,
.workflow-step.is-current .workflow-step-state {
    color: var(--workflow-green-dark);
    font-weight: 800;
}

/* Accepted */

.workflow-step.is-accepted .workflow-step-title,
.workflow-step.is-accepted .workflow-step-state {
    color: var(--workflow-green);
    font-weight: 800;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 575.98px) {

    .offer-workflow {
        padding: 18px 14px;
    }

    .workflow-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 25px;
    }

    .workflow-title {
        font-size: 17px;
    }

    .workflow-current-status {
        align-self: flex-start;
    }

    .workflow-track {
        min-width: 760px;
    }
}


/* ==========================================
   PRINT
========================================== */

@media print {

    .offer-workflow {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        break-inside: avoid;
    }

    .workflow-scroll {
        overflow: visible;
    }

    .workflow-track {
        min-width: 0;
    }
}

/* =========================================================
   SECTIONS
   ========================================================= */

.setup-section {
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.section-heading {
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1f5;
}

    .section-heading h2 {
        margin: 0;
        color: #17202a;
        font-size: 16px;
        font-weight: 700;
    }

    .section-heading p {
        margin: 5px 0 0;
        color: #64748b;
        font-size: 13px;
    }


/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 18px;
}

    .form-group:last-child {
        margin-bottom: 0;
    }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #17202a;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .form-control:hover {
        border-color: #98a2b3;
    }

    .form-control:focus {
        border-color: #166534;
        outline: none;
        box-shadow: 0 0 0 3px rgba(22, 101, 52, .10);
    }

    .form-control::placeholder {
        color: #98a2b3;
    }


/* =========================================================
   MICROSOFT ACCOUNT
   ========================================================= */

.microsoft-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 13px 15px;
    border: 1px solid #dcfce7;
    border-radius: 6px;
    background: #f0fdf4;
}

.microsoft-account-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #166534;
    font-size: 13px;
    font-weight: 600;
}

.microsoft-account strong {
    color: #344054;
    font-size: 13px;
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
}


/* =========================================================
   VALIDATION
   ========================================================= */

.validation-summary {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fef2f2;
    color: #b42318;
    font-size: 13px;
}

    .validation-summary:empty {
        display: none;
    }

.text-danger {
    display: block;
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.setup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.setup-actions-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .setup-actions-info strong {
        color: #17202a;
        font-size: 13px;
        font-weight: 600;
    }

    .setup-actions-info span {
        color: #64748b;
        font-size: 12px;
    }


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.company-setup .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #166534;
    border-radius: 6px;
    background: #166534;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}

    .company-setup .btn-primary:hover {
        border-color: #14532d;
        background: #14532d;
        color: #ffffff;
    }

    .company-setup .btn-primary:focus {
        border-color: #166534;
        outline: none;
        box-shadow: 0 0 0 3px rgba(22, 101, 52, .15);
    }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    .company-setup {
        padding: 24px 14px 40px;
    }

    .company-setup-header {
        flex-direction: column;
        gap: 12px;
    }

    .setup-step {
        margin-top: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .setup-section {
        padding: 20px;
    }

    .setup-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .company-setup .btn-primary {
        width: 100%;
    }

    .microsoft-account {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }
}

/* =========================================================
   7. HERO / GENERAL LANDING CONTENT
   ========================================================= */
.hero {
    padding: 0px 0 30px;
}

    .hero small {
        color: var(--color-primary);
        font-weight: 800;
        letter-spacing: 0.12em;
    }

    .hero h1 {
        margin: 12px 0;
        font-size: clamp(38px, 6vw, 64px);
        line-height: 1.05;
    }

    .hero p {
        max-width: 700px;
        color: var(--color-text-muted);
        font-size: 20px;
    }

/* =========================================================
    TENANT PAGE
   ========================================================= */

    .tenant-card-link {
        display: block;
        height: 100%;
        color: inherit;
        text-decoration: none;
    }

    .tenant-card {
        border-radius: 14px;
        transition: transform 0.2s ease,
                    box-shadow 0.2s ease;
    }

    .tenant-card-link:hover .tenant-card {
        transform: translateY(-4px);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.10) !important;
    }

    .tenant-card-link:focus-visible {
        outline: 2px solid #0d6efd;
        outline-offset: 4px;
        border-radius: 14px;
    }

    .icon-container {
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }

    .icon-container > i {
        font-size: 1.65rem;
    }

    .icon-customers {
        background-color: rgba(13, 110, 253, 0.10);
        color: #0d6efd;
    }

    .icon-products {
        background-color: rgba(25, 135, 84, 0.10);
        color: #198754;
    }

    .icon-settings {
        background-color: rgba(255, 193, 7, 0.15);
        color: #997404;
    }

    .icon-invoices {
        background-color: rgba(25, 135, 84, 0.12);
        color: #198754;
    }

    .icon-jobs {
        background-color: rgba(13, 110, 253, 0.12);
        color: #0d6efd;
    }

    .icon-company {
        background-color: rgba(13, 202, 240, 0.12);
        color: #087990;
    }

    .card-title {
        margin-bottom: 0.75rem;
    }

    .card-text {
        min-height: 72px;
        line-height: 1.6;
    }

.tenant-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.tenant-card {
    height: 100%;
    border-radius: 14px;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.tenant-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tenant-card-link:hover .tenant-card {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.10) !important;
}

.card-title {
    margin-bottom: 0.75rem;
}

.card-text {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-top: auto;
    padding-top: 1rem;
}

.card-link-text > i {
    transition: transform 0.2s ease;
}

.tenant-card-link:hover .card-link-text > i {
    transform: translateX(4px);
}

/*Home page*/

/* Shared illustrations */
.home-story-image {
    width: 100%;
    margin: 2rem auto 3rem;
    overflow: hidden;
    border-radius: 22px;
    background: #f5f8fd;
    border: 1px solid rgba(35, 85, 160, 0.08);
    box-shadow: 0 14px 40px rgba(25, 55, 100, 0.07);
}

    .home-story-image img {
        display: block;
        width: 100%;
        height: auto;
        object-fit: contain;
    }

/* AI quotation section */
.home-ai-work {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.home-ai-image {
    max-width: 1200px;
}

/* Quotation-to-invoice section */
.home-quotation-to-payment {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.home-workflow-image {
    max-width: 1400px;
}

/* Keep the four AI cards aligned */
.home-ai-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

    .home-ai-feature-grid .home-feature-card {
        height: 100%;
    }

/* Six workflow steps */
.home-quotation-to-payment .home-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin-top: 2.5rem;
}

.home-quotation-to-payment .home-step {
    min-width: 0;
}

/* Tablet */
@media (max-width: 992px) {
    .home-ai-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-quotation-to-payment .home-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-story-image {
        border-radius: 16px;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .home-ai-work,
    .home-quotation-to-payment {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

        .home-ai-feature-grid,
        .home-quotation-to-payment .home-steps {
            grid-template-columns: 1fr;
            gap: 1rem;
        }

    .home-story-image {
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(25, 55, 100, 0.06);
    }
}

/*End of Home page styling*/

/* AI Offert brand styling */
.privacy-page {
    --bs-primary: var(--color-primary, #166534);
    --bs-primary-rgb: 22, 101, 52;
    --bs-info: var(--color-primary, #166534);
    --bs-info-rgb: 22, 101, 52;
    --bs-success: var(--color-primary, #166534);
    --bs-success-rgb: 22, 101, 52;
    color: var(--color-text, #17202a);
}

    .privacy-page .text-primary,
    .privacy-page .text-info,
    .privacy-page .text-success {
        color: var(--color-primary, #166534) !important;
    }

    .privacy-page .bg-primary,
    .privacy-page .bg-info,
    .privacy-page .bg-success {
        --bs-bg-opacity: .10;
        background-color: var(--color-primary-soft, #dcfce7) !important;
    }

    .privacy-page .alert-primary {
        color: var(--color-text, #17202a);
        background: var(--color-primary-light, #f0fdf4);
        border: 1px solid var(--color-primary-border, #bbf7d0) !important;
    }

    .privacy-page .card {
        background-color: var(--color-surface, #fff);
        border: 1px solid var(--color-border-light, #edf0f4) !important;
        border-radius: var(--radius-xl, 18px) !important;
        box-shadow: var(--shadow-sm, 0 4px 12px rgba(0,0,0,.06)) !important;
    }

    .privacy-page .bg-light {
        background-color: var(--color-surface-muted, #f8fafc) !important;
    }

    .privacy-page .nav-link {
        color: var(--color-text-secondary, #475569) !important;
        border-radius: var(--radius-md, 10px) !important;
        transition: background-color .2s ease, color .2s ease;
    }

        .privacy-page .nav-link:hover,
        .privacy-page .nav-link:focus {
            color: var(--color-primary-dark, #14532d) !important;
            background-color: var(--color-primary-light, #f0fdf4);
        }

    .privacy-page a:not(.btn) {
        text-underline-offset: 3px;
    }

        .privacy-page a:not(.btn):hover {
            color: var(--color-primary-dark, #14532d);
        }

    .privacy-page .border,
    .privacy-page hr {
        border-color: var(--color-border, #e2e8f0) !important;
    }

    .privacy-page .btn-light {
        color: var(--color-primary-dark, #14532d);
    }

    .privacy-page .btn-outline-light:hover {
        color: var(--color-primary-dark, #14532d);
    }

    .privacy-page section[id] {
        scroll-margin-top: 1.5rem;
    }

@media (max-width: 991.98px) {
    .privacy-page .privacy-sidebar {
        position: static !important;
    }
}

/* End of AI Offert - Privacy page */


/* ================================
   AI Offert Footer
   ================================ */

.site-footer {
    background: var(--color-primary-dark);
    color: #ffffff;
    margin-top: 3rem;
    font-size: 0.94rem;
}

    .site-footer .footer-brand {
        color: #ffffff;
    }

    .site-footer .footer-logo {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        flex-shrink: 0;
        padding: 5px;
        background: #ffffff;
        border-radius: 12px;
    }

        .site-footer .footer-logo img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

    .site-footer .footer-brand-name {
        font-size: 1.45rem;
        font-weight: 750;
        letter-spacing: -0.04em;
    }

    .site-footer .footer-description {
        color: #cbd5e1;
        line-height: 1.8;
        max-width: 420px;
        margin-bottom: 1rem;
    }

    .site-footer .footer-company {
        color: #94a3b8;
        font-size: 0.9rem;
    }

        .site-footer .footer-company strong {
            color: #e2e8f0;
        }

    .site-footer .footer-heading {
        color: #ffffff;
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 1.25rem;
    }

    .site-footer .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .site-footer .footer-links li {
            margin-bottom: 0.8rem;
        }

        .site-footer .footer-links a,
        .site-footer .footer-bottom a {
            color: #cbd5e1;
            text-decoration: none;
            transition: color 0.2s ease;
        }

            .site-footer .footer-links a i {
                width: 16px;
                color: #86efac;
            }

            .site-footer .footer-links a:hover,
            .site-footer .footer-bottom a:hover {
                color: #86efac;
            }

    .site-footer .footer-contact-link {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        color: #ffffff;
        font-weight: 600;
        text-decoration: none;
        margin: 0.25rem 0 1rem;
        overflow-wrap: anywhere;
    }

        .site-footer .footer-contact-link:hover {
            color: #86efac;
        }

    .site-footer .footer-contact-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        color: #bbf7d0;
        background: rgba(22, 101, 52, 0.45);
        border: 1px solid rgba(134, 239, 172, 0.2);
        border-radius: 10px;
    }

    .site-footer .footer-contact-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        color: #cbd5e1;
        line-height: 1.7;
        margin-top: 0.75rem;
    }

        .site-footer .footer-contact-item > i {
            width: 18px;
            margin-top: 0.25rem;
            flex-shrink: 0;
            color: #86efac;
        }

    .site-footer .footer-bottom {
        padding: 1.25rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        color: #94a3b8;
        font-size: 0.85rem;
    }

    .site-footer .footer-powered {
        color: #cbd5e1;
    }

    .site-footer .footer-separator {
        margin: 0 0.5rem;
        color: #64748b;
    }

    .site-footer a:focus-visible {
        outline: 2px solid #86efac;
        outline-offset: 4px;
        border-radius: 3px;
    }

@media (max-width: 767.98px) {
    .site-footer {
        margin-top: 2rem;
    }

        .site-footer .footer-bottom {
            text-align: left;
        }
}

/* =========================================================
   8. GENERAL CARDS / FORMS
   ========================================================= */

.card,
.paper {
    margin-bottom: 25px;
    padding: 32px;
    background: white;
    border: 1px solid #e3e6ea;
    border-radius: var(--radius-xl);
}

    .card label {
        display: block;
        margin: 18px 0;
        font-weight: 700;
    }

    .card input,
    .card textarea {
        display: block;
        width: 100%;
        margin-top: 7px;
        padding: 13px;
        border: 1px solid #ccd2d9;
        border-radius: 9px;
        font: inherit;
    }

    /*.card button:not(.delete-button) {
        background: var(--color-primary);
    }

        .card button:not(.delete-button):hover {
            background: var(--color-primary-dark);
        }*/

.paper {
    border-radius: 4px;
}

    .paper table {
        width: 100%;
        border-collapse: collapse;
    }

    .paper th,
    .paper td {
        padding: 14px 8px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

.total {
    margin-top: 25px;
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
}


/* =========================================================
   9. DASHBOARD
   ========================================================= */

.page-container {
    /*max-width: 1600px;*/
    margin: 0 auto;
    padding: 32px 40px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

    .page-header h1 {
        margin: 0;
        font-size: 32px;
        font-weight: 700;
    }

    .page-header p {
        margin: 8px 0 0;
        color: var(--color-text-muted);
    }


/* Dashboard buttons */

.page-actions {
    margin-bottom: 20px;
}

.action-button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: 0.15s ease;
}

.action-button,
.primary-button {
    background: var(--color-primary);
    color: white;
}

    .action-button:hover,
    .primary-button:hover {
        background: var(--color-primary-dark);
        color: white;
        transform: translateY(-1px);
    }

.secondary-button {
    background: #f1f5f9;
    color: #1e293b;
}

    .secondary-button:hover {
        background: #e2e8f0;
        color: #1e293b;
    }

.full-width {
    width: 100%;
}


/* Dashboard statistics */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-stat-card {
    display: flex;
    gap: 16px;
    padding: 22px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: 0.15s ease;
}

    .dashboard-stat-card:hover {
        border-color: var(--color-border-dark);
        transform: translateY(-1px);
    }

.stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 21px;
}

.stat-icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-icon-orange {
    background: #fff7ed;
    color: #ea580c;
}

.stat-icon-purple {
    background: #faf5ff;
    color: #9333ea;
}

.stat-icon-green {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.stat-content {
    min-width: 0;
}

.stat-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 14px;
}

.stat-content strong {
    display: block;
    margin: 4px 0;
    color: var(--color-text-dark);
    font-size: 28px;
}

.stat-content small {
    color: var(--color-text-light);
}


/* Dashboard grid */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.dashboard-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.dashboard-card-large {
    grid-column: span 1;
}

.dashboard-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #f1f5f9;
}

    .dashboard-card-header h2 {
        margin: 0;
        color: var(--color-text-dark);
        font-size: 18px;
    }

    .dashboard-card-header p {
        margin: 5px 0 0;
        color: var(--color-text-muted);
        font-size: 13px;
    }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

    .card-header h2 {
        margin: 0;
    }

.card-link {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

    .card-link:hover {
        color: var(--color-primary-dark);
    }


/* Dashboard table */

.dashboard-table-wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

    .dashboard-table th,
    .dashboard-table td {
        padding: 15px 24px;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
    }

    .dashboard-table th {
        color: var(--color-text-muted);
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .dashboard-table td {
        color: #475569;
        font-size: 14px;
    }

        .dashboard-table td strong {
            color: var(--color-text-dark);
        }

.table-action {
    text-align: right !important;
}

    .table-action a {
        color: var(--color-text-muted);
        text-decoration: none;
        font-size: 18px;
    }


/* Dashboard lists */

.dashboard-list {
    padding: 8px 0;
}

.dashboard-list-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 15px 24px;
    border-bottom: 1px solid #f1f5f9;
    color: inherit;
    text-decoration: none;
}

    .dashboard-list-item:last-child {
        border-bottom: 0;
    }

    .dashboard-list-item:hover {
        background: var(--color-surface-muted);
    }

    .dashboard-list-item strong,
    .dashboard-list-item span {
        display: block;
    }

    .dashboard-list-item strong {
        color: var(--color-text-dark);
        font-size: 14px;
    }

    .dashboard-list-item div span {
        margin-top: 4px;
        color: var(--color-text-muted);
        font-size: 13px;
    }

.list-arrow {
    color: var(--color-text-light);
}


/* Dashboard subscription */

.subscription-card {
    padding-bottom: 22px;
}

.subscription-plan {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 24px;
    padding: 16px;
    background: var(--color-primary-light);
    border-radius: 10px;
}

.subscription-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.subscription-plan strong {
    display: block;
    color: var(--color-text-dark);
}

.subscription-status {
    display: block;
    margin-top: 3px;
    color: var(--color-primary);
    font-size: 13px;
}

.subscription-details {
    margin-bottom: 20px;
    padding: 0 24px;
}

    .subscription-details div {
        display: flex;
        justify-content: space-between;
        padding: 9px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .subscription-details span {
        color: var(--color-text-muted);
        font-size: 13px;
    }

    .subscription-details strong {
        color: var(--color-text-dark);
        font-size: 13px;
    }


/* =========================================================
   10. OFFERS / OFFER TABLE
   ========================================================= */

.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.offers-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

    .offers-table th {
        padding: 12px;
        text-align: left;
        border-bottom: 2px solid #ddd;
        white-space: nowrap;
    }

    .offers-table td {
        padding: 14px 12px;
        vertical-align: middle;
        border-bottom: 1px solid #eee;
    }

    .offers-table tbody tr:hover {
        background: #fafafa;
    }

.customer-name {
    font-weight: 600;
}

.customer-email {
    margin-top: 3px;
    color: #777;
    font-size: 0.85rem;
}

.action-column {
    width: 90px;
    text-align: right !important;
    white-space: nowrap;
}

.view-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

    .view-link:hover {
        color: var(--color-primary-dark);
        text-decoration: underline;
    }


/* Offer actions */

.offer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.offer-delete {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

    .offer-delete form {
        margin: 0;
    }

.delete-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: transparent;
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

    .delete-button:hover {
        background: var(--color-danger-bg);
        border-color: #c99a96;
        color: var(--color-danger-dark);
    }


/* Offer tabs */

.offer-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.offer-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 2px solid transparent;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, border-color 0.2s ease;
}

    .offer-tab:hover {
        color: var(--color-primary);
        text-decoration: none;
    }

    .offer-tab.active {
        /*border-bottom-color: var(--color-primary);*/
        color: var(--color-primary);
    }

.offer-tab-count {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #f1f1f1;
    font-size: 12px;
}

.offer-tab.active .offer-tab-count {
    background: var(--color-primary-soft);
}

.offers-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 0.75rem;
}

    .offers-card .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

.offers-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.offer-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.offers-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

    .offers-card .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
/* Customer link */

.customer-link-box {
    margin-top: 16px;
    padding: 16px;
    overflow-wrap: anywhere;
    background: #f7f7f7;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
}

    .customer-link-box a {
        color: inherit;
        text-decoration: underline;
    }

    .customer-link-box code {
        font-size: 13px;
    }

.customer-link-actions {
    margin-top: 16px;
}

.customer-link-expiry {
    margin-top: 16px;
    color: #666;
}

    .customer-link-expiry strong {
        color: #222;
    }


/* New offer animation */

.offer-row-new {
    animation: offerFadeIn 0.6s ease-out;
}

@keyframes offerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======================================================
    SWIDISH OFFER DESIGN
   ====================================================== */

.swedish-offer {
    max-width: 1000px;
    margin: 24px auto;
    padding: 40px;
    background: #fff;
    color: #222;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.company-block {
    flex: 1;
    overflow-wrap: anywhere;
}

    .company-block h2 {
        margin: 8px 0;
        font-size: 20px;
    }

.company-logo {
    display: block;
    max-width: 180px;
    max-height: 75px;
    object-fit: contain;
    margin-bottom: 12px;
}

.offer-heading {
    min-width: 230px;
    text-align: right;
}

    .offer-heading h1 {
        margin: 0 0 14px;
        font-size: 30px;
        letter-spacing: 2px;
    }

.offer-number {
    margin-bottom: 6px;
}

.offer-divider {
    border: 0;
    border-top: 2px solid #333;
    margin: 26px 0;
}

.offer-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

    .offer-parties h3,
    .offer-notes h3 {
        font-size: 12px;
        letter-spacing: 1px;
        margin: 0 0 12px;
        color: #555;
    }

.customer-block > strong,
.project-block > strong {
    display: block;
    margin-bottom: 5px;
}

.project-block p,
.offer-notes p {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.offer-lines-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .offer-lines-table thead {
        display: table-header-group;
    }

    .offer-lines-table th {
        padding: 11px 8px;
        background: #f0f1f2;
        border-top: 1px solid #bbb;
        border-bottom: 1px solid #888;
        text-align: left;
        font-weight: 600;
        vertical-align: bottom;
    }

    .offer-lines-table td {
        padding: 10px 8px;
        border-bottom: 1px solid #ddd;
        vertical-align: top;
        overflow-wrap: anywhere;
    }

    .offer-lines-table tbody tr {
        break-inside: avoid;
    }

    .offer-lines-table .numeric {
        text-align: right;
        white-space: nowrap;
    }

.offer-summary {
    width: min(100%, 360px);
    margin: 24px 0 0 auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

    .summary-row > :last-child {
        text-align: right;
        white-space: nowrap;
    }

.grand-total {
    margin-top: 6px;
    padding: 14px 0;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    font-size: 16px;
}

.offer-notes {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #ccc;
}

.offer-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid #ccc;
    color: #555;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.footer-company {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.footer-registration {
    text-align: right;
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 650px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-registration {
        text-align: left;
    }
}

@media (max-width: 650px) {
    .swedish-offer {
        padding: 20px;
    }

    .offer-header {
        flex-direction: column;
        gap: 24px;
    }

    .offer-heading {
        min-width: 0;
        text-align: left;
    }

    .offer-parties {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 15mm;
    }

    body {
        background: #fff !important;
    }

    .swedish-offer {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        font-size: 10pt;
    }

    .table-responsive {
        overflow: visible;
    }

    .offer-lines-table {
        font-size: 9pt;
    }

        .offer-lines-table th,
        .offer-lines-table td {
            padding: 6px 5px;
        }

    .offer-summary,
    .offer-notes,
    .offer-footer {
        break-inside: avoid;
    }

    .offer-lines-table tr {
        break-inside: avoid;
    }

    .offer-lines-table th {
        background: #f0f1f2 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* =========================================================
   11. STATUS
   ========================================================= */
.status,
.status-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status {
    padding: 4px 9px;
}

.status-badge {
    padding: 5px 9px;
}

.status-pendingapproval,
.status-warning {
    background: #fff7ed;
    color: #a16207;
}

.status-approved {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.status-accepted {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-sent {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-seen {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-rejected,
.status-failed {
    background: #fdecec;
    color: #a12626;
}

.status-new {
    background: #eff6ff;
    color: #2563eb;
}


/* =========================================================
   12. EMPTY STATES
   ========================================================= */

.empty-state {
    padding: 50px 24px;
    text-align: center;
    color: var(--color-text-muted);
}

.empty-state-icon {
    color: var(--color-text-light);
    font-size: 32px;
}

.empty-state h3 {
    margin: 12px 0 6px;
    color: var(--color-text-dark);
}

.empty-state p {
    margin: 0 0 20px;
    color: var(--color-text-muted);
}

.empty-state a {
    font-weight: 600;
}

.small-empty-state {
    padding: 32px 24px;
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
}

/* =========================================================
    Company Settings
   ========================================================= */
.settings-section {
    max-width: 100%;
}

.section-divider {
    border-color: #e5e7eb;
    opacity: 1;
}

.settings-section .form-label {
    margin-bottom: 0.5rem;
}

.settings-section .form-control,
.settings-section .form-select {
    min-height: 44px;
    border-color: #d1d5db;
    border-radius: 0.375rem;
}

.settings-section textarea.form-control {
    min-height: auto;
}

.settings-section .form-control:focus,
.settings-section .form-select:focus {
    border-color: #86b7a0;
    box-shadow: 0 0 0 0.2rem rgba(22, 101, 52, 0.12);
}

.setting-option .form-check-input {
    cursor: pointer;
    width: 2.5em;
    height: 1.25em;
    margin-top: 0.15em;
}

    .setting-option .form-check-input:checked {
        background-color: #166534;
        border-color: #166534;
    }

.setting-option .form-check-label {
    cursor: pointer;
}

.inbound-email-group {
    align-items: stretch;
}

    .inbound-email-group .form-control,
    .inbound-email-group .btn {
        height: 44px;
        min-height: 44px;
        box-sizing: border-box;
        margin: 0;
        line-height: 1.5;
    }

    .inbound-email-group .form-control {
        border-radius: 0.375rem 0 0 0.375rem;
    }

    .inbound-email-group .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
        border-radius: 0 0.375rem 0.375rem 0;
    }

.input-group {
    align-items: stretch;
}

    .input-group .form-control,
    .input-group .btn {
        height: 44px;
        min-height: 44px;
        box-sizing: border-box;
        margin: 0;
        line-height: 1.5;
    }

    .input-group .form-control {
        border-radius: 0.375rem 0 0 0.375rem;
    }

    .input-group .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
        border-radius: 0 0.375rem 0.375rem 0;
    }

.form-check-input {
    margin-right: 0.5rem;
}

.logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #fff;
}

.company-logo {
    display: block;
    max-width: 180px;
    max-height: 90px;
    object-fit: contain;
}

.btn-success {
    background-color: #166534;
    border-color: #166534;
}

    .btn-success:hover,
    .btn-success:focus {
        background-color: #14532d;
        border-color: #14532d;
    }

@media (max-width: 575.98px) {
    .card-body {
        padding: 1.25rem !important;
    }

    .inbound-email-group .btn {
        min-width: 84px;
        padding-inline: 0.75rem;
    }
}

/* =========================================================
   13. DEMO / TEST AREA
   ========================================================= */

.demo-card {
    margin-bottom: 24px;
}

.card-description {
    margin: 4px 0 0;
    color: #666;
}

.demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.demo-button {
    padding: 12px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
}

    .demo-button:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

    .demo-button:disabled {
        opacity: 0.5;
        cursor: wait;
    }

.demo-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 14px;
}


/* =========================================================
   14. HOME PAGE
   ========================================================= */

.home-page {
    min-height: 100vh;
    background: white;
    color: #172033;
}

.home-container {
    width: min(var(--home-width), calc(100% - 40px));
    margin: 0 auto;
}


/* Home navigation */

.home-nav {
    border-bottom: 1px solid #edf0f5;
    background: rgba(255, 255, 255, 0.96);
}

.home-nav-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #172033;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.home-brand-mark {
    max-width: 200px;
    height: 38px;
    padding: 0px 10px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--color-primary);
    color: white;
    font-size: 13px;
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .home-nav-links a {
        color: #5f6878;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
    }

        .home-nav-links a:hover {
            color: var(--color-primary);
        }

.home-login-link {
    padding: 10px 17px;
    border: 1px solid #dfe4ec;
    border-radius: 9px;
}

    .home-login-link:hover {
        border-color: var(--color-primary);
    }


/* Home hero */

.home-hero {
    padding: 60px 0 100px;
    background: radial-gradient( circle at 80% 20%, #eaf7ef 0, transparent 32% ), linear-gradient( 180deg, #ffffff 0%, #f8fbf9 100% );
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    align-items: center;
    gap: 80px;
}

.home-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(44px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.home-hero-text {
    max-width: 620px;
    margin: 28px 0 0;
    color: #626c7c;
    font-size: 19px;
    line-height: 1.7;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.home-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: 0.15s ease;
}

.home-btn-primary {
    background: var(--color-primary);
    color: white;
}

    .home-btn-primary:hover {
        background: var(--color-primary-dark);
        color: white;
        transform: translateY(-1px);
    }

.home-btn-secondary {
    border: 1px solid #d9dfe9;
    background: white;
    color: #172033;
}

    .home-btn-secondary:hover {
        background: var(--color-primary-light);
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

.home-btn-light {
    background: white;
    color: #172033;
}

.home-trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
    color: #6d7686;
    font-size: 13px;
}


/* Home offer preview */

.home-hero-visual {
    position: relative;
}

.offer-preview {
    padding: 28px;
    background: white;
    border: 1px solid #e4e8ef;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 70px rgba(25, 40, 70, 0.12);
}

.offer-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 22px;
    border-bottom: 1px solid #edf0f4;
}

    .offer-preview-header div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

.offer-preview-label {
    color: #7a8494;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.offer-preview-header strong {
    font-size: 16px;
}

.offer-preview-status {
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
}

.offer-preview-company,
.offer-preview-customer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.offer-preview-company {
    padding: 22px 0;
}

.offer-preview-customer {
    margin-bottom: 22px;
}

    .offer-preview-company span,
    .offer-preview-customer span,
    .offer-preview-line span,
    .offer-preview-footer {
        color: #7b8493;
        font-size: 12px;
    }

    .offer-preview-customer span {
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.08em;
    }

.offer-preview-lines {
    border-top: 1px solid #edf0f4;
}

.offer-preview-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f4;
}

    .offer-preview-line div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

.offer-preview-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
}

    .offer-preview-total span {
        color: #667080;
        font-size: 13px;
    }

    .offer-preview-total strong {
        font-size: 21px;
    }

.offer-preview-footer {
    padding-top: 22px;
    text-align: center;
}


/* Home sections */

.home-value,
.home-how,
.home-pricing {
    padding: 100px 0;
}

.home-section-heading {
    max-width: 720px;
    margin-bottom: 50px;
}

    .home-section-heading.center {
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .home-section-heading h2 {
        margin: 0;
        font-size: clamp(32px, 4vw, 46px);
        line-height: 1.1;
        letter-spacing: -0.035em;
    }

    .home-section-heading p {
        margin-top: 18px;
        color: #6a7382;
        font-size: 17px;
        line-height: 1.7;
    }


/* Home features */

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.home-feature-card {
    padding: 30px;
    background: white;
    border: 1px solid #e8ebf0;
    border-radius: 14px;
}

.home-feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 900;
}

.home-feature-card h3 {
    margin: 0;
    font-size: 19px;
}

.home-feature-card p {
    margin: 12px 0 0;
    color: #6a7382;
    line-height: 1.7;
}


/* Home how-it-works */

.home-how {
    background: #f7f8fb;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.home-step {
    position: relative;
}

.home-step-number {
    display: block;
    margin-bottom: 20px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 900;
}

.home-step h3 {
    margin: 0;
    font-size: 18px;
}

.home-step p {
    margin-top: 10px;
    color: #697282;
    line-height: 1.65;
}


/* Home control */

.home-control {
    padding: 90px 0;
}

.home-control-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    padding: 55px;
    border-radius: 20px;
    background: var(--color-primary);
    color: white;
}

    .home-control-box .home-eyebrow {
        color: #bbf7d0;
    }

    .home-control-box h2 {
        margin: 0;
        font-size: 40px;
        letter-spacing: -0.03em;
    }

    .home-control-box p {
        max-width: 600px;
        margin-top: 20px;
        color: #dcfce7;
        line-height: 1.7;
    }

.home-control-points {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

    .home-control-points div {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding-bottom: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .home-control-points span {
        color: #bbf7d0;
        font-size: 14px;
    }


/* Home pricing */

.home-price-card {
    max-width: 850px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 35px;
    margin: auto;
    padding: 35px;
    background: white;
    border: 1px solid #e2e6ed;
    border-radius: var(--radius-xl);
    box-shadow: 0 15px 45px rgba(25, 40, 70, 0.07);
}

.home-price-label {
    color: #6d7686;
    font-size: 13px;
    font-weight: 800;
}

.home-price {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 8px;
}

    .home-price strong {
        font-size: 34px;
        letter-spacing: -0.03em;
    }

    .home-price span {
        color: #737d8c;
        font-size: 13px;
    }

.home-price-content p {
    margin: 5px 0 0;
    color: #7a8391;
    font-size: 13px;
}

.home-price-details {
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: #596374;
    font-size: 13px;
}


/* Home request CTA */

.home-request {
    padding: 30px 0 100px;
}

.home-request-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 45px;
    border-radius: 18px;
    background: var(--color-primary);
    color: white;
}

    .home-request-box .home-eyebrow {
        color: #bbf7d0;
    }

    .home-request-box h2 {
        margin: 0;
        font-size: 34px;
    }

    .home-request-box p {
        max-width: 650px;
        margin: 12px 0 0;
        color: #dcfce7;
    }


/* Home footer */

.home-footer {
    padding: 35px 0;
    border-top: 1px solid #e8ebf0;
}

.home-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

    .home-footer-inner > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .home-footer-inner span {
        color: #7b8492;
        font-size: 13px;
    }

.home-footer-links {
    display: flex;
    gap: 22px;
}

    .home-footer-links a {
        color: #687181;
        text-decoration: none;
        font-size: 13px;
    }

        .home-footer-links a:hover {
            color: var(--color-primary);
        }


/* =========================================================
   15. MOBILE
   ========================================================= */

@media (max-width: 1100px) {

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 900px) {

    .home-nav-links a:not(.home-login-link) {
        display: none;
    }

    .home-hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .home-features {
        grid-template-columns: 1fr;
    }

    .home-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-control-box {
        grid-template-columns: 1fr;
    }

    .home-price-card {
        grid-template-columns: 1fr;
    }

    .home-request-box {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 700px) {

    .container {
        width: calc(100% - 24px);
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .site-nav {
        width: 100%;
        gap: 0;
    }

        .site-nav a {
            flex: 1;
            padding: 10px 8px;
            text-align: center;
            border: 1px solid #d0d5dd;
            border-radius: 0;
            background: white;
        }

            .site-nav a:first-child {
                border-radius: 7px 0 0 7px;
            }

            .site-nav a:last-child {
                border-radius: 0 7px 7px 0;
            }

            .site-nav a.active {
                background: var(--color-primary);
                border-color: var(--color-primary);
                color: white;
            }

    .hero {
        padding-top: 0px;
    }

        .hero h1 {
            font-size: 2rem;
        }

        .hero p {
            font-size: 0.95rem;
        }

    .card {
        padding: 16px;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .page-container {
        padding: 20px 10px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-table th:nth-child(3),
    .dashboard-table td:nth-child(3) {
        display: none;
    }

    .page-actions {
        margin-bottom: 16px;
    }

    .action-button {
        width: 100%;
        text-align: center;
    }

    .table-scroll {
        width: calc(100% + 32px);
        margin-right: -16px;
        margin-left: -16px;
    }

    .offers-table {
        min-width: 700px;
    }

    .paper {
        padding: 18px;
    }

        .paper table {
            font-size: 13px;
        }

    .login-card {
        padding: 30px 22px;
    }

    .login-page {
        padding: 30px 12px;
    }

    .home-container {
        width: min(100% - 28px, var(--home-width));
    }

    .home-hero {
        padding: 40px 0 70px;
    }

        .home-hero h1 {
            font-size: 44px;
        }

    .home-hero-actions {
        flex-direction: column;
    }

    .home-btn {
        width: 100%;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-control-box {
        padding: 30px;
    }

        .home-control-box h2 {
            font-size: 30px;
        }

    .home-request-box {
        padding: 30px;
    }

    .home-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-footer-links {
        flex-wrap: wrap;
    }
}


@media (max-width: 600px) {

    .site-brand {
        justify-content: center;
    }

    .site-nav {
        width: 100%;
    }

    .home-nav-inner {
        min-height: 64px;
    }
}


/* =========================================================
   16. PRINT
   ========================================================= */

@media print {

    @page {
        size: A4;
        margin: 15mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }

    header,
    .hero,
    .no-print {
        display: none !important;
    }

    .print-area {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }

        .print-area table {
            width: 100% !important;
            border-collapse: collapse !important;
        }

        .print-area th,
        .print-area td {
            padding: 8px !important;
            border-bottom: 1px solid #ccc !important;
            background: white !important;
            color: black !important;
        }

        .print-area .total {
            margin-top: 20px !important;
            color: black !important;
            text-align: right !important;
        }
}