﻿/* =========================================================
   ACCRO — SINGLE SOURCE OF TRUTH (NO CONFLICTS)
   Drawer system:
   - Drawer element: .app-sidenav
   - Open class:     .app-sidenav.is-open
   - Overlay:        .nav-overlay
   - Overlay open:   .nav-overlay.is-open

   Search system:
   - Trigger:        .search-pill
   - Backdrop:       .search-backdrop
   - Modal:          .search-modal
========================================================= */

/* =========================================================
   THEME TOKENS
========================================================= */
:root {
    --brand: #3b82f6;
    --brand-2: #2563eb;
    --ink: #0f172a;
    --muted: rgba(15,23,42,.68);
    --border: rgba(15,23,42,.10);
    --border-soft: rgba(15,23,42,.08);
    --shadow: 0 .75rem 2rem rgba(0,0,0,.06);
    --sidenav-width: 320px; /* desktop fixed width */
    --drawer-w: min(82vw, 320px); /* mobile drawer width */

    --card-radius: 16px;
    --card-pad: 16px;
    --mobile-topbar-h: 64px;
}

/* =========================================================
   BASE / DEFAULTS
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
    color: var(--ink);
    background: transparent;
}

a, .btn-link {
    color: #2563eb;
}

    a:hover, .btn-link:hover {
        color: #1d4ed8;
    }

.btn-primary {
    color: #fff;
    background-color: #2563eb;
    border-color: #1d4ed8;
}

    .btn-primary:hover {
        background-color: #1d4ed8;
        border-color: #1e40af;
    }

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem rgba(59,130,246,.35);
}

/* Content padding (desktop) */
.content {
    padding-top: 1.1rem;
}

@media (max-width: 991.98px) {
    .content {
        padding-top: 0;
    }
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* =========================================================
   PAGE SHELL BACKGROUND (NO PURPLE)
========================================================= */
.page-shell {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: radial-gradient(1200px 600px at 15% -10%, rgba(59,130,246,.18), transparent 55%), linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
}

    .page-shell::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(rgba(2,6,23,.06) 1px, transparent 1px);
        background-size: 24px 24px;
        opacity: .35;
        pointer-events: none;
    }

    .page-shell::after {
        content: "";
        position: absolute;
        inset: -200px -200px auto auto;
        width: 520px;
        height: 520px;
        background: radial-gradient(circle at 30% 30%, rgba(14,165,233,.22), transparent 55%);
        filter: blur(18px);
        opacity: .7;
        pointer-events: none;
    }

.section-pad {
    padding: 3rem 0;
}

/* =========================================================
   CRITICAL: REMOVE BLAZOR TEMPLATE SIDEBAR GRADIENT
========================================================= */
.sidebar,
.page > .sidebar,
.sidebar .top-row,
.sidebar .navbar,
.sidebar .navbar-brand,
.sidebar .nav-scrollable {
    background: transparent !important;
    background-image: none !important;
}

    .sidebar a,
    .sidebar .nav-link {
        color: inherit;
        opacity: 1;
    }

/* =========================================================
   LAYOUT: SIDENAV + MAIN (DESKTOP)
========================================================= */
.page {
    display: flex;
    min-height: 100vh;
}

    /* Sidebar wrapper holds NavShell/NavMenu */
    .page > .sidebar {
        flex: 0 0 var(--sidenav-width);
        width: var(--sidenav-width);
    }

    /* Main fills remaining width */
    .page > main,
    .main {
        flex: 1 1 auto;
        min-width: 0;
        margin-left: 0; /* no offset hacks */
    }

/* Mobile: sidebar wrapper takes no space (drawer is fixed) */
@media (max-width: 991.98px) {
    .page {
        display: block;
    }

        .page > .sidebar {
            width: 0 !important;
            flex: 0 0 0 !important;
        }

        .page > main,
        .main {
            margin-left: 0 !important;
            padding-top: var(--mobile-topbar-h); /* push content below topbar */
        }
}



/* =========================================================
   NAV / SIDENAV — DESKTOP
========================================================= */
.nav-scrollable {
    background: transparent !important;
}

    .nav-scrollable form button.nav-link {
        background: transparent !important;
        border: 0 !important;
        width: 100%;
        text-align: left;
    }

