:root {
    --primary: #d5fbd3;
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body {
    background-color: var(--bg-body);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Ta bort Bootstrap focus-ring i sub-header */

.sub-header .dropdown-toggle:focus,
.sub-header .dropdown-toggle:active {
    outline: none !important;
    box-shadow: none !important;
}

.main-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.45rem 0;
}

.brand-logo {
    height: 32px;
    width: auto;
}

.doc-type-badge {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-left: 15px;
    margin-left: 15px;
    border-left: 2px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.doc-type-badge.doc-type-badge--emphasis {
    color: #212529;
    border-left-color: rgba(33, 37, 41, 0.12);
}

.btn-login-light {
    background: #f1f5f9;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-login-light:hover {
    background: #e2e8f0;
}

.sub-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.btn-pay-action {
    padding: 7px 18px;
        border-radius: 8px;
        font-size: 0.9rem;
    background: var(--primary)!important;
    color: #000!important;
    border: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

#estimate-respond {
    scroll-margin-top: 7rem;
}

.estimate-intro-hero__img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.estimate-intro-hero__img--public {
    max-height: 320px;
    border-radius: 0.75rem;
}

.estimate-intro-hero--admin {
    margin-left: calc(-1 * var(--bs-card-spacer-x, 1.5rem));
    margin-right: calc(-1 * var(--bs-card-spacer-x, 1.5rem));
}

.estimate-intro-hero--admin .estimate-intro-hero__img {
    border-radius: 0;
    max-height: 300px;
}

.action-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
}

.document-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 4.5rem;
    margin-top: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
}

.document-card-tight {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    padding: 2rem;
    margin-top: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
}

.document-card-tighter {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    margin-top: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
}



.status-tag-corner {
    position: absolute;
    top: 40px;
    right: 40px;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 10px 24px;
    border-radius: 12px;
    text-transform: uppercase;
    border: 1px solid #ffedd5;
}

.label-cap {
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    display: block;
}

.amount-display {
    font-size: 2.75rem;
    font-weight: 800;
    color: #10b981;
    letter-spacing: -0.02em;
}

.payment-quick-box {
    background: #f8faff;
    border: 1px solid #eef2ff;
    border-radius: 18px;
    padding: 2.2rem;
    margin-bottom: 3.5rem;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table thead th {
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 15px 20px;
    font-weight: 700;
}

.premium-table tbody td {
    padding: 24px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.sender-footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 2.5rem;
    margin-top: 4rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #475569;
    text-decoration: none;
}

.contact-item i {
    width: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .document-card {
        padding: 2.5rem 1.5rem;
    }

    .document-card-tight {
        padding: 2.5rem 1.5rem;
    }

    .status-tag-corner {
        position: static;
        display: inline-block;
        margin-bottom: 2rem;
    }

    .desktop-actions {
        display: none !important;
    }

    .d-login-desktop {
        display: none !important;
    }

    .payment-quick-box {
        padding: 1.5rem;
    }

    .payment-quick-box .col-6 {
        width: 100%;
        text-align: left !important;
    }

    .premium-table thead {
        display: none;
    }

    .premium-table tbody tr {
        display: block;
        padding: 1.5rem 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .premium-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border: none;
        font-size: 0.9rem;
        text-align: right;
    }

    .premium-table tbody td:first-child {
        display: block;
        font-weight: 700;
        font-size: 1rem;
        margin-bottom: 10px;
        text-align: left;
        padding: 0;
    }

    .premium-table tbody td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.7rem;
    }

    .premium-table tbody td:first-child::before {
        display: none;
    }

    .amount-display {
        font-size: 2.2rem;
    }
}

.offcanvas {
    width: 300px !important;
    border-left: none;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    margin: 5px 10px;
}

.mobile-nav-link:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.table-striped-custom tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.table-striped-custom tbody tr {
    transition: background 0.2s ease;
}

.table-striped-custom tbody tr:hover {
    background-color: #eef2f7;
}

/* Webboffert — luft mellan sektioner, ingen extra card på avslut */
#public-estimate .estimate-public-cover {
    margin-bottom: 0;
    padding-bottom: 3.5rem;
    border-bottom: none;
}

#public-estimate .estimate-public-cover + .estimate-public-offer-head {
    margin-top: 4.5rem;
    padding-top: 3.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#public-estimate .estimate-public-spec {
    margin-top: 4.5rem;
    padding-top: 3.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#public-estimate .estimate-public-closing {
    margin-top: 6rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    box-shadow: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

#public-estimate .estimate-public-closing .estimate-closing-hero-wrap {
    margin-top: 3rem;
}