.app-sidenav {
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--sidenav-width);
    overflow: hidden;
    background: radial-gradient(900px 520px at -10% 10%, rgba(59,130,246,.06), transparent 55%), linear-gradient(180deg, rgba(248,250,252,.96) 0%, rgba(255,255,255,.94) 55%, rgba(248,250,252,.96) 100%);
    border-right: 1px solid rgba(15,23,42,.10);
    display: flex;
    flex-direction: column;
    transform: none; /* desktop: no drawer transform */
}

    .app-sidenav::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .18;
        background-image: radial-gradient(rgba(2,6,23,.07) 1px, transparent 1px);
        background-size: 26px 26px;
    }

    .app-sidenav > * {
        position: relative;
        z-index: 1;
    }

/* Header */
.sidenav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    flex: 0 0 auto;
}

.sidenav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.brand-logo {
    height: 120px !important; /* bigger on desktop */
    max-height: 120px !important;
    width: auto !important;
    max-width: 240px; /* adjust if you want longer wordmark */
    object-fit: contain;
    display: block;
}

/* Scroll area */
.app-sidenav .nav-scrollable {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 6px 10px 14px 10px;
}

/* Nav items */
.nav-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-title {
    padding: 8px 10px 2px 10px;
    font-size: .75rem;
    color: rgba(15,23,42,.55);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.nav-link.nav-item,
button.nav-link.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    color: rgba(15,23,42,.82) !important;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .nav-link.nav-item:hover,
    button.nav-link.nav-item:hover {
        background: rgba(15,23,42,.035) !important;
        color: rgba(15,23,42,.92) !important;
    }

    .nav-link.nav-item.active {
        background: rgba(59,130,246,.08) !important;
        color: var(--ink) !important;
        font-weight: 700;
        position: relative;
    }

        .nav-link.nav-item.active::before {
            content: "";
            position: absolute;
            left: 6px;
            top: 10px;
            bottom: 10px;
            width: 3px;
            border-radius: 999px;
            background: rgba(59,130,246,.65);
        }

.nav-ic {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .88;
}

.nav-txt {
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

    .nav-toggle:focus {
        outline: none;
        box-shadow: none;
    }

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nav-chev {
    opacity: .55;
    margin-left: auto;
}

.nav-sub {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px dashed rgba(15,23,42,.12);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-subitem {
    padding: 9px 10px;
    border-radius: 10px;
}

.nav-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(15,23,42,.10);
}

.nav-btn {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    text-align: left;
}

/* =========================================================
   MOBILE: TOPBAR + DRAWER + OVERLAY
========================================================= */
.nav-overlay {
    display: none;
}

.nav-mobile-toggle {
    display: none;
}

.mobile-topbar {
    display: none;
}

@media (max-width: 991.98px) {
    /* Topbar */
    .mobile-topbar {
        display: grid;
        grid-template-columns: 44px 1fr 44px;
        align-items: center;
        height: var(--mobile-topbar-h);
        padding: 0 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,.85);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid rgba(15,23,42,.08);
        z-index: 3500;
    }

        .mobile-topbar .nav-mobile-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: static !important;
            width: 44px;
            height: 44px;
            font-size: 26px;
            line-height: 1;
            border: 1px solid rgba(15,23,42,.10);
            background: rgba(255,255,255,.92);
            border-radius: 12px;
            cursor: pointer;
            color: var(--ink);
        }

    .mobile-brand {
        justify-self: center;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }

    .mobile-topbar .mobile-logo {
        height: 44px !important;
        max-height: 44px !important;
        width: auto !important;
        max-width: min(260px, 65vw) !important;
        object-fit: contain;
        display: block;
    }

    /* Drawer */
    .app-sidenav {
        position: fixed;
        top: var(--mobile-topbar-h);
        left: 0;
        bottom: 0;
        width: var(--drawer-w);
        height: calc(100dvh - var(--mobile-topbar-h));
        min-height: calc(100dvh - var(--mobile-topbar-h));
        transform: translateX(-110%);
        transition: transform .22s ease;
        z-index: 3001;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fff; /* safer on mobile */
    }

        .app-sidenav.is-open {
            transform: translateX(0);
        }

    /* Overlay covers only outside drawer */
    .nav-overlay {
        display: block;
        position: fixed;
        top: var(--mobile-topbar-h);
        bottom: 0;
        left: var(--drawer-w);
        right: 0;
        background: rgba(0,0,0,.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
        z-index: 3000;
    }

        .nav-overlay.is-open {
            opacity: 1;
            pointer-events: auto;
        }

    /* Ensure scroll works */
    .app-sidenav .nav-scrollable {
        display: block !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }
}

/* Phone: slightly larger logo and allow wrapping */
@media (max-width: 575.98px) {
    .mobile-topbar .mobile-logo {
        height: 56px !important;
        max-height: 56px !important;
        max-width: min(300px, 70vw) !important;
    }

    .app-sidenav .nav-link.nav-item,
    .app-sidenav button.nav-link.nav-item {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        align-items: flex-start;
    }

    .app-sidenav .nav-txt {
        display: block !important;
        overflow: visible !important;
        line-height: 1.2 !important;
        word-break: break-word;
    }
}

/* =========================================================
   DASHBOARD (Projects / Time)
========================================================= */
.dash-head {
    padding: 2px 2px 0 2px;
}

.dash-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .2px;
}

.dash-subtitle {
    font-size: .95rem;
}

.dash-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

    .dash-card .card-body {
        padding: var(--card-pad);
    }

    .dash-card .card-header {
        border-bottom: 1px solid var(--border-soft);
        background: rgba(248,250,252,.65);
    }

.dash-card-title {
    font-weight: 800;
    letter-spacing: .15px;
}

.dash-card-sub {
    font-size: .9rem;
}

.dash-badge {
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.22);
    color: #1d4ed8;
    font-weight: 700;
}

.dash-badge-soft {
    background: rgba(15,23,42,.04);
    border: 1px solid rgba(15,23,42,.08);
    color: rgba(15,23,42,.75);
    font-weight: 700;
}

.dash-badge-warn {
    background: rgba(245,158,11,.14);
    border: 1px solid rgba(245,158,11,.22);
    color: #92400e;
    font-weight: 700;
}

.dash-seg {
    display: inline-flex;
    background: rgba(15,23,42,.04);
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 999px;
    padding: 3px;
    gap: 3px;
}

.dash-seg-btn {
    border: 0;
    background: transparent;
    padding: .55rem .85rem;
    border-radius: 999px;
    font-weight: 800;
    color: rgba(15,23,42,.78);
}

    .dash-seg-btn.active {
        background: #fff;
        border: 1px solid rgba(15,23,42,.10);
        box-shadow: 0 .35rem 1.2rem rgba(0,0,0,.06);
        color: var(--ink);
    }

/* KPI */
.kpi {
    border: 1px solid rgba(15,23,42,.08);
    background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72));
    border-radius: 14px;
    padding: 12px;
    height: 100%;
}

.kpi-compact {
    padding: 10px;
}

.kpi-label {
    font-size: .82rem;
    color: rgba(15,23,42,.62);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.kpi-value {
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: .2px;
    line-height: 1.1;
}

.kpi-unit {
    font-size: .9rem;
    font-weight: 800;
    color: rgba(15,23,42,.55);
    margin-left: 4px;
}

.kpi-mini {
    font-size: .86rem;
    color: #6c757d;
    margin-top: 6px;
}

/* Tables */
.dash-table-wrap {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    overflow: hidden;
}

.dash-table {
    margin: 0;
}

    .dash-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: rgba(248,250,252,.92);
        border-bottom: 1px solid rgba(15,23,42,.10);
    }

.dash-th {
    font-size: .82rem;
    color: rgba(15,23,42,.70);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
}

.dash-td {
    vertical-align: middle;
}

.dash-pill {
    display: inline-flex;
    align-items: center;
    padding: .25rem .55rem;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.75);
    font-weight: 800;
    font-size: .85rem;
}

.dash-row.is-selected {
    outline: 2px solid rgba(59,130,246,.18);
    background: rgba(59,130,246,.06);
}

.dash-expand td {
    padding: 0 !important;
    border-top: 0;
}

.dash-expand-inner {
    padding: 14px;
    background: radial-gradient(900px 300px at 10% 0%, rgba(59,130,246,.10), transparent 60%), linear-gradient(180deg, rgba(248,250,252,.80), rgba(255,255,255,.90));
    border-top: 1px solid rgba(15,23,42,.08);
}

.mini-card {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    padding: 12px;
    height: 100%;
}

.mini-card-title {
    font-weight: 900;
    letter-spacing: .2px;
    margin-bottom: 8px;
}

.mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
}

.dash-hr {
    border: 0;
    border-top: 1px solid rgba(15,23,42,.10);
    margin: 14px 0;
}

.dash-subtable thead th {
    background: rgba(248,250,252,.92);
}

.dash-subtable tfoot th,
.dash-subtable tfoot td {
    background: rgba(248,250,252,.65);
    font-weight: 900;
}

.dash-foot {
    background: rgba(248,250,252,.80);
}

    .dash-foot th,
    .dash-foot td {
        border-top: 1px solid rgba(15,23,42,.12) !important;
        font-weight: 900;
    }

/* Chart boxes */
.dash-chart-box {
    position: relative;
    width: 100%;
}

.dash-chart-box-lg {
    height: 360px;
}

.dash-chart-box-sm {
    height: 360px;
}

.dash-chart-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* =========================================================
   HERO
========================================================= */
.hero-wrap {
    position: relative;
    background: radial-gradient(1100px 500px at 20% -10%, rgba(59,130,246,.20), transparent 55%), linear-gradient(180deg, rgba(15,23,42,.78), rgba(15,23,42,.65));
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.hero-bg {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1.25rem 3rem rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.12);
    background: #0b1220;
}

    .hero-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: .92;
        display: block;
        transform: scale(1.02);
    }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2,6,23,.90) 0%, rgba(2,6,23,.70) 45%, rgba(2,6,23,.12) 80%, rgba(2,6,23,0) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    padding: 2.25rem;
    display: flex;
    align-items: center;
}

.hero-card {
    max-width: 680px;
    color: #fff;
}

    .hero-card .lead {
        color: rgba(255,255,255,.82);
    }

.hero-accent {
    color: #93c5fd;
}

@media (max-width: 991.98px) {
    .hero-content {
        padding: 1.5rem;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(2,6,23,.86) 0%, rgba(2,6,23,.62) 55%, rgba(2,6,23,.18) 100%);
    }

    .hero-card {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hero-content {
        padding: 1.25rem;
    }
}

/* =========================================================
   FINANCIAL FORECAST
========================================================= */
.fin-forecast .page-title {
    font-weight: 900;
    letter-spacing: .2px;
}

.fin-forecast .card {
    border: 1px solid var(--border-soft);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
}

    .fin-forecast .card .card-header {
        background: rgba(248,250,252,.65);
        border-bottom: 1px solid var(--border-soft);
    }

.fin-forecast .dash-muted {
    color: rgba(15,23,42,.62);
    font-size: .92rem;
}

.fin-forecast .dash-big {
    font-size: 2.05rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .2px;
}

.fin-forecast .dash-divider {
    border-top: 1px solid rgba(15,23,42,.10);
    margin: 1rem 0;
}

.fin-forecast .dash-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .30rem .65rem;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.78);
    font-weight: 900;
    font-size: .85rem;
}

.fin-forecast .dash-chart-box {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    padding: 12px;
}

.fin-forecast .nav-tabs {
    border-bottom: 1px solid rgba(15,23,42,.10);
}

    .fin-forecast .nav-tabs .nav-link {
        border: 0;
        border-bottom: 2px solid transparent;
        font-weight: 800;
        color: rgba(15,23,42,.70);
    }

        .fin-forecast .nav-tabs .nav-link:hover {
            color: rgba(15,23,42,.88);
            background: rgba(15,23,42,.03);
        }

        .fin-forecast .nav-tabs .nav-link.active {
            color: var(--ink);
            background: transparent;
            border-bottom: 2px solid rgba(59,130,246,.75);
        }

.fin-forecast .cashflow-table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
}

.fin-forecast .cashflow-table thead th {
    position: sticky;
    top: 0;
    background: rgba(248,250,252,.92);
    z-index: 2;
    border-bottom: 1px solid rgba(15,23,42,.10);
}

.fin-forecast .cashflow-table tfoot th,
.fin-forecast .cashflow-table tfoot td {
    position: sticky;
    bottom: 0;
    background: rgba(248,250,252,.92);
    z-index: 2;
    border-top: 1px solid rgba(15,23,42,.10);
}

.fin-forecast canvas {
    width: 100% !important;
    display: block;
}

/* =========================================================
   OFFER RESPOND (Public link page) — NO PURPLE
========================================================= */
.offer-respond-page {
    width: 100%;
    min-height: calc(100vh - 40px);
    display: grid;
    place-items: center;
    padding: 28px 16px;
    background: radial-gradient(900px 420px at 20% 0%, rgba(59,130,246,.12), transparent 55%), linear-gradient(180deg, #f7f7fb, #ffffff);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #111827;
}

    .offer-respond-page .offer-card {
        width: min(860px, 100%);
        background: rgba(255,255,255,.92);
        border: 1px solid rgba(15,23,42,.10);
        border-radius: 18px;
        box-shadow: 0 18px 55px rgba(17,24,39,.10);
        overflow: hidden;
        backdrop-filter: blur(6px);
    }

    .offer-respond-page .offer-card-header {
        padding: 22px 22px 14px;
        border-bottom: 1px solid rgba(15,23,42,.10);
        background: radial-gradient(900px 150px at 0% 0%, rgba(59,130,246,.14), transparent 60%);
    }

    .offer-respond-page .title {
        font-size: 22px;
        font-weight: 900;
        letter-spacing: -0.02em;
        margin-bottom: 6px;
    }

    .offer-respond-page .subtitle {
        color: rgba(15,23,42,.65);
        font-size: 14px;
        line-height: 1.35;
    }

    .offer-respond-page .offer-card-body {
        padding: 20px 22px 22px;
    }

    .offer-respond-page .pill-row {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }

    .offer-respond-page .pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 11px;
        border-radius: 999px;
        border: 1px solid rgba(15,23,42,.10);
        background: rgba(248,250,252,.9);
        font-size: 13px;
        font-weight: 700;
    }

        .offer-respond-page .pill b {
            font-weight: 900;
        }

    .offer-respond-page .pill-muted {
        background: rgba(255,255,255,.85);
        color: rgba(15,23,42,.78);
    }

    .offer-respond-page .section {
        margin-top: 10px;
    }

    .offer-respond-page .label {
        display: block;
        font-weight: 900;
        font-size: 13px;
        margin-bottom: 8px;
        letter-spacing: .02em;
    }

    .offer-respond-page .textarea {
        width: 100%;
        min-height: 120px;
        resize: vertical;
        border: 1px solid rgba(15,23,42,.16);
        border-radius: 14px;
        padding: 12px;
        font-size: 14px;
        outline: none;
        background: rgba(255,255,255,.95);
        transition: box-shadow 140ms ease, border-color 140ms ease, transform 140ms ease;
    }

        .offer-respond-page .textarea:focus {
            border-color: rgba(59,130,246,.60);
            box-shadow: 0 0 0 5px rgba(59,130,246,.14);
        }

    .offer-respond-page .hint {
        margin-top: 8px;
        color: rgba(15,23,42,.60);
        font-size: 12.5px;
    }

    .offer-respond-page .actions {
        display: flex;
        gap: 12px;
        margin-top: 16px;
        flex-wrap: wrap;
    }

    .offer-respond-page .offer-btn {
        border: 0;
        border-radius: 14px;
        padding: 12px 14px;
        font-weight: 900;
        font-size: 14px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        transition: transform 70ms ease, filter 120ms ease, opacity 120ms ease, box-shadow 140ms ease;
        box-shadow: 0 12px 26px rgba(17,24,39,.12);
        color: #fff;
        user-select: none;
    }

        .offer-respond-page .offer-btn:active {
            transform: translateY(1px);
        }

        .offer-respond-page .offer-btn:disabled {
            opacity: .65;
            cursor: not-allowed;
            box-shadow: none;
        }

    .offer-respond-page .btn-accept {
        background: linear-gradient(180deg, #22c55e, #16a34a);
    }

    .offer-respond-page .btn-reject {
        background: linear-gradient(180deg, #ef4444, #dc2626);
    }

    .offer-respond-page .offer-btn:hover:not(:disabled) {
        filter: brightness(1.03);
    }

    .offer-respond-page .status {
        margin-top: 16px;
        padding: 14px;
        border-radius: 14px;
        border: 1px solid rgba(15,23,42,.10);
        background: rgba(248,250,252,.90);
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

    .offer-respond-page .status-title {
        font-weight: 950;
        margin-bottom: 6px;
    }

    .offer-respond-page .status-text {
        color: rgba(15,23,42,.78);
        line-height: 1.45;
        white-space: pre-wrap;
    }

    .offer-respond-page .status-info {
        border-color: rgba(59,130,246,.25);
        background: rgba(239,246,255,.95);
    }

    .offer-respond-page .status-success {
        border-color: rgba(34,197,94,.25);
        background: rgba(240,253,244,.95);
    }

    .offer-respond-page .status-error {
        border-color: rgba(239,68,68,.25);
        background: rgba(254,242,242,.95);
    }

    .offer-respond-page .details {
        margin-top: 10px;
        color: rgba(15,23,42,.80);
    }

        .offer-respond-page .details summary {
            cursor: pointer;
            font-weight: 900;
            color: rgba(15,23,42,.92);
            margin-bottom: 6px;
        }

        .offer-respond-page .details pre {
            background: #0b1220;
            color: #e5e7eb;
            padding: 12px;
            border-radius: 12px;
            overflow: auto;
            max-width: 100%;
            font-size: 12px;
            line-height: 1.4;
        }

    .offer-respond-page .spinner {
        width: 18px;
        height: 18px;
        border-radius: 999px;
        border: 3px solid rgba(59,130,246,0.25);
        border-top-color: rgba(59,130,246,0.95);
        animation: offer-respond-spin 900ms linear infinite;
        margin-top: 2px;
    }

    .offer-respond-page .btn-spinner {
        width: 14px;
        height: 14px;
        border-radius: 999px;
        border: 3px solid rgba(255,255,255,0.35);
        border-top-color: rgba(255,255,255,0.95);
        animation: offer-respond-spin 900ms linear infinite;
    }

@keyframes offer-respond-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
    width: 100%;
}

.topbar-lang select {
    min-width: 140px;
}

.icon-btn {
    border: 0;
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
}

    .icon-btn:hover {
        background: rgba(0,0,0,.05);
    }


.primary-btn {
    border: 0;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    color: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
}

    .primary-btn:hover {
        filter: brightness(.98);
    }

.results {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.result-card {
    border: 1px solid rgba(0,0,0,.06);
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.05);
}

.result-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.result-title {
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-desc {
    margin-top: 6px;
    color: rgba(0,0,0,.70);
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(99,102,241,.10);
    color: rgba(67,56,202,1);
    font-weight: 800;
    white-space: nowrap;
}

.result-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.link-btn,
.go-btn {
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
}

.go-btn {
    border: 0;
    background: rgba(34,197,94,.15);
}

.details {
    border-top: 1px solid rgba(0,0,0,.08);
    background: linear-gradient(180deg, rgba(99,102,241,0.05), rgba(34,197,94,0.04));
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.details-title {
    font-weight: 900;
    display: flex;
    gap: 10px;
    align-items: center;
}

.details-body {
    padding: 16px;
    overflow: auto;
    max-height: 40vh;
}

.kv {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 8px 0;
}

.k {
    font-weight: 900;
    color: rgba(0,0,0,.70);
}

.v code {
    background: rgba(0,0,0,.06);
    padding: 2px 6px;
    border-radius: 8px;
}

.friendly {
    margin: 10px 0 14px 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    padding: 12px;
}

.empty-state {
    margin-top: 16px;
    padding: 20px;
    border: 1px dashed rgba(0,0,0,.18);
    border-radius: 16px;
    text-align: center;
    color: rgba(0,0,0,.70);
}

.empty-ic {
    font-size: 28px;
    margin-bottom: 6px;
}

/* Optional: two-column layout on desktop */
@media (min-width: 992px) {
    .search-modal {
        flex-direction: row;
        align-items: stretch;
    }

    .search-body {
        flex: 1 1 60%;
        max-height: calc(100vh - 96px);
    }

    .details {
        flex: 0 0 40%;
        border-top: 0;
        border-left: 1px solid rgba(0,0,0,.08);
    }

    .details-body {
        max-height: calc(100vh - 96px);
    }
}

/* =========================================================
   SEARCH MODAL — BASE (UPDATED)
   - More prominent pill (bigger + "search-bar" feel)
   - Slightly nicer modal sizing + header polish
========================================================= */

/* pill trigger */
.search-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* size */
    height: 46px;
    padding: 0 16px;
    font-size: .98rem;
    font-weight: 900;
    letter-spacing: .1px;
    /* look */
    border-radius: 999px;
    border: 1px solid rgba(59,130,246,.35);
    background: linear-gradient(180deg, rgba(59,130,246,.14), rgba(59,130,246,.08));
    color: rgba(15,23,42,.92);
    box-shadow: 0 14px 34px rgba(0,0,0,.08);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

    .search-pill .bi {
        font-size: 1.1rem;
        opacity: .95;
    }

    .search-pill:hover {
        border-color: rgba(59,130,246,.55);
        background: linear-gradient(180deg, rgba(59,130,246,.18), rgba(59,130,246,.10));
        box-shadow: 0 18px 46px rgba(0,0,0,.10);
        transform: translateY(-1px);
    }

    .search-pill:active {
        transform: translateY(0);
        box-shadow: 0 12px 30px rgba(0,0,0,.08);
    }

    .search-pill:focus,
    .search-pill:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(59,130,246,.18), 0 18px 46px rgba(0,0,0,.10);
    }

/* full-screen click-catcher */
.search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.50);
    backdrop-filter: blur(2px);
    z-index: 4000; /* higher than topbar(3500) + drawer(3001) */
}

/* the modal itself */
.search-modal {
    position: fixed;
    left: 50%;
    top: 92px;
    transform: translateX(-50%);
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 124px);
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 20px;
    box-shadow: 0 26px 90px rgba(0,0,0,.20);
    z-index: 4001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* header/body basics */
.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15,23,42,.10);
    background: radial-gradient(900px 180px at 0% 0%, rgba(59,130,246,.10), transparent 60%), rgba(248,250,252,.90);
}

    .search-header .title {
        font-weight: 950;
        display: flex;
        align-items: center;
        gap: 10px;
        letter-spacing: .1px;
    }

.search-body {
    padding: 16px;
    overflow: auto;
}

/* input row */
.search-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input {
    flex: 1 1 auto;
    height: 46px;
    border: 1px solid rgba(15,23,42,.16);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: #fff;
    transition: box-shadow 140ms ease, border-color 140ms ease;
}

    .search-input:focus {
        border-color: rgba(59,130,246,.60);
        box-shadow: 0 0 0 5px rgba(59,130,246,.14);
    }

/* make it stack on small screens */
@media (max-width: 575.98px) {
    .search-modal {
        top: 74px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 92px);
        border-radius: 18px;
    }

    .search-input-row {
        flex-direction: column;
    }

    .primary-btn {
        width: 100%;
    }

    .search-pill {
        height: 42px;
        padding: 0 12px;
        font-size: .92rem;
    }
}

/* =========================================================
   DESKTOP LAYOUT: use GRID so sidebar never “crushes”
========================================================= */
@media (min-width: 992px) {

    .page {
        display: grid !important;
        grid-template-columns: var(--sidenav-width) minmax(0, 1fr) !important;
        min-height: 100vh !important;
    }

        .page > .sidebar {
            width: auto !important;
            min-width: 0 !important;
        }

            .page > .sidebar .app-sidenav {
                width: 100% !important; /* fyllir 320px grid dálkinn */
                min-width: 0 !important;
            }

        .page > main {
            min-width: 0 !important; /* leyfir main að vera min(0) án þess að þrýsta á nav */
            overflow-x: hidden !important; /* stoppar overrun sem getur “coverað” nav */
        }
}

/* Ef breiðar töflur/charts eru vandamálið: leyfðu scroll inni í wrapper */
.dash-table-wrap,
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* === Dashboard facelift (Yfirlit) ================================== */
.dash-shell {
    margin-top: .25rem;
}

.dash-card {
    border: 0;
    border-radius: 1rem;
}

.dash-badge {
    border-radius: 999px;
    font-weight: 600;
}

.dash-chart-box {
    position: relative;
    width: 100%;
}

.dash-chart-box-xl {
    height: 360px;
}

.dash-chart-box-md {
    height: 280px;
}

.dash-chart-box-sm {
    height: 220px;
}

/* KPI grid (center cards) */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    justify-content: center;
    align-items: stretch;
}

@media (max-width: 1199.98px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-chart-box-xl {
        height: 320px;
    }
}

@media (max-width: 575.98px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dash-chart-box-xl {
        height: 280px;
    }

    .dash-chart-box-md {
        height: 240px;
    }
}

.dash-kpi {
    padding: .85rem;
    border-radius: .9rem;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.06);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .dash-kpi:hover {
        transform: translateY(-1px);
        box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.08);
    }

.dash-kpi-label {
    color: rgba(0,0,0,.55);
    font-size: .8rem;
}

.dash-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.dash-kpi-sub {
    margin-top: .2rem;
    font-size: .75rem;
    color: rgba(0,0,0,.45);
}

/* Mini stats under left chart */
.dash-mini {
    padding: .65rem .75rem;
    border-radius: .85rem;
    background: rgba(0,0,0,.02);
    border: 1px solid rgba(0,0,0,.06);
}

.dash-mini-label {
    font-size: .72rem;
    color: rgba(0,0,0,.55);
}

.dash-mini-value {
    font-size: 1.05rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .brand-logo {
        height: 56px !important;
        max-height: 56px !important;
        max-width: 220px !important;
    }
}


.home-hero {
    background: radial-gradient(1200px 500px at 10% 10%, rgba(255,255,255,.18), transparent 60%), radial-gradient(900px 400px at 90% 20%, rgba(0,0,0,.20), transparent 55%), linear-gradient(135deg, #0b5ed7, #0f172a);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
}

.pill {
    padding: .35rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.92);
}

.hero-card {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 30px rgba(0,0,0,.20);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

@media (max-width: 575.98px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
}

.kpi-label {
    font-size: .8rem;
    color: rgba(15,23,42,.60);
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: rgba(15,23,42,.92);
    line-height: 1.1;
}

.kpi-sub {
    font-size: .78rem;
    color: rgba(15,23,42,.55);
    font-weight: 700;
    margin-top: 2px;
}

.hero-chart {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
}

.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.chip {
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(15,23,42,.03);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    color: rgba(15,23,42,.75);
}

.chart-box {
    position: relative;
    height: 220px;
}

.chart-box-sm {
    height: 170px;
}

.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.sticky-tabs {
    top: 0;
    position: sticky;
    z-index: 10;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: .25rem .25rem 0 .25rem;
    border: 1px solid rgba(0,0,0,.06);
}

.stat {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    height: 100%;
}

.check {
    padding-left: 1.4rem;
    position: relative;
    margin: .55rem 0;
}

    .check::before {
        content: "✓";
        position: absolute;
        left: 0;
        top: 0;
        color: #16a34a;
        font-weight: 900;
    }

.callout {
    background: rgba(13,110,253,.08);
    border: 1px solid rgba(13,110,253,.16);
}

.tile {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    height: 100%;
}

.tile-title {
    font-weight: 800;
    margin-bottom: 6px;
}

.price-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
    height: 100%;
    position: relative;
}

    .price-card.featured {
        border: 2px solid rgba(13,110,253,.45);
        box-shadow: 0 12px 35px rgba(13,110,253,.12);
    }

.featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
}

.price-head .price-name {
    font-weight: 900;
    font-size: 1.1rem;
}

.price-amount {
    margin-top: 10px;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1.1;
}

.price-list {
    margin: 14px 0 16px 0;
    padding-left: 1.1rem;
    color: rgba(0,0,0,.75);
}

.soft {
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.06);
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

@media (max-width: 991.98px) {
    .role-grid {
        grid-template-columns: 1fr;
    }
}

.role-card {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 14px;
}

.role-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.role-ic {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
}

.role-title {
    font-weight: 900;
}

.role-sub {
    font-size: .85rem;
    color: rgba(255,255,255,.75);
}

.role-list {
    margin: 0;
    padding-left: 1.05rem;
    color: rgba(255,255,255,.92);
}

.mock-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}

@media (max-width: 991.98px) {
    .mock-grid {
        grid-template-columns: 1fr;
    }
}

.mock-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    height: 100%;
}

.mock-title {
    font-weight: 950;
    margin-bottom: 2px;
}

.mock-sub {
    color: rgba(15,23,42,.62);
    font-size: .9rem;
    margin-bottom: 10px;
}

.mock-svg {
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(900px 260px at 10% 0%, rgba(59,130,246,.10), transparent 60%), #fff;
}

    .mock-svg svg {
        width: 100%;
        height: auto;
        display: block;
    }

.mock-list {
    margin: 10px 0 0 0;
    padding-left: 1.05rem;
    color: rgba(15,23,42,.75);
}

.note {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px dashed rgba(15,23,42,.18);
    background: rgba(15,23,42,.02);
    color: rgba(15,23,42,.72);
}



