:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --border: #e6eaf0;
    --text: #101828;
    --muted: #667085;
    --sidebar: #0b1220;
    --sidebar-soft: #121b2f;
    --blue: #2563eb;
    --green: #079455;
    --red: #dc2626;
    --amber: #d97706;
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}


* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.long-text,
.long-text-preview,
.long-text-full {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.long-text {
    display: inline;
    line-height: 1.65;
}

.long-text-preview {
    color: inherit;
}

.long-text-action {
    display: inline;
    margin: 0 0 0 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue, #2563eb);
    font: inherit;
    font-weight: 800;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.long-text-action:hover {
    color: #1d4ed8;
}

.long-text-empty {
    color: var(--muted, #667085);
}

.long-text-modal .modal-dialog {
    width: min(720px, calc(100vw - 24px));
}

.long-text-modal .modal-content {
    border: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, 0.18);
}

.long-text-modal .modal-body {
    padding: 20px;
}

.long-text-full {
    display: block;
    max-height: min(62vh, 620px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border, #e6eaf0);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text, #101828);
    font-size: 0.96rem;
    line-height: 1.75;
    white-space: pre-wrap;
}

.property-feature-editor {
    padding: 18px;
    border: 1px solid var(--border, #e6eaf0);
    border-radius: 16px;
    background: #f8fafc;
}

.property-feature-inputs {
    display: grid;
    gap: 10px;
}

.property-feature-input-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.property-feature-handle {
    color: var(--muted, #667085);
}

.property-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.property-feature-grid li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--border, #e6eaf0);
    border-radius: 12px;
    background: #f8fafc;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.property-feature-grid i {
    flex: 0 0 auto;
    color: var(--green, #079455);
}

td .long-text,
.table .long-text {
    display: inline-block;
    max-width: min(420px, 58vw);
    vertical-align: top;
}

@media (max-width: 575.98px) {
    .long-text-modal .modal-body {
        padding: 14px;
    }

    .long-text-full {
        max-height: 66vh;
        padding: 14px;
        font-size: 0.93rem;
    }

    td .long-text,
    .table .long-text {
        max-width: 72vw;
    }

    .property-feature-grid {
        grid-template-columns: 1fr;
    }

    .property-feature-input-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .property-feature-handle {
        display: none;
    }
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
        var(--bg);
}

.login-card {
    width: min(100%, 440px);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.login-brand,
.brand,
.topbar {
    display: flex;
    align-items: center;
}

.login-brand,
.brand {
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-weight: 800;
}

.login-brand strong,
.brand strong {
    display: block;
    color: var(--text);
    line-height: 1.1;
}

.login-brand small,
.brand small {
    color: var(--muted);
    font-size: 0.82rem;
}

.login-copy {
    margin: 30px 0 24px;
}

.login-copy h1 {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 800;
}

.login-copy p,
.topbar p,
.kpi-card p,
.dashboard-panel p {
    color: var(--muted);
}

.form-label {
    font-weight: 700;
}

.form-control {
    border-color: var(--border);
    border-radius: 12px;
}

.form-select {
    border-color: var(--border);
    border-radius: 12px;
}

.form-control:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.btn-primary {
    border-color: var(--blue);
    background: var(--blue);
    border-radius: 12px;
    font-weight: 700;
}

.app-layout {
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    padding: 22px;
    background: var(--sidebar);
    color: #fff;
    transition: transform 180ms ease;
}

body.sidebar-collapsed .app-sidebar {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.app-sidebar .brand strong {
    color: #fff;
}

.app-sidebar .brand small {
    color: #98a2b3;
}

.sidebar-close,
.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
}

.sidebar-close {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(148, 163, 184, 0.08);
    color: #fff;
}

.sidebar-menu {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #cbd5e1;
    font-weight: 700;
    text-align: left;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--sidebar-soft);
    color: #fff;
}

.sidebar-dropdown-toggle .bi-chevron-down {
    font-size: 0.78rem;
    opacity: 0.72;
    transition: transform 160ms ease, opacity 160ms ease;
}

.sidebar-dropdown-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-submenu {
    position: relative;
    display: grid;
    gap: 3px;
    margin: 6px 0 4px 20px;
    padding: 5px 0 5px 18px;
}

.sidebar-submenu::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 1px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
}

.sidebar-sublink {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 10px 7px 14px;
    border-radius: 8px;
    color: #9aa8bc;
    font-size: 0.82rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-sublink::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.58);
    transition: background 160ms ease, box-shadow 160ms ease;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    background: rgba(148, 163, 184, 0.075);
    color: #fff;
}

.sidebar-sublink:hover {
    transform: translateX(2px);
}

.sidebar-sublink.active::before {
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.placeholder-link {
    opacity: 0.78;
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    background: rgba(15, 23, 42, 0.48);
}

.main-content {
    min-height: 100vh;
    margin-left: 280px;
    padding: 30px;
    transition: margin-left 180ms ease;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

.topbar {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.topbar h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 800;
}

.topbar p {
    margin: 4px 0 0;
}

.page-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--green);
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.05);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.kpi-card,
.dashboard-panel {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.kpi-card {
    padding: 22px;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 14px;
    color: #fff;
    font-size: 1.15rem;
}

.bg-blue {
    background: var(--blue);
}

.bg-red {
    background: var(--red);
}

.bg-green {
    background: var(--green);
}

.bg-amber {
    background: var(--amber);
}

.kpi-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.kpi-card strong {
    display: block;
    margin-top: 8px;
    font-size: 2.1rem;
    line-height: 1;
}

.kpi-card p {
    margin: 12px 0 0;
    font-size: 0.9rem;
}

.dashboard-panel {
    margin-top: 22px;
    padding: 26px;
}

.dashboard-panel h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
}

.dashboard-panel p {
    max-width: 760px;
    margin: 0;
}

.module-panel {
    margin-top: 22px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
}

.crm-table {
    min-width: 900px;
}

.crm-table thead th {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.lead-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
    gap: 22px;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 4px 0 0;
    font-weight: 700;
}

.stack-list,
.timeline {
    display: grid;
    gap: 14px;
}

.stack-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.stack-item p {
    margin: 0 0 10px;
    color: var(--text);
}

.stack-item small,
.timeline-item small {
    display: block;
    color: var(--muted);
    font-weight: 600;
}

.timeline-item {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 12px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pipeline-board {
    display: grid;
    grid-auto-columns: minmax(290px, 320px);
    grid-auto-flow: column;
    gap: 18px;
    margin-top: 22px;
    padding-bottom: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.pipeline-column {
    min-height: 540px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #eef3f8;
    scroll-snap-align: start;
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pipeline-column-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.pipeline-count {
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.pipeline-card-list {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 440px;
    padding: 2px;
    border-radius: 12px;
}

.pipeline-card-list.is-drop-target {
    outline: 2px dashed rgba(37, 99, 235, 0.42);
    outline-offset: 6px;
}

.pipeline-empty {
    padding: 18px;
    border: 1px dashed rgba(102, 112, 133, 0.34);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
}

.pipeline-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
    cursor: grab;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.pipeline-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.1);
}

.pipeline-card.is-dragging {
    opacity: 0.58;
    cursor: grabbing;
}

.pipeline-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.pipeline-card-top h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
}

.pipeline-card-top span {
    min-width: 34px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.pipeline-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.pipeline-card a {
    display: inline-flex;
    margin-top: 12px;
    color: var(--blue);
    font-size: 0.86rem;
    font-weight: 800;
}

.pipeline-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    max-width: min(420px, calc(100vw - 32px));
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.pipeline-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pipeline-toast.is-error {
    background: var(--red);
}

.pipeline-chart-wrap {
    min-height: 320px;
}

.property-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.property-view-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 800;
}

.property-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.property-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
}

.property-card-image,
.property-profile-media {
    display: grid;
    place-items: center;
    background: #eef3f8;
}

.property-card-image {
    height: 220px;
    overflow: hidden;
    color: var(--muted);
    font-size: 2rem;
}

.property-card-img,
.property-featured-img,
.property-gallery-img,
.property-upload-preview-img,
.property-existing-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
}

.property-card-body {
    padding: 16px;
}

.property-card-topline,
.property-card-footer,
.property-meta,
.property-gallery-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.property-card-topline,
.property-card-footer {
    justify-content: space-between;
    flex-wrap: wrap;
}

.property-card-topline span:first-child {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.property-card h3 {
    margin: 12px 0 8px;
    font-size: 1rem;
    font-weight: 800;
}

.property-card h3 a {
    color: var(--text);
}

.property-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.property-meta {
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.property-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.property-card-footer strong,
.property-profile-price {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 800;
}

.property-profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 22px;
}

.property-profile-media {
    height: clamp(280px, 42vw, 440px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--muted);
    font-size: 3rem;
    box-shadow: var(--shadow);
}

.property-profile-summary {
    margin-top: 0;
}

.property-copy-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.property-copy-block h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 800;
}

.property-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.property-gallery-item {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.property-gallery-preview {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: #eef3f8;
}

.property-gallery-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px;
}

.property-upload-preview-grid,
.property-featured-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.property-upload-preview-item,
.property-featured-choice {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.property-upload-preview-img,
.property-existing-preview-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.property-upload-preview-item span,
.property-featured-choice span {
    display: block;
    overflow: hidden;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.property-upload-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
}

.property-featured-choice {
    cursor: pointer;
}

.property-featured-choice input {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    width: 18px;
    height: 18px;
}

.property-featured-choice:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

@media (max-width: 1199.98px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .mobile-backdrop {
        display: block;
    }

    body.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        padding: 22px;
    }

    .topbar {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .lead-detail-grid {
        grid-template-columns: 1fr;
    }

    .property-analytics-grid,
    .property-profile-hero {
        grid-template-columns: 1fr;
    }

    .property-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-upload-preview-grid,
    .property-featured-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pipeline-board {
        margin-right: -22px;
        padding-right: 22px;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 24px;
    }

    .topbar {
        flex-wrap: wrap;
    }

    .topbar-actions,
    .status-pill {
        width: 100%;
    }

    .status-pill {
        justify-content: center;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }

    .property-card-grid,
    .property-gallery-grid {
        grid-template-columns: 1fr;
    }

    .property-profile-media {
        height: 260px;
    }

    .property-card-image {
        height: 200px;
    }

    .property-gallery-preview {
        height: 170px;
    }

    .property-upload-preview-grid,
    .property-featured-choice-grid {
        grid-template-columns: 1fr;
    }
}

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

.admin-stage-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.admin-stage-card {
    display: grid;
    gap: 16px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.admin-stage-card.is-active {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.12);
}

.admin-stage-card.is-completed {
    border-color: rgba(25, 135, 84, 0.26);
    background: #fbfffd;
}

.admin-project-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, .8fr) minmax(220px, .8fr);
    align-items: center;
    gap: 18px;
}

.admin-project-summary h2 {
    margin: 0 0 6px;
    font-weight: 900;
}

.admin-project-summary p {
    margin: 0;
    color: #667085;
}

.admin-project-summary-meter,
.admin-project-summary-current {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    background: #f8fafc;
}

.admin-project-summary-meter strong {
    font-size: 2rem;
    line-height: 1;
}

.admin-project-summary-current span,
.admin-project-summary-meter small {
    color: #667085;
    font-weight: 800;
}

.admin-project-summary-current strong {
    overflow-wrap: anywhere;
}

.admin-stage-focus {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(37, 99, 235, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(135deg, #ffffff, #f4f7ff),
        #ffffff;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.12);
}

.admin-stage-focus-head,
.admin-stage-focus-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.admin-stage-focus h2 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    font-weight: 900;
}

.admin-stage-focus-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.admin-stage-focus-grid > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    background: #ffffff;
}

.admin-stage-focus-grid strong {
    display: block;
    margin-bottom: 8px;
}

.admin-stage-focus-grid p {
    margin: 0;
    color: #475467;
}

.admin-completed-stage-list {
    display: grid;
    gap: 12px;
}

.admin-stage-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.admin-stage-compact.is-completed {
    border-color: rgba(25, 135, 84, 0.22);
    background: #fbfffd;
}

.admin-stage-compact h3 {
    margin: 8px 0 4px;
    font-size: 1rem;
    font-weight: 900;
}

.admin-stage-compact small {
    color: #667085;
    font-weight: 800;
}

.admin-stage-compact p {
    margin: 8px 0 0;
    color: #475467;
}

.admin-stage-compact-updates {
    grid-column: 1 / -1;
}

.admin-pending-stage-list {
    display: grid;
    gap: 10px;
    padding-top: 12px;
}

.admin-pending-stage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-pending-stage-row > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-pending-stage-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-stage-card-head,
.admin-stage-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-stage-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-stage-note {
    margin: 0;
    color: #475467;
}

.admin-stage-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.admin-stage-meta div {
    padding: 10px;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #f8fafc;
}

.admin-stage-meta dt {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-stage-meta dd {
    margin: 2px 0 0;
    color: #101828;
    font-weight: 800;
}

.admin-stage-actions form {
    flex: 1 1 0;
}

.admin-stage-updates {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #edf0f5;
}

.admin-stage-updates-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-stage-update {
    padding: 12px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-stage-update span,
.admin-stage-update small {
    display: block;
}

.admin-stage-update span {
    font-weight: 800;
}

.admin-stage-update small {
    color: #667085;
}

.admin-stage-update p {
    margin: 8px 0;
    color: #475467;
}

.admin-stage-update-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.admin-stage-attachment-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-stage-view-files {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-stage-file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-stage-image-tile {
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-stage-image-tile img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.admin-stage-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.admin-stage-document-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.admin-stage-document-card i {
    color: #dc3545;
    font-size: 1.35rem;
}

.admin-stage-document-card span {
    min-width: 0;
    color: #344054;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-stage-document-card .btn {
    grid-column: 1 / -1;
}

.admin-stage-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.admin-stage-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #ffffff;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.admin-stage-file-pill:hover {
    border-color: #2563eb;
    color: #1d4ed8;
}

.admin-stage-file-pill i {
    flex: 0 0 auto;
}

.single-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.single-progress-track > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #079455);
}

@media (max-width: 991.98px) {
    .admin-project-summary,
    .admin-stage-focus-grid {
        grid-template-columns: 1fr;
    }

    .admin-stage-grid {
        grid-template-columns: 1fr;
    }

    .admin-stage-card-head,
    .admin-stage-actions,
    .admin-stage-updates-head,
    .admin-stage-focus-head,
    .admin-stage-focus-actions,
    .admin-pending-stage-row {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-stage-compact {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .admin-stage-meta {
        grid-template-columns: 1fr;
    }

    .admin-pending-stage-row strong {
        white-space: normal;
    }
}

/* Premium SaaS UI layer */
:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-soft: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d7dce4;
    --text: #101317;
    --muted: #667085;
    --muted-soft: #98a2b3;
    --sidebar: #080d18;
    --sidebar-soft: rgba(148, 163, 184, 0.08);
    --blue: #335cff;
    --blue-dark: #2446d8;
    --green: #13795b;
    --red: #c43b4a;
    --amber: #b86b18;
    --purple: #6d5bd0;
    --shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 24px 70px rgba(15, 23, 42, 0.13);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --ease: 170ms ease;
}

html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        linear-gradient(180deg, #ffffff, rgba(247, 248, 251, 0.96) 220px),
        radial-gradient(circle at 76% -10%, rgba(51, 92, 255, 0.08), transparent 34%),
        var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

h1,
h2,
h3,
.brand strong,
.login-copy h1,
.topbar h1 {
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    letter-spacing: 0;
}

a,
button,
.btn,
.form-control,
.form-select,
.sidebar-link,
.sidebar-sublink,
.kpi-card,
.dashboard-panel,
.property-card,
.pipeline-card,
.stack-item,
.property-gallery-item,
.property-upload-preview-item {
    transition:
        background-color var(--ease),
        border-color var(--ease),
        box-shadow var(--ease),
        color var(--ease),
        transform var(--ease),
        opacity var(--ease);
}

.login-screen {
    background:
        radial-gradient(circle at 18% 10%, rgba(51, 92, 255, 0.12), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(19, 121, 91, 0.08), transparent 28%),
        var(--bg);
}

.login-card {
    border-radius: 24px;
    border-color: rgba(215, 220, 228, 0.9);
    background: #ffffff;
    box-shadow: var(--shadow-hover);
}

.login-copy h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.05;
}

.brand-mark {
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), #1d2d5f);
    box-shadow: 0 14px 35px rgba(51, 92, 255, 0.22);
}

.app-sidebar {
    padding: 20px 18px;
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.035), rgba(148, 163, 184, 0)),
        var(--sidebar);
    border-right: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: 18px 0 50px rgba(15, 23, 42, 0.08);
}

.sidebar-header {
    padding: 4px 4px 22px;
    border-bottom-color: rgba(148, 163, 184, 0.08);
}

.app-sidebar .brand strong {
    font-size: 0.98rem;
    letter-spacing: 0;
}

.app-sidebar .brand small {
    color: #9ba8bd;
    font-size: 0.76rem;
}

.sidebar-menu {
    gap: 7px;
}

.sidebar-link {
    min-height: 46px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #aab6c8;
    font-size: 0.91rem;
    font-weight: 720;
}

.sidebar-link i:first-child {
    width: 20px;
    color: #8290a7;
    font-size: 1rem;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.065);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link:hover i:first-child,
.sidebar-link.active i:first-child {
    color: #fff;
}

.sidebar-link.active {
    border-color: rgba(148, 163, 184, 0.08);
    background: linear-gradient(135deg, rgba(51, 92, 255, 0.28), rgba(148, 163, 184, 0.07));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 12px 30px rgba(0, 0, 0, 0.18);
}

.sidebar-submenu {
    gap: 4px;
    margin-left: 17px;
    padding-left: 17px;
}

.sidebar-submenu::before {
    background: linear-gradient(180deg, rgba(51, 92, 255, 0.4), rgba(148, 163, 184, 0.14));
}

.sidebar-sublink {
    min-height: 34px;
    color: #8e9bb0;
    font-size: 0.82rem;
    font-weight: 700;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    background: rgba(148, 163, 184, 0.07);
}

.sidebar-close,
.menu-toggle {
    border-radius: 13px;
    border-color: rgba(215, 220, 228, 0.85);
    box-shadow: var(--shadow-soft);
}

.main-content {
    padding: 34px;
}

.topbar {
    align-items: flex-start;
    margin-bottom: 28px;
    padding: 26px 28px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 24px;
    background:
        linear-gradient(135deg, #ffffff, rgba(249, 250, 251, 0.9)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.topbar > div:first-of-type {
    max-width: 820px;
}

.topbar h1 {
    margin: 0;
    color: #0d1117;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 820;
    line-height: 1.08;
}

.topbar p {
    max-width: 720px;
    margin-top: 9px;
    color: #667085;
    font-size: 0.98rem;
    line-height: 1.65;
}

.page-kicker {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.topbar-actions {
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 12px;
    font-weight: 750;
    letter-spacing: 0;
}

.btn-sm {
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.82rem;
}

.btn-primary {
    border-color: var(--blue);
    background: linear-gradient(180deg, #3f68ff, var(--blue-dark));
    box-shadow: 0 10px 22px rgba(51, 92, 255, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--blue-dark);
    background: linear-gradient(180deg, #355eff, #203fc6);
    box-shadow: 0 14px 28px rgba(51, 92, 255, 0.28);
    transform: translateY(-1px);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    background: #fff;
    border-color: var(--border);
    color: #344054;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    border-color: rgba(51, 92, 255, 0.32);
    background: #f7f8ff;
    color: var(--blue-dark);
    transform: translateY(-1px);
}

.btn-outline-danger:hover,
.btn-danger {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

.status-pill {
    border-color: rgba(19, 121, 91, 0.16);
    background: #f4fbf8;
    color: var(--green);
    box-shadow: none;
}

.kpi-grid {
    gap: 20px;
}

.kpi-card,
.dashboard-panel,
.stack-item,
.property-card,
.property-gallery-item,
.property-upload-preview-item,
.property-featured-choice {
    border-color: rgba(229, 231, 235, 0.9);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
}

.kpi-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 20px;
}

.kpi-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), transparent 42%);
}

.kpi-card:hover,
.dashboard-panel:hover,
.property-card:hover,
.pipeline-card:hover,
.stack-item:hover,
.property-gallery-item:hover {
    border-color: rgba(51, 92, 255, 0.18);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.28), 0 12px 28px rgba(15, 23, 42, 0.14);
}

.bg-blue {
    background: linear-gradient(135deg, var(--blue), #1d4ed8);
}

.bg-green {
    background: linear-gradient(135deg, #16a37a, var(--green));
}

.bg-red {
    background: linear-gradient(135deg, #df5662, var(--red));
}

.bg-amber {
    background: linear-gradient(135deg, #d98b2b, var(--amber));
}

.kpi-card span {
    color: #697386;
    font-size: 0.82rem;
    font-weight: 800;
}

.kpi-card strong {
    margin-top: 10px;
    color: #0d1117;
    font-size: clamp(1.9rem, 3vw, 2.45rem);
    font-weight: 850;
}

.kpi-card p,
.dashboard-panel p {
    color: #697386;
    line-height: 1.62;
}

.dashboard-panel {
    padding: 28px;
    border-radius: 22px;
}

.dashboard-panel h2,
.section-heading h2 {
    color: #111827;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 1.18rem;
    font-weight: 820;
    line-height: 1.2;
}

.form-label {
    margin-bottom: 7px;
    color: #344054;
    font-size: 0.83rem;
    font-weight: 780;
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: var(--border);
    border-radius: 12px;
    background-color: #fff;
    color: #111827;
    font-size: 0.93rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--border-strong);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(51, 92, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(51, 92, 255, 0.12);
}

textarea.form-control {
    line-height: 1.6;
}

.form-check-input {
    border-color: var(--border-strong);
}

.form-check-input:checked {
    border-color: var(--blue);
    background-color: var(--blue);
}

.alert {
    border-radius: 14px;
    border-color: transparent;
    font-weight: 650;
}

.alert-danger {
    background: #fff5f6;
    color: #9f2836;
}

.alert-success {
    background: #f1fbf7;
    color: #0f684e;
}

.alert-warning {
    background: #fff8ed;
    color: #875015;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f8fafc;
}

.crm-table {
    border-collapse: separate;
    border-spacing: 0;
}

.crm-table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: #7a8597;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.crm-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #edf0f4;
    color: #344054;
    font-size: 0.91rem;
}

.crm-table tbody tr:hover td {
    background: #f9fbff;
}

.badge {
    border-radius: 999px;
    padding: 0.45rem 0.65rem;
    font-weight: 800;
}

.text-bg-primary {
    background-color: #eef2ff !important;
    color: #2d46c4 !important;
}

.text-bg-success {
    background-color: #eefaf5 !important;
    color: #0f684e !important;
}

.text-bg-warning {
    background-color: #fff7e8 !important;
    color: #925612 !important;
}

.text-bg-danger {
    background-color: #fff1f3 !important;
    color: #a72d3a !important;
}

.text-bg-secondary,
.text-bg-info,
.text-bg-dark {
    background-color: #f2f4f7 !important;
    color: #475467 !important;
}

.detail-list {
    gap: 20px;
}

.detail-list dt {
    color: #7a8597;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.detail-list dd {
    color: #1f2937;
    font-weight: 760;
}

.timeline-item {
    gap: 14px;
}

.timeline-dot {
    background: var(--blue);
    box-shadow: 0 0 0 5px rgba(51, 92, 255, 0.11);
}

.pipeline-column {
    border-color: rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    background: #f4f6fa;
}

.pipeline-card {
    border-radius: 16px;
    border-color: rgba(229, 231, 235, 0.96);
}

.property-card {
    border-radius: 20px;
}

.property-card-image {
    height: 220px;
    background: linear-gradient(135deg, #eef2f7, #f8fafc);
}

.property-card-img,
.property-featured-img,
.property-gallery-img,
.property-upload-preview-img,
.property-existing-preview-img {
    transform: scale(1.001);
}

.property-card:hover .property-card-img,
.property-gallery-item:hover .property-gallery-img {
    transform: scale(1.035);
}

.property-card-body {
    padding: 18px;
}

.property-card h3 {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 1.02rem;
    line-height: 1.35;
}

.property-card h3 a:hover {
    color: var(--blue-dark);
}

.property-meta span {
    background: #f4f6fa;
    color: #5f6b7a;
}

.property-profile-media {
    border-radius: 24px;
    background: #eef2f7;
    box-shadow: var(--shadow);
}

.property-profile-summary {
    border-radius: 24px;
}

.property-gallery-item,
.property-upload-preview-item,
.property-featured-choice {
    border-radius: 16px;
}

.property-gallery-preview {
    height: 180px;
}

.property-gallery-img,
.property-card-img,
.property-featured-img,
.property-upload-preview-img,
.property-existing-preview-img {
    object-fit: cover;
}

.property-upload-preview-grid,
.property-featured-choice-grid {
    gap: 16px;
}

.property-upload-preview-img,
.property-existing-preview-img {
    height: 150px;
}

.property-upload-preview-remove {
    box-shadow: 0 10px 24px rgba(196, 59, 74, 0.26);
}

.property-upload-preview-remove:hover {
    transform: scale(1.05);
}

.nav-pills.property-view-tabs {
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f7f8fb;
    width: fit-content;
}

.property-view-tabs .nav-link {
    border-radius: 10px;
    color: #667085;
}

.property-view-tabs .nav-link.active {
    background: #fff;
    color: var(--blue-dark);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pagination {
    gap: 6px;
}

.page-link {
    border-color: var(--border);
    border-radius: 10px;
    color: #475467;
    font-weight: 750;
}

.page-item.active .page-link {
    border-color: var(--blue);
    background: var(--blue);
}

.modal-content {
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-hover);
}

.modal-header,
.modal-footer {
    border-color: var(--border);
}

@media (max-width: 1199.98px) {
    .main-content {
        padding: 28px;
    }

    .property-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .main-content {
        padding: 22px;
    }

    .topbar {
        padding: 22px;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .main-content {
        padding: 18px;
    }

    .topbar {
        border-radius: 20px;
    }

    .topbar h1 {
        font-size: 1.65rem;
    }

    .dashboard-panel,
    .kpi-card {
        padding: 20px;
        border-radius: 18px;
    }

    .btn,
    .topbar-actions .btn {
        width: 100%;
    }

    .property-card-image {
        height: 210px;
    }
}

/* Top-tier SaaS refinement pass */
:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e3e7ee;
    --border-strong: #cfd6e3;
    --text: #0c111d;
    --muted: #667085;
    --muted-soft: #98a2b3;
    --sidebar: #060914;
    --sidebar-soft: rgba(148, 163, 184, 0.075);
    --blue: #304ffe;
    --blue-dark: #2438c2;
    --green: #08785f;
    --red: #ba3545;
    --amber: #a86412;
    --shadow: 0 22px 70px rgba(11, 18, 32, 0.09);
    --shadow-soft: 0 12px 34px rgba(11, 18, 32, 0.065);
    --shadow-hover: 0 28px 84px rgba(11, 18, 32, 0.14);
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 280px;
    --sidebar-rail: 76px;
    --ease-premium: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 18% -8%, rgba(48, 79, 254, 0.1), transparent 28%),
        radial-gradient(circle at 92% 8%, rgba(8, 120, 95, 0.07), transparent 24%),
        linear-gradient(180deg, #fbfcfe 0, #f5f6f8 320px, #f5f6f8 100%);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

h1,
h2,
h3,
.topbar h1,
.dashboard-panel h2,
.section-heading h2,
.property-card h3,
.login-copy h1,
.brand strong {
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.68;
}

.topbar .menu-toggle {
    display: none !important;
}

.app-sidebar {
    width: var(--sidebar-width);
    padding: 18px 16px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 30% 0%, rgba(48, 79, 254, 0.22), transparent 34%),
        linear-gradient(180deg, rgba(148, 163, 184, 0.045), transparent 28%),
        var(--sidebar);
    border-right: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: 24px 0 70px rgba(6, 9, 20, 0.18);
    transform: none;
    transition: width var(--ease-premium), transform var(--ease-premium), box-shadow var(--ease-premium);
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-rail);
    transform: none;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 36px;
    transition: margin-left var(--ease-premium), padding var(--ease-premium);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-rail);
}

.sidebar-header {
    min-height: 58px;
    gap: 10px;
    padding: 4px 0 18px;
}

.sidebar-header .brand {
    min-width: 0;
    overflow: hidden;
}

.brand-mark {
    flex: 0 0 44px;
}

.sidebar-close {
    flex: 0 0 42px;
    margin-left: auto;
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(148, 163, 184, 0.075);
    color: #eef2ff;
    box-shadow: none;
}

.sidebar-close:hover {
    background: rgba(148, 163, 184, 0.13);
    transform: translateY(-1px);
}

body.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-header .brand {
    display: none;
}

body.sidebar-collapsed .sidebar-close {
    margin-left: 0;
}

.sidebar-menu {
    gap: 8px;
}

.sidebar-link {
    min-height: 46px;
    padding: 12px 13px;
    border-radius: 15px;
    color: #a8b3c7;
    font-family: "Manrope", sans-serif;
    font-size: 0.9rem;
    font-weight: 760;
}

.sidebar-link i:first-child {
    flex: 0 0 20px;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.075);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link.active {
    background:
        linear-gradient(135deg, rgba(48, 79, 254, 0.33), rgba(148, 163, 184, 0.075)),
        rgba(148, 163, 184, 0.08);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1), 0 14px 34px rgba(0, 0, 0, 0.2);
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-dropdown-toggle .bi-chevron-down,
body.sidebar-collapsed .sidebar-submenu {
    display: none !important;
}

body.sidebar-collapsed .sidebar-link i:first-child {
    margin: 0;
    font-size: 1.06rem;
}

.sidebar-submenu {
    margin-left: 18px;
    padding-left: 18px;
}

.sidebar-sublink {
    border-radius: 11px;
    color: #919db2;
    font-weight: 720;
}

.mobile-backdrop {
}

.topbar {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: flex-start;
    padding: 30px 32px;
    border: 1px solid rgba(227, 231, 238, 0.82);
    border-radius: 28px;
    background:
        linear-gradient(135deg, #ffffff, rgba(248, 250, 252, 0.84)),
        #ffffff;
    box-shadow: var(--shadow-soft);
}

.topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 94% 12%, rgba(48, 79, 254, 0.12), transparent 22%),
        radial-gradient(circle at 72% 110%, rgba(8, 120, 95, 0.09), transparent 24%);
    pointer-events: none;
}

.topbar::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 20px;
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(48, 79, 254, 0.22), transparent);
    opacity: 0.8;
}

.topbar h1 {
    max-width: 860px;
    color: #070b14;
    font-size: clamp(1.95rem, 3vw, 2.72rem);
    font-weight: 700;
    line-height: 1.02;
}

.topbar p {
    max-width: 780px;
    margin-top: 11px;
    color: #5f6b7a;
    font-size: 1rem;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(48, 79, 254, 0.12);
    border-radius: 999px;
    background: rgba(48, 79, 254, 0.065);
    color: #253bd0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.095em;
}

.topbar-actions {
    gap: 10px;
}

.btn {
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 13px;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
}

.btn-primary {
    background: linear-gradient(180deg, #435dff 0%, #263bce 100%);
    box-shadow: 0 12px 28px rgba(48, 79, 254, 0.25);
}

.btn:hover {
    transform: translateY(-1px);
}

.dashboard-panel,
.kpi-card,
.property-card,
.pipeline-card,
.stack-item,
.property-gallery-item,
.property-upload-preview-item,
.modal-content {
    border-color: rgba(227, 231, 238, 0.86);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.dashboard-panel {
    border-radius: 26px;
}

.kpi-card,
.property-card {
    border-radius: 24px;
}

.kpi-card:hover,
.dashboard-panel:hover,
.property-card:hover,
.pipeline-card:hover,
.stack-item:hover,
.property-gallery-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.kpi-card strong {
    font-family: "Space Grotesk", "Manrope", sans-serif;
    letter-spacing: -0.04em;
}

.form-control,
.form-select {
    min-height: 46px;
    border-radius: 14px;
    font-family: "Manrope", sans-serif;
}

.crm-table tbody td {
    padding-block: 17px;
}

.property-card-image,
.property-profile-media,
.property-gallery-preview,
.property-upload-preview-item {
    background: linear-gradient(135deg, #eef2f7, #fbfcfe);
}

.property-card-img,
.property-featured-img,
.property-gallery-img,
.property-upload-preview-img,
.property-existing-preview-img {
    transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        width: var(--sidebar-rail);
        transform: none;
    }

    body:not(.sidebar-open) .sidebar-header {
        justify-content: center;
    }

    body:not(.sidebar-open) .sidebar-header .brand,
    body:not(.sidebar-open) .sidebar-link span,
    body:not(.sidebar-open) .sidebar-dropdown-toggle .bi-chevron-down,
    body:not(.sidebar-open) .sidebar-submenu {
        display: none !important;
    }

    body:not(.sidebar-open) .sidebar-link {
        justify-content: center;
        padding-inline: 0;
    }

    body:not(.sidebar-open) .sidebar-close {
        margin-left: 0;
    }

    body.sidebar-open .app-sidebar {
        width: var(--sidebar-width);
        transform: none;
    }

    body.sidebar-open .sidebar-header {
        justify-content: space-between;
    }

    body.sidebar-open .sidebar-header .brand {
        display: flex;
    }

    body.sidebar-open .sidebar-link {
        justify-content: flex-start;
        padding: 12px 13px;
    }

    body.sidebar-open .sidebar-link span,
    body.sidebar-open .sidebar-dropdown-toggle .bi-chevron-down {
        display: inline-flex !important;
    }

    body.sidebar-open .sidebar-submenu.show {
        display: grid !important;
    }

    .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-rail);
        padding: 22px;
    }

    .topbar {
        padding: 24px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --sidebar-rail: 64px;
        --sidebar-width: min(292px, 86vw);
    }

    .app-sidebar {
        padding-inline: 11px;
    }

    body.sidebar-open .app-sidebar {
        padding-inline: 16px;
    }

    .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: var(--sidebar-rail);
        padding: 16px;
    }

    .topbar {
        padding: 22px;
        border-radius: 24px;
    }

    .topbar h1 {
        font-size: 1.78rem;
    }
}

.property-gallery-preview {
    cursor: default;
}

.property-gallery-item:hover .property-gallery-img {
    transform: scale(1.015);
}

/* System branding and settings */
.brand,
.login-brand,
.buyer-auth-brand,
.group-landing-brand,
.group-sidebar-brand,
.group-mobile-brand {
    min-width: 0;
}

.brand > span:not(.brand-mark),
.login-brand > div,
.buyer-auth-brand > span,
.group-landing-brand > span,
.group-sidebar-brand > span,
.group-mobile-brand > span {
    min-width: 0;
}

.brand strong,
.login-brand strong,
.buyer-auth-brand strong,
.group-landing-brand strong,
.group-sidebar-brand strong,
.group-mobile-brand span:last-child {
    display: block;
    overflow: hidden;
    max-width: 170px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.brand-logo-sidebar {
    max-width: 150px;
    max-height: 38px;
}

.brand-logo-login {
    max-width: 190px;
    max-height: 64px;
}

.login-brand,
.buyer-auth-brand.logo-only-brand,
.login-brand.logo-only-brand {
    justify-content: center;
    width: 100%;
}

.login-brand .brand-logo-login,
.buyer-auth-brand .brand-logo-login {
    max-height: 64px;
    object-fit: contain;
}

.buyer-auth-brand:not(:has(span)) {
    justify-content: center;
    width: 100%;
}

.brand-logo-landing {
    max-width: 180px;
    max-height: 48px;
}

.settings-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
    gap: 22px;
}

.settings-preview-card {
    align-self: start;
    position: sticky;
    top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.settings-logo-preview,
.settings-logo-box {
    display: grid;
    place-items: center;
    min-height: 120px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #f8fafc;
}

.settings-preview-card h2 {
    overflow: hidden;
    margin: 18px 0 6px;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-preview-card p,
.settings-preview-card small {
    color: var(--muted);
    font-weight: 720;
}

.settings-panel {
    margin-top: 0;
}

.settings-tabs {
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
}

.settings-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 13px;
    color: #667085;
    font-weight: 850;
}

.settings-tabs .nav-link.active {
    background: #fff;
    color: var(--blue-dark);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.settings-tab-content {
    padding-top: 24px;
}

.settings-section-heading {
    margin-bottom: 20px;
}

.settings-section-heading h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 850;
}

.settings-logo-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
    gap: 18px;
}

.settings-logo-current span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.settings-logo-new {
    min-height: 140px;
}

.settings-save-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

@media (max-width: 991.98px) {
    .settings-shell,
    .settings-logo-grid {
        grid-template-columns: 1fr;
    }

    .settings-preview-card {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .settings-tabs {
        display: grid;
    }

    .settings-tabs .nav-link,
    .settings-save-row .btn {
        width: 100%;
    }
}

/* Group purchase module */
.group-create-hero .dashboard-panel {
    margin-top: 0;
}

.group-total-meter {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
}

.group-total-meter span,
.group-kpi-card span,
.contributor-progress-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.group-total-meter strong {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 850;
}

.contributor-rows {
    display: grid;
    gap: 16px;
}

.contributor-row {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.group-dashboard-shell {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.group-funding-hero {
    position: relative;
    display: grid;
    gap: 18px;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgba(227, 231, 238, 0.86);
    border-radius: 28px;
    background:
        linear-gradient(135deg, #ffffff, rgba(248, 250, 252, 0.88)),
        #ffffff;
    box-shadow: var(--shadow-soft);
}

.group-funding-hero h2 {
    margin: 0 0 8px;
    color: #070b14;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 750;
    letter-spacing: -0.025em;
}

.group-funding-hero p {
    margin: 0;
    color: var(--muted);
}

.group-funding-hero > .badge {
    position: absolute;
    top: 26px;
    right: 26px;
}

.group-progress-track {
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf5;
}

.group-progress-track.small {
    height: 9px;
}

.group-progress-track > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--blue));
}

.group-kpi-grid,
.contributor-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.group-kpi-card,
.contributor-progress-card {
    display: grid;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.group-kpi-card strong {
    color: var(--text);
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 760;
}

.contributor-progress-card strong {
    color: var(--text);
    font-weight: 850;
}

.contributor-progress-card small {
    color: var(--muted);
    font-weight: 720;
}

.document-link-grid,
.group-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
}

.document-admin-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.logout-confirm-modal {
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.logout-confirm-modal .modal-body {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 34px;
    text-align: center;
}

.logout-confirm-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #eef2ff;
    color: var(--blue);
    font-size: 1.6rem;
}

.logout-confirm-modal h2 {
    margin: 4px 0 0;
    font-size: 1.35rem;
    font-weight: 850;
}

.logout-confirm-modal p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
}

.logout-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.agreement-preview {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fbfcfe;
}

.agreement-preview ul {
    margin: 16px 0 0;
    padding-left: 20px;
}

.agreement-preview li {
    margin-bottom: 8px;
    color: #344054;
    font-weight: 720;
}

@media (max-width: 1199.98px) {
    .group-kpi-grid,
    .contributor-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .group-funding-hero {
        padding: 22px;
    }

    .group-funding-hero > .badge {
        position: static;
        width: fit-content;
    }

    .group-kpi-grid,
    .contributor-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Group buyer public and dashboard flow */
.group-landing,
.buyer-shell,
.buyer-auth-screen {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% -10%, rgba(48, 79, 254, 0.1), transparent 28%),
        radial-gradient(circle at 92% 4%, rgba(8, 120, 95, 0.08), transparent 24%),
        #f5f6f8;
}

.landing-nav,
.buyer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(18px, 5vw, 54px);
}

.buyer-brand,
.buyer-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.buyer-brand strong,
.buyer-auth-brand strong {
    display: block;
    color: var(--text);
    font-weight: 850;
}

.buyer-brand small,
.buyer-auth-brand small {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.landing-nav-actions,
.landing-hero-actions,
.buyer-nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.buyer-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(227, 231, 238, 0.86);
    background: #ffffff;
}

.buyer-nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #475467;
    font-weight: 800;
}

.buyer-nav-links a:hover,
.buyer-nav-links a.active {
    background: #eef2ff;
    color: var(--blue-dark);
}

.group-landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
    gap: clamp(24px, 5vw, 60px);
    align-items: center;
    padding: clamp(28px, 6vw, 76px) clamp(18px, 5vw, 54px) 36px;
}

.group-landing-copy h1 {
    max-width: 760px;
    margin: 0;
    color: #070b14;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    font-size: clamp(2.5rem, 6vw, 5.2rem);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.025em;
}

.group-landing-copy p {
    max-width: 720px;
    margin: 22px 0;
    color: #5f6b7a;
    font-size: 1.08rem;
}

.landing-property-showcase {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #eef2f7;
    box-shadow: var(--shadow-hover);
}

.landing-property-showcase img,
.landing-property-placeholder {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.landing-property-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 4rem;
}

.landing-property-card {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    padding: 18px;
    border: 1px solid #ffffff;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.landing-property-card span,
.landing-property-card small {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.landing-property-card strong {
    display: block;
    margin: 6px 0;
    color: var(--text);
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    font-size: 1.45rem;
}

.landing-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 24px clamp(18px, 5vw, 54px);
}

.landing-benefit-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.landing-benefit-card i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 14px;
    background: #eef2ff;
    color: var(--blue-dark);
    font-size: 1.2rem;
}

.landing-benefit-card h2 {
    margin: 0 0 8px;
    font-size: 1.12rem;
    font-weight: 850;
}

.landing-process-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 24px clamp(18px, 5vw, 54px) 54px;
    padding: 28px;
    border-radius: 28px;
    background: #07111f;
    color: #fff;
}

.landing-process-band h2 {
    margin: 0;
    max-width: 720px;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
}

.landing-process-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.landing-process-list span {
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    color: #eef2ff;
    font-weight: 800;
}

.buyer-auth-screen {
    display: grid;
    place-items: center;
    padding: 24px;
}

.buyer-auth-card {
    width: min(100%, 480px);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.buyer-auth-switch {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
    font-weight: 720;
}

.buyer-auth-switch a {
    color: var(--blue-dark);
    font-weight: 850;
}

.buyer-page {
    padding: 30px clamp(18px, 4vw, 44px) 50px;
}

.buyer-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(227, 231, 238, 0.86);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.buyer-topbar h1 {
    margin: 0;
    color: #070b14;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
}

.buyer-topbar p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
}

.buyer-empty-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 280px;
    padding: 34px;
    border: 1px dashed var(--border-strong);
    border-radius: 24px;
    background: #fbfcfe;
    text-align: center;
}

.buyer-empty-state i {
    color: var(--blue-dark);
    font-size: 2.4rem;
}

.buyer-empty-state h2 {
    margin: 0;
}

.buyer-application-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.buyer-application-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.buyer-application-media {
    display: grid;
    place-items: center;
    min-height: 220px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 2.5rem;
}

.buyer-application-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.buyer-application-body {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
}

.buyer-application-body h3 {
    margin: 0;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif;
}

.buyer-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.buyer-card-footer span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

@media (max-width: 991.98px) {
    .landing-nav,
    .buyer-nav,
    .buyer-topbar,
    .landing-process-band {
        align-items: stretch;
        flex-direction: column;
    }

    .group-landing-hero,
    .landing-benefit-grid,
    .buyer-application-grid {
        grid-template-columns: 1fr;
    }

    .landing-property-showcase,
    .landing-property-showcase img,
    .landing-property-placeholder {
        min-height: 380px;
    }
}

@media (max-width: 575.98px) {
    .landing-nav-actions .btn,
    .landing-hero-actions .btn,
    .buyer-nav-links,
    .buyer-nav-links a,
    .buyer-topbar .btn,
    .buyer-card-footer .btn {
        width: 100%;
    }

    .buyer-nav-links {
        display: grid;
    }

    .buyer-auth-card,
    .buyer-topbar {
        padding: 22px;
    }

    .buyer-application-card {
        grid-template-columns: 1fr;
    }
}

/* HIG OS dashboard premium UI upgrade - final cascade */
:root {
    --hig-app-bg: #eef5ff;
    --hig-card: #ffffff;
    --hig-line: #dfe7f3;
    --hig-ink: #07111f;
    --hig-muted: #68768a;
    --hig-blue: #304ffe;
    --hig-green: #10a76f;
    --hig-amber: #f59e0b;
    --hig-red: #e34b5c;
    --hig-radius: 20px;
    --hig-shadow-soft: 0 8px 24px rgba(19, 35, 64, 0.06);
}

body {
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.95) 0, var(--hig-app-bg) 360px, #f7faff 100%);
    color: var(--hig-ink);
    font-family: "Plus Jakarta Sans", "Manrope", "Inter", system-ui, sans-serif;
}

.main-content {
    padding: 24px clamp(16px, 2.2vw, 34px) 36px;
}

.dashboard-topbar {
    position: sticky;
    top: 16px;
    z-index: 1010;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--hig-shadow-soft);
}

.dashboard-topbar::before,
.dashboard-topbar::after {
    display: none;
}

.dashboard-mobile-menu {
    display: none;
    flex: 0 0 44px;
}

.topbar-copy {
    min-width: 0;
}

.topbar-copy h1 {
    font-size: clamp(1.4rem, 2.1vw, 2rem);
}

.topbar-copy p {
    margin-top: 5px;
    font-size: 0.92rem;
}

.dashboard-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-search {
    width: min(34vw, 360px);
    min-width: 240px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--hig-line);
    border-radius: 14px;
    background: #f8fbff;
    color: var(--hig-muted);
}

.dashboard-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hig-ink);
    font: inherit;
}

.dashboard-icon-button,
.dashboard-user-chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hig-line);
    border-radius: 14px;
    background: #fff;
    color: var(--hig-ink);
    box-shadow: 0 8px 18px rgba(19, 35, 64, 0.05);
}

.dashboard-icon-button {
    position: relative;
    width: 44px;
}

.dashboard-icon-button span {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--hig-red);
}

.dashboard-user-chip {
    gap: 9px;
    padding: 0 12px 0 6px;
}

.dashboard-user-chip span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hig-blue);
    color: #fff;
    font-weight: 800;
}

.dashboard-user-chip strong {
    max-width: 140px;
    overflow: hidden;
    color: var(--hig-ink);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi-grid {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 16px;
}

.kpi-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    grid-template-areas:
        "label icon"
        "value icon"
        "note note";
    align-items: start;
    min-height: 154px;
    padding: 20px;
    border: 1px solid var(--hig-line);
    border-radius: 20px;
    background: var(--hig-card);
    box-shadow: var(--hig-shadow-soft);
}

.kpi-card::after {
    display: none;
}

.kpi-icon {
    grid-area: icon;
    width: 50px;
    height: 50px;
    margin: 0;
    border-radius: 50%;
    box-shadow: none;
}

.kpi-card span {
    grid-area: label;
    color: var(--hig-muted);
    font-size: 0.82rem;
}

.kpi-card strong {
    grid-area: value;
    margin-top: 10px;
    font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
    letter-spacing: 0;
}

.kpi-card p {
    grid-area: note;
    margin-top: 16px;
    font-size: 0.82rem;
}

.kpi-trend {
    display: inline-flex;
    margin-right: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
}

.kpi-trend.up {
    background: #e9fbf2;
    color: var(--hig-green);
}

.kpi-trend.warn {
    background: #fff7e6;
    color: #b46905;
}

.kpi-trend.down {
    background: #fff0f2;
    color: var(--hig-red);
}

.dashboard-panel,
.property-card,
.pipeline-card,
.stack-item,
.modal-content {
    border: 1px solid var(--hig-line);
    border-radius: var(--hig-radius);
    background: var(--hig-card);
    box-shadow: var(--hig-shadow-soft);
}

.dashboard-panel {
    padding: clamp(20px, 2vw, 28px);
}

.pipeline-chart-wrap {
    min-height: 280px;
}

.table-responsive,
.responsive-table-wrap {
    border: 1px solid var(--hig-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--hig-shadow-soft);
}

.crm-table {
    min-width: 760px;
    margin-bottom: 0;
}

.crm-table thead th {
    background: #f8fbff;
}

.status-pill,
.badge {
    border-radius: 999px;
}

.progress,
.group-progress-track {
    overflow: hidden;
    border-radius: 999px;
}

.form-control,
.form-select {
    border-color: var(--hig-line);
}

.btn {
    min-height: 44px;
}

@media (max-width: 1199.98px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .main-content {
        padding: 0 14px 24px;
    }

    .dashboard-topbar {
        top: 0;
        grid-template-columns: auto minmax(0, 1fr) auto;
        margin: 0 -14px 18px;
        border-radius: 0 0 20px 20px;
        border-top: 0;
    }

    .dashboard-mobile-menu {
        display: inline-flex;
    }

    .dashboard-search,
    .dashboard-user-chip strong {
        display: none;
    }

    .dashboard-user-chip {
        width: 44px;
        padding: 0;
    }

    .topbar-copy p,
    .page-kicker {
        display: none;
    }

    .topbar-copy h1 {
        overflow: hidden;
        font-size: 1.05rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 575.98px) {
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-card,
    .dashboard-panel {
        border-radius: 18px;
    }

    .topbar-actions,
    .status-pill {
        width: auto;
    }
}

/* Targeted dashboard overflow and mobile sidebar fixes */
html,
body,
.app-layout,
.main-content {
    max-width: 100%;
    overflow-x: clip;
}

.property-analytics-grid,
.property-analytics-grid > *,
.dashboard-panel,
.pipeline-chart-wrap {
    min-width: 0;
    max-width: 100%;
}

.property-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pipeline-chart-wrap {
    width: 100%;
    overflow-x: hidden;
}

.pipeline-chart-wrap .apexcharts-canvas,
.pipeline-chart-wrap .apexcharts-svg,
.pipeline-chart-wrap foreignObject {
    max-width: 100% !important;
}

.pipeline-chart-wrap .apexcharts-canvas {
    width: 100% !important;
}

.dashboard-search i,
.dashboard-icon-button i,
.dashboard-user-chip i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 1.05rem;
    line-height: 1;
}

.dashboard-icon-button {
    flex: 0 0 44px;
}

.dashboard-icon-button span {
    pointer-events: none;
}

.dashboard-user-chip span i {
    color: #fff;
}

@media (max-width: 991.98px) {
    .app-sidebar,
    body.sidebar-collapsed .app-sidebar,
    body:not(.sidebar-open) .app-sidebar {
        width: min(292px, 86vw);
        transform: translateX(-105%) !important;
    }

    body.sidebar-open .app-sidebar {
        width: min(292px, 86vw);
        transform: translateX(0) !important;
    }

    .main-content,
    body.sidebar-collapsed .main-content {
        width: 100%;
        margin-left: 0 !important;
    }

    body.sidebar-open .mobile-backdrop {
        display: block;
    }

    .property-analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin dashboard topbar responsiveness fix */
.dashboard-topbar {
    position: static;
    top: auto;
    z-index: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    overflow: visible;
}

.dashboard-topbar .topbar-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-topbar-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
    min-width: 0;
    max-width: 56%;
}

.dashboard-search {
    flex: 1 1 260px;
    width: clamp(220px, 26vw, 340px);
    min-width: 0;
    max-width: 340px;
}

.dashboard-mobile-menu {
    position: relative;
    z-index: 1025;
}

@media (max-width: 1199.98px) {
    .dashboard-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-topbar-actions {
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .dashboard-topbar {
        position: sticky;
        top: 0;
        z-index: 1025;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
        min-height: 64px;
        max-height: 76px;
        margin: 0 -14px 16px;
        padding: 8px 12px;
        border-radius: 0 0 16px 16px;
        overflow: visible;
    }

    .dashboard-mobile-menu {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 14px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .dashboard-topbar .topbar-copy {
        flex: 1 1 auto;
        min-width: 0;
    }

    .dashboard-topbar .topbar-copy h1 {
        margin: 0;
        overflow: hidden;
        font-size: 1rem;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-topbar-actions {
        flex: 0 0 auto;
        gap: 8px;
        max-width: none;
    }

    .dashboard-icon-button,
    .dashboard-user-chip {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 13px;
    }

    .dashboard-user-chip {
        padding: 0;
    }

    .dashboard-user-chip span {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 575.98px) {
    .dashboard-topbar {
        margin-bottom: 14px;
    }

    .dashboard-topbar-actions {
        width: auto;
    }
}

/* Admin mobile topbar compact alignment fix */
@media (max-width: 991.98px) {
    .topbar.dashboard-topbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap !important;
        min-height: 64px;
        max-height: 76px;
        padding: 12px 16px;
        overflow: visible;
    }

    .topbar.dashboard-topbar .menu-toggle,
    .topbar.dashboard-topbar .dashboard-mobile-menu {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 44px;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        min-height: 44px;
        z-index: 1100;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .topbar.dashboard-topbar > div:first-of-type,
    .topbar.dashboard-topbar .topbar-copy {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .topbar.dashboard-topbar h1,
    .topbar.dashboard-topbar p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar.dashboard-topbar .topbar-actions,
    .topbar.dashboard-topbar .dashboard-topbar-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex: 0 0 auto;
        flex-shrink: 0;
        flex-wrap: nowrap !important;
        width: auto;
        max-width: none;
    }

    .topbar.dashboard-topbar .topbar-actions > *,
    .topbar.dashboard-topbar .dashboard-topbar-actions > * {
        flex-shrink: 0;
    }

    .topbar.dashboard-topbar .dashboard-search {
        display: none !important;
    }
}

/* Admin mobile topbar full-width alignment fix */
@media (max-width: 991.98px) {
    .main-content {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    .topbar.dashboard-topbar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Admin mobile full-bleed app bar and no title text */
@media (max-width: 991.98px) {
    .topbar.dashboard-topbar {
        width: 100vw;
        max-width: 100vw;
        margin-left: -16px;
        margin-right: -16px;
        border-radius: 0;
        box-sizing: border-box;
    }

    .topbar.dashboard-topbar .topbar-copy {
        display: none;
    }

    .topbar.dashboard-topbar .dashboard-topbar-actions {
        margin-left: auto;
    }
}

/* Shared admin mobile app bar */
.admin-mobile-topbar {
    display: none;
}

@media (max-width: 991.98px) {
    .admin-mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 1025;
        width: 100vw;
        max-width: 100vw;
        min-height: 64px;
        max-height: 76px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--hig-line);
        background: #ffffff;
        box-shadow: 0 10px 26px rgba(19, 35, 64, 0.08);
        box-sizing: border-box;
        overflow: visible;
    }

    .admin-mobile-menu-toggle,
    .admin-mobile-icon-button,
    .admin-mobile-profile-button {
        width: 42px;
        height: 42px;
        min-height: 42px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        border: 1px solid var(--hig-line);
        border-radius: 14px;
        background: #fff;
        color: var(--hig-ink);
        box-shadow: 0 8px 18px rgba(19, 35, 64, 0.05);
    }

    .admin-mobile-menu-toggle {
        position: relative;
        z-index: 1100;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-mobile-topbar-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        gap: 8px;
        margin-left: auto;
    }

    .admin-mobile-icon-button {
        position: relative;
    }

    .admin-mobile-icon-button span {
        position: absolute;
        top: 8px;
        right: 9px;
        width: 8px;
        height: 8px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: var(--hig-red);
        pointer-events: none;
    }

    .admin-mobile-topbar i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        line-height: 1;
    }

    .topbar.dashboard-topbar {
        display: none !important;
    }

    .admin-mobile-topbar + .main-content {
        padding-top: 16px;
    }
}

/* Global solid SaaS surface correction */
:root {
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #f8fafc;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #4b5563;
    --muted-soft: #6b7280;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .08);
    --hig-card: #ffffff;
    --hig-line: #e5e7eb;
    --hig-shadow-soft: var(--shadow-soft);
}

body,
.main-content {
    color: #111827;
}

.text-muted,
small,
.crm-table tbody td,
.notification-item small,
.notification-page-item small {
    color: #6b7280 !important;
}

.topbar p,
.dashboard-panel p,
.kpi-card span,
.property-meta span,
.notification-item em,
.notification-page-item p {
    color: #4b5563 !important;
}

.login-card .login-copy,
.buyer-auth-card .login-copy {
    text-align: center;
}

.login-card .login-copy h1,
.buyer-auth-card .login-copy h1 {
    text-align: center;
}

.login-card .login-copy p,
.buyer-auth-card .login-copy p {
    max-width: 32rem;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    line-height: 1.65;
}

.login-card,
.topbar,
.dashboard-topbar,
.admin-mobile-topbar,
.kpi-card,
.dashboard-panel,
.property-card,
.pipeline-card,
.stack-item,
.settings-preview-card,
.group-kpi-card,
.contributor-progress-card,
.buyer-auth-card,
.buyer-topbar,
.buyer-application-card,
.landing-property-card,
.landing-benefit-card,
.modal-content,
.table-responsive,
.responsive-table-wrap,
.document-link,
.group-create-hero .dashboard-panel {
    border: 1px solid var(--border) !important;
    background: #ffffff !important;
    opacity: 1 !important;
    box-shadow: var(--shadow-soft) !important;
    filter: none !important;
}

.topbar,
.dashboard-topbar,
.admin-mobile-topbar,
.buyer-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border);
}

.kpi-card:hover,
.dashboard-panel:hover,
.property-card:hover,
.pipeline-card:hover,
.stack-item:hover,
.landing-property-card:hover,
.landing-benefit-card:hover,
.buyer-application-card:hover {
    border-color: #d7dce5 !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-card) !important;
}

.kpi-card::after,
.topbar::before,
.topbar::after,
.dashboard-topbar::before,
.dashboard-topbar::after {
    display: none !important;
}

.form-control,
.form-select,
.form-check-input,
.crm-table thead th,
.crm-table tbody td,
.alert,
.status-pill,
.badge {
    filter: none !important;
}

.form-control,
.form-select {
    background-color: #ffffff !important;
    color: #111827 !important;
}

.table,
.crm-table {
    --bs-table-bg: #ffffff !important;
    --bs-table-hover-bg: #f9fafb !important;
    background: #ffffff !important;
    color: #111827 !important;
}

.crm-table thead th {
    background: var(--surface-soft) !important;
    border-bottom: 1px solid var(--border) !important;
    color: #4b5563 !important;
}

.crm-table tbody td {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

.mobile-backdrop {
}

/* Fast admin sidebar submenu collapse */
.app-sidebar .collapsing,
.app-sidebar .collapse.collapsing,
.app-sidebar .sidebar-submenu.collapsing {
    transition: height 120ms ease !important;
}

.app-sidebar .sidebar-dropdown-toggle .bi-chevron-down {
    transition: transform 120ms ease, opacity 120ms ease !important;
}

/* Global search and notifications */
.topbar.dashboard-topbar {
    position: relative;
    z-index: 4000;
    overflow: visible !important;
}

.dashboard-topbar-actions,
.dashboard-search {
    overflow: visible !important;
}

.global-search-wrapper {
    position: relative;
    z-index: 5000;
    overflow: visible !important;
}

.global-search-dropdown,
.notification-dropdown {
    position: absolute;
    z-index: 2200;
    display: none;
    border: 1px solid var(--hig-line, #e5e7eb);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
}

.global-search-dropdown {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(520px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(560px, 72vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    z-index: 10000;
    box-sizing: border-box;
}

.global-search-dropdown.is-open,
.notification-dropdown.is-open {
    display: block;
}

@media (max-width: 768px) {
    .global-search-dropdown {
        position: fixed;
        top: 72px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}

.global-search-group + .global-search-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
}

.global-search-group h2 {
    margin: 0 0 6px;
    padding: 4px 8px;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.global-search-item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #101828;
}

.global-search-item:hover,
.global-search-item:focus,
.global-search-item.is-active {
    background: #f2f6ff;
    color: #101828;
    outline: none;
}

.global-search-item strong,
.notification-item strong {
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-item span {
    overflow: hidden;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-state,
.notification-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px;
    color: #667085;
    font-size: 0.9rem;
    font-weight: 800;
}

.notification-dropdown {
    position: absolute;
    max-height: min(620px, 78vh);
    overflow: hidden;
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid #eef2f7;
}

.notification-head strong {
    font-weight: 900;
}

.notification-head button {
    border: 0;
    background: transparent;
    color: var(--hig-blue, #304ffe);
    font-size: 0.78rem;
    font-weight: 850;
}

.notification-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}

.notification-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
    border-radius: 14px;
    color: #101828;
}

.notification-item:hover {
    background: #f8fbff;
    color: #101828;
}

.notification-item.is-unread {
    background: #f2f6ff;
}

.notification-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}

.notification-item.is-unread .notification-dot {
    background: var(--hig-blue, #304ffe);
}

.notification-item small,
.notification-item em {
    display: block;
    color: #667085;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.45;
}

.notification-item small {
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.notification-item em {
    margin-top: 5px;
    color: #98a2b3;
}

.notification-view-all {
    display: block;
    padding: 12px 14px 14px;
    border-top: 1px solid #eef2f7;
    color: var(--hig-blue, #304ffe);
    font-size: 0.85rem;
    font-weight: 900;
    text-align: center;
}

[data-notification-badge].has-count {
    width: auto !important;
    min-width: 18px;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
}

.notification-page-list {
    display: grid;
    gap: 12px;
}

.notification-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--hig-line, #e5e7eb);
    border-radius: 16px;
    background: #fff;
}

.notification-page-item.is-unread {
    border-color: rgba(48, 79, 254, 0.22);
    background: #f8fbff;
}

.notification-page-item > div:first-child {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.notification-page-dot {
    width: 10px;
    height: 10px;
    margin-top: 8px;
    border-radius: 50%;
    background: #cbd5e1;
}

.notification-page-item.is-unread .notification-page-dot {
    background: var(--hig-blue, #304ffe);
}

.notification-page-item h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.notification-page-item p {
    margin: 5px 0;
    color: #667085;
    overflow-wrap: anywhere;
}

.notification-page-item small {
    color: #98a2b3;
    font-weight: 800;
}

.notification-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.notification-page-empty {
    display: grid;
    place-items: center;
    padding: 44px 18px;
    color: #667085;
    text-align: center;
}

.notification-page-empty i {
    margin-bottom: 12px;
    color: var(--hig-blue, #304ffe);
    font-size: 2rem;
}

.notification-page-empty h2 {
    margin: 0 0 6px;
    color: #101828;
    font-size: 1.2rem;
}

@media (max-width: 575.98px) {
    .notification-page-item {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-page-actions,
    .notification-page-actions .btn,
    .notification-page-actions form {
        width: 100%;
    }
}

/* Phase 4 Single Buyer milestone workflow */
.admin-stage-workflow-card {
    align-content: start;
}

.admin-next-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-color: rgba(37, 99, 235, 0.22) !important;
}

.admin-next-action-card h2 {
    margin: 0 0 6px;
}

.admin-next-action-card .btn {
    flex: 0 0 auto;
}

.admin-stage-badge-row,
.admin-stage-actions,
.admin-stage-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-stage-badge-row .badge {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
}

.admin-stage-progress-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-stage-progress-summary > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.admin-stage-progress-summary span,
.admin-stage-progress-summary strong {
    display: block;
}

.admin-stage-progress-summary span {
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-stage-progress-summary strong {
    margin-top: 4px;
    color: #111827;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-stage-details {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.admin-stage-detail-actions {
    margin-top: 14px;
}

.admin-stage-detail-actions form {
    flex: 0 1 auto;
}

.admin-stage-workflow-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-stage-workflow-meta > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
}

.admin-stage-workflow-meta span,
.admin-stage-workflow-meta small {
    display: block;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-stage-workflow-meta strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-action-required-panel {
    margin-top: 0;
    border-color: rgba(217, 119, 6, 0.22) !important;
}

.admin-action-list {
    display: grid;
    gap: 10px;
}

.admin-action-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
}

.admin-action-row.is-unread {
    border-color: rgba(37, 99, 235, 0.2);
    background: #f2f6ff;
}

.admin-action-row strong,
.admin-action-row small {
    display: block;
    overflow-wrap: anywhere;
}

.admin-action-row small,
.admin-action-row em {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 750;
}

@media (max-width: 720px) {
    .admin-stage-workflow-meta,
    .admin-action-row,
    .admin-stage-progress-summary {
        grid-template-columns: 1fr;
    }

    .admin-next-action-card,
    .admin-stage-actions,
    .admin-stage-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-next-action-card .btn,
    .admin-stage-actions .btn,
    .admin-stage-detail-actions .btn,
    .admin-stage-detail-actions form {
        width: 100%;
    }
}

/* Focused Single Buyer stage workflow */
.admin-summary-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.admin-summary-list span {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    overflow-wrap: anywhere;
}

.admin-summary-list strong {
    display: block;
    color: #111827;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.admin-stage-workflow-shell {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(0, 1.8fr) minmax(180px, .75fr);
    align-items: start;
    gap: 18px;
}

.admin-stage-preview-card,
.admin-current-stage-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
}

.admin-stage-preview-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.admin-stage-preview-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-stage-preview-card p {
    margin: 0;
    color: #667085;
    font-weight: 700;
}

.admin-stage-preview-head {
    display: grid;
    gap: 8px;
}

.admin-current-stage-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-color: rgba(37, 99, 235, 0.28);
}

.admin-current-stage-head,
.admin-current-actions,
.admin-payment-review-box {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-current-stage-head h2 {
    margin: 0;
    color: #111827;
    font-size: 1.55rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-latest-update {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-latest-update span,
.admin-latest-update small {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 800;
}

.admin-latest-update .admin-stage-update span {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.admin-latest-update .admin-stage-update small {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 800;
}

.admin-latest-update strong {
    color: #111827;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.admin-latest-update p,
.admin-payment-review-box p {
    margin: 0;
    color: #475467;
}

.admin-current-primary {
    flex: 1 1 auto;
    max-width: 320px;
}

.admin-payment-review-box {
    align-items: center;
    flex-wrap: wrap;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.stage-nav-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.stage-nav-btn {
    min-width: 220px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
}

.admin-compact-stage-list {
    display: grid;
    gap: 10px;
}

.admin-compact-stage-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-compact-stage-row strong,
.admin-compact-stage-row small {
    display: block;
    overflow-wrap: anywhere;
}

.admin-compact-stage-row small {
    color: #667085;
    font-weight: 750;
}

.admin-compact-stage-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-compact-stage-summary {
    grid-column: 1 / -1;
    padding-top: 10px;
}

.admin-pending-stages-modal .modal-header {
    align-items: flex-start;
}

.admin-pending-stage-accordion {
    display: grid;
    gap: 10px;
}

.admin-pending-stage-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.admin-pending-stage-item .accordion-button {
    gap: 14px;
    background: #ffffff;
}

.admin-pending-stage-title {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.admin-pending-stage-title strong,
.admin-pending-stage-summary span,
.admin-pending-stage-existing strong {
    overflow-wrap: anywhere;
}

.admin-pending-stage-title small,
.admin-pending-stage-existing span,
.admin-payment-choice small {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 750;
}

.admin-pending-stage-summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-right: 12px;
}

.admin-pending-stage-existing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.admin-pending-stage-existing > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-stage-payment-setup-form {
    display: grid;
    gap: 16px;
}

.admin-payment-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-payment-choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    min-height: 84px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.admin-payment-choice:has(input:checked) {
    border-color: rgba(37, 99, 235, 0.55);
    background: #eff6ff;
}

.admin-payment-choice span {
    display: grid;
    gap: 4px;
}

.admin-payment-required-fields {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.admin-stage-payment-setup-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 991.98px) {
    .admin-summary-list,
    .admin-stage-workflow-shell,
    .admin-pending-stage-existing,
    .admin-payment-choice-grid {
        grid-template-columns: 1fr;
    }

    .admin-current-stage-head,
    .admin-current-actions,
    .admin-payment-review-box,
    .admin-compact-stage-row {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-compact-stage-row {
        display: flex;
    }

    .admin-current-primary,
    .admin-current-actions .btn,
    .admin-current-actions .dropdown,
    .admin-current-actions .dropdown-toggle,
    .admin-payment-review-box .btn,
    .admin-compact-stage-actions,
    .admin-compact-stage-actions .btn,
    .admin-stage-payment-setup-actions .btn {
        width: 100%;
        max-width: none;
    }

    .admin-stage-payment-setup-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

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

    .stage-nav-btn {
        width: 100%;
    }

    .admin-pending-stage-item .accordion-button,
    .admin-pending-stage-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Single buyer request workspace */
.single-request-workspace {
    background: #f6f8fb;
    font-family: Inter, "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

.single-request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 22px 24px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.single-request-header-main {
    min-width: 0;
}

.single-request-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.single-request-header h1 {
    margin: 2px 0 10px;
    color: #111827;
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 760;
    letter-spacing: 0;
}

.single-request-header-meta,
.single-request-status-stack,
.single-request-action-list,
.single-request-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.single-request-header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #5f6b7a;
    font-size: 0.9rem;
}

.single-request-header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.single-request-status-stack .badge,
.single-request-status-row .badge {
    border: 1px solid #e5e9f0;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 750;
}

.single-request-status-stack .text-bg-light,
.single-request-status-row .text-bg-light {
    color: #344054 !important;
    background: #f8fafc !important;
}

.single-request-tabs-shell {
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.single-request-tabs {
    flex-wrap: nowrap;
    gap: 4px;
    padding: 8px 12px 0;
    overflow-x: auto;
    border-bottom: 1px solid #e8edf5;
    scrollbar-width: thin;
}

.single-request-tabs .nav-link {
    white-space: nowrap;
    color: #5f6b7a;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 10px 10px 0 0;
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 750;
}

.single-request-tabs .nav-link:hover {
    color: #1f2937;
    background: #f8fafc;
}

.single-request-tabs .nav-link.active {
    color: #2563eb;
    background: #fff;
    border-bottom-color: #2563eb;
}

.single-request-tab-content {
    padding: 18px;
}

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

.single-request-panel {
    background: #fff;
    border: 1px solid #e7ebf2;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.single-request-panel-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 16px;
}

.single-request-panel-head span,
.single-request-detail-grid span,
.single-request-description span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.single-request-panel-head h2 {
    margin: 0;
    color: #111827;
    font-size: 1.05rem;
    font-weight: 780;
    letter-spacing: 0;
}

.single-request-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.single-request-detail-grid > div {
    min-width: 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #edf1f7;
    border-radius: 12px;
}

.single-request-detail-grid strong {
    display: block;
    margin-top: 5px;
    color: #1f2937;
    font-size: 0.94rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.single-request-description {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #edf1f7;
    border-radius: 12px;
    background: #fff;
}

.single-request-description p,
.single-request-message p,
.single-request-timeline p {
    margin: 6px 0 0;
    color: #475467;
    line-height: 1.55;
}

.single-request-compact-form,
.single-request-note-form {
    display: grid;
    gap: 10px;
}

.single-request-compact-form .form-label,
.single-request-note-form .form-label {
    margin-bottom: -2px;
    color: #344054;
    font-size: 0.85rem;
    font-weight: 750;
}

.single-request-workspace .single-request-list {
    display: grid;
    gap: 10px;
}

.single-request-workspace .single-request-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #edf1f7;
    border-radius: 12px;
}

.single-request-workspace .single-request-list-item strong,
.single-request-workspace .single-request-list-item small {
    display: block;
}

.single-request-workspace .single-request-list-item strong {
    color: #1f2937;
    font-weight: 760;
}

.single-request-workspace .single-request-list-item small,
.single-request-message small,
.single-request-timeline small {
    color: #667085;
}

.single-request-empty {
    padding: 18px;
    color: #667085;
    background: #f8fafc;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    text-align: center;
}

.single-request-action-list .btn,
.single-request-panel .btn {
    border-radius: 10px;
    font-weight: 750;
}

.single-request-table {
    margin-bottom: 0;
}

.single-request-message {
    padding: 14px;
    border: 1px solid #e7ebf2;
    border-radius: 12px;
    background: #fff;
}

.single-request-message-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.single-request-message h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 0.98rem;
    font-weight: 760;
}

.single-request-timeline {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.single-request-timeline article {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 12px;
}

.single-request-timeline article > span {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 0 0 4px #dbeafe;
}

.single-request-timeline article > div {
    padding-bottom: 12px;
    border-bottom: 1px solid #edf1f7;
}

.single-request-timeline strong {
    color: #1f2937;
    font-weight: 760;
}

@media (max-width: 992px) {
    .single-request-header,
    .single-request-header-side {
        align-items: stretch;
    }

    .single-request-header {
        flex-direction: column;
    }

    .single-request-header-side .btn {
        width: 100%;
    }

    .single-request-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .single-request-workspace {
        padding-left: 12px;
        padding-right: 12px;
    }

    .single-request-header,
    .single-request-panel {
        padding: 14px;
        border-radius: 12px;
    }

    .single-request-tab-content {
        padding: 12px;
    }

    .single-request-detail-grid {
        grid-template-columns: 1fr;
    }

    .single-request-workspace .single-request-list-item,
    .single-request-message-head,
    .single-request-action-list {
        align-items: stretch;
        flex-direction: column;
    }

    .single-request-action-list .btn,
    .single-request-action-list form,
    .single-request-action-list button {
        width: 100%;
    }
}

/* Premium single buyer request workspace */
.request-workspace,
.single-request-workspace {
    --request-blue: #2563eb;
    --request-blue-deep: #1d4ed8;
    --request-ink: #101828;
    --request-muted: #667085;
    --request-soft: #f7f9fc;
    --request-line: #e6ebf2;
    --request-shadow: 0 22px 60px rgba(16, 24, 40, 0.08);
    background:
        linear-gradient(180deg, #f8fafc 0%, #f4f7fb 42%, #f6f8fb 100%);
    color: var(--request-ink);
    font-family: Inter, "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
}

.request-hero,
.single-request-header {
    align-items: center;
    gap: 28px;
    margin-bottom: 22px;
    padding: 26px 28px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--request-shadow);
}

.single-request-header-main {
    flex: 1 1 auto;
}

.single-request-back {
    min-height: 34px;
    margin-bottom: 12px;
    padding: 0;
    color: #475467;
    font-size: 0.86rem;
    font-weight: 700;
    transition: color 160ms ease, transform 160ms ease;
}

.single-request-back:hover {
    color: var(--request-blue);
    transform: translateX(-2px);
}

.request-workspace .page-kicker {
    margin-bottom: 8px;
    color: var(--request-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.single-request-header h1 {
    max-width: 860px;
    margin: 0 0 14px;
    color: #0f172a;
    font-size: clamp(1.75rem, 2.3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.12;
}

.single-request-header-meta {
    gap: 9px;
}

.single-request-header-meta span {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #edf1f7;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    font-size: 0.86rem;
    font-weight: 650;
}

.single-request-header-meta i {
    color: #94a3b8;
}

.single-request-header-side {
    flex: 0 0 auto;
    gap: 14px;
}

.single-request-status-stack,
.single-request-status-row {
    gap: 8px;
}

.request-soft-badge,
.single-request-workspace .badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.single-request-workspace .text-bg-primary,
.single-request-workspace .text-bg-info {
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.single-request-workspace .text-bg-light,
.single-request-workspace .text-bg-secondary {
    border-color: #e5e7eb !important;
    background: #f8fafc !important;
    color: #475467 !important;
}

.single-request-workspace .text-bg-warning {
    border-color: #fde68a !important;
    background: #fffbeb !important;
    color: #b45309 !important;
}

.single-request-workspace .text-bg-success {
    border-color: #bbf7d0 !important;
    background: #ecfdf3 !important;
    color: #047857 !important;
}

.single-request-workspace .text-bg-danger {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #b42318 !important;
}

.single-request-workspace .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.1;
    box-shadow: none;
}

.single-request-workspace .btn-sm {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.single-request-workspace .btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--request-blue), var(--request-blue-deep));
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.single-request-workspace .btn-primary:hover {
    border-color: transparent;
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #ffffff;
    transform: translateY(-1px);
}

.single-request-workspace .btn-outline-primary,
.single-request-workspace .btn-outline-secondary {
    border-color: #d6deea;
    background: #ffffff;
    color: #344054;
}

.single-request-workspace .btn-outline-primary:hover,
.single-request-workspace .btn-outline-secondary:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.request-panel,
.single-request-tabs-shell,
.single-request-panel {
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 44px rgba(16, 24, 40, 0.055);
}

.single-request-tabs-shell {
    overflow: hidden;
}

.request-tabs,
.single-request-tabs {
    gap: 6px;
    padding: 10px 14px 0;
    border-bottom: 1px solid #edf1f7;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    overflow-x: auto;
    scrollbar-width: thin;
}

.single-request-tabs .nav-item {
    flex: 0 0 auto;
}

.single-request-tabs .nav-link {
    position: relative;
    min-height: 48px;
    padding: 13px 14px 15px;
    border: 0;
    border-radius: 14px 14px 0 0;
    color: #667085;
    font-size: 0.9rem;
    font-weight: 750;
    transition: background 160ms ease, color 160ms ease;
}

.single-request-tabs .nav-link::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
}

.single-request-tabs .nav-link:hover {
    background: #f8fafc;
    color: #344054;
}

.single-request-tabs .nav-link.active {
    background: #eff6ff;
    color: var(--request-blue);
}

.single-request-tabs .nav-link.active::after {
    background: var(--request-blue);
}

.single-request-tab-content {
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.86) 0%, rgba(255, 255, 255, 0) 240px),
        #ffffff;
}

.single-request-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.single-request-panel {
    min-width: 0;
    padding: 24px;
    border-color: #e5ebf3;
    box-shadow: 0 18px 46px rgba(16, 24, 40, 0.07);
}

.single-request-panel-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f7;
}

.single-request-panel-head span,
.single-request-detail-grid span,
.request-info-grid span,
.request-action-card span,
.single-request-description span {
    color: var(--request-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.single-request-panel-head h2 {
    color: #111827;
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.25;
}

.request-info-grid,
.single-request-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.request-info-tile,
.single-request-detail-grid > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.single-request-detail-grid strong {
    margin-top: 7px;
    color: #182230;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
}

.single-request-description {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.035);
}

.single-request-description p,
.single-request-message p,
.single-request-timeline p {
    color: #475467;
    font-size: 0.94rem;
    line-height: 1.65;
}

.request-workflow-card {
    display: grid;
    gap: 16px;
}

.request-workflow-card .single-request-panel-head,
.request-workflow-card .single-request-status-row {
    margin-bottom: 0;
}

.request-action-card {
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.request-action-card p {
    margin: 7px 0 0;
    color: #1f2937;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.55;
}

.request-quick-actions-card {
    align-content: start;
}

.request-payment-action-list {
    display: grid;
    gap: 12px;
}

.request-payment-action-item {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.88) 0%, rgba(255, 255, 255, 0.98) 58%),
        #ffffff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.075);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.request-payment-action-item.is-review-focus {
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

.request-payment-action-main,
.request-payment-action-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.request-payment-action-kicker,
.request-payment-action-meta span {
    color: var(--request-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.request-payment-action-main h3 {
    margin: 3px 0 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.28;
}

.request-payment-action-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.request-payment-action-meta > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e8eef6;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
}

.request-payment-action-meta strong {
    display: block;
    margin-top: 5px;
    color: #182230;
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.35;
}

.request-payment-action-controls {
    justify-content: flex-start;
}

.single-request-compact-form,
.single-request-note-form {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #edf1f7;
    border-radius: 18px;
    background: #fbfcfe;
}

.single-request-compact-form .btn,
.single-request-note-form .btn {
    justify-self: start;
}

.single-request-compact-form .form-label,
.single-request-note-form .form-label,
.single-request-workspace .form-label {
    margin: 0;
    color: #667085;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.single-request-workspace .form-control,
.single-request-workspace .form-select {
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background-color: #ffffff;
    color: #111827;
    font-size: 0.94rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.single-request-workspace textarea.form-control {
    min-height: 104px;
    line-height: 1.5;
}

.single-request-workspace .form-control:focus,
.single-request-workspace .form-select:focus {
    border-color: var(--request-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.single-request-workspace .form-select {
    background-position: right 13px center;
}

.single-request-rejection-field.is-hidden {
    display: none;
}

.single-request-workspace .single-request-list {
    gap: 12px;
}

.single-request-workspace .single-request-list-item,
.single-request-message {
    padding: 16px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.04);
}

.single-request-workspace .single-request-list-item strong,
.single-request-message h3,
.single-request-timeline strong {
    color: #182230;
    font-size: 0.96rem;
    font-weight: 750;
}

.single-request-workspace .single-request-list-item small,
.single-request-message small,
.single-request-timeline small {
    margin-top: 3px;
    color: var(--request-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.single-request-empty {
    padding: 26px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #667085;
    font-size: 0.92rem;
    font-weight: 650;
    text-align: center;
}

.single-request-action-list {
    gap: 10px;
}

.single-request-panel > .table-responsive {
    overflow: hidden;
    border: 1px solid #e8eef6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.04);
}

.single-request-table {
    min-width: 760px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.single-request-table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid #e8eef6;
    background: #f8fafc;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.single-request-table tbody td {
    padding: 15px 16px;
    border-bottom-color: #edf1f7;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 600;
}

.single-request-table tbody tr:last-child td {
    border-bottom: 0;
}

.single-request-table tbody tr:hover td {
    background: #f8fbff;
}

.single-request-timeline {
    display: grid;
    gap: 0;
    margin-top: 18px;
}

.single-request-timeline article {
    grid-template-columns: 14px minmax(0, 1fr);
    column-gap: 14px;
    padding: 0;
}

.single-request-timeline article > span {
    width: 10px;
    height: 10px;
    background: var(--request-blue);
    box-shadow: 0 0 0 5px #dbeafe;
}

.single-request-timeline article > div {
    padding: 0 0 18px;
    border-bottom: 1px solid #edf1f7;
}

.single-request-timeline article + article {
    padding-top: 18px;
}

.single-request-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.single-request-action-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.single-request-action-list form {
    min-width: min(100%, 280px);
}

.single-request-action-list form:has(textarea) {
    flex: 1 1 320px;
    padding: 16px;
    border: 1px solid #edf1f7;
    border-radius: 18px;
    background: #fbfcfe;
}

.single-request-workspace .btn-success {
    border-color: transparent;
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.18);
}

.single-request-workspace .btn-outline-danger {
    border-color: #fecaca;
    background: #ffffff;
    color: #b42318;
}

.single-request-workspace .btn-outline-danger:hover {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #991b1b;
}

.single-progress-track {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #e8eef7;
}

.single-progress-track > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--request-blue), #22c55e);
}

@media (max-width: 1199.98px) {
    .single-request-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .request-hero,
    .single-request-header,
    .single-request-header-side {
        align-items: stretch;
    }

    .request-hero,
    .single-request-header {
        flex-direction: column;
    }

    .single-request-header-side .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .request-workspace,
    .single-request-workspace {
        padding-right: 14px;
        padding-left: 14px;
    }

    .request-hero,
    .single-request-header,
    .single-request-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .single-request-header h1 {
        font-size: 1.72rem;
    }

    .single-request-header-meta,
    .single-request-status-stack,
    .single-request-status-row {
        align-items: flex-start;
    }

    .single-request-header-meta span {
        width: 100%;
    }

    .single-request-tab-content {
        padding: 16px;
    }

    .request-info-grid,
    .single-request-detail-grid {
        grid-template-columns: 1fr;
    }

    .single-request-workspace .single-request-list-item,
    .single-request-message-head,
    .single-request-action-list {
        align-items: stretch;
        flex-direction: column;
    }

    .single-request-action-list .btn,
    .single-request-action-list form,
    .single-request-action-list button,
    .request-payment-action-controls .btn,
    .single-request-workspace .single-request-list-item .btn,
    .single-request-compact-form .btn,
    .single-request-note-form .btn {
        width: 100%;
    }

    .request-payment-action-main,
    .request-payment-action-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .request-payment-action-meta {
        grid-template-columns: 1fr;
    }
}

/* Remove redundant decorative section tags from admin/single buyer dashboard surfaces. */
.table-pagination-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(31, 52, 75, .1);
}

.table-pagination-summary { color: #68758a; font-size: .9rem; }
.table-pagination-nav .pagination { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.table-pagination-nav .page-link { border-radius: 8px; border: 1px solid #dbe3ec; color: #264e70; min-width: 38px; text-align: center; }
.table-pagination-nav .page-item.active .page-link { background: #264e70; border-color: #264e70; color: #fff; }
.table-pagination-nav .page-item.disabled .page-link { background: #f5f7fa; color: #9aa6b5; }
@media (max-width: 640px) {
    .table-pagination-shell { align-items: flex-start; flex-direction: column; }
    .table-pagination-nav, .table-pagination-nav .pagination { width: 100%; justify-content: flex-start; }
    .table-pagination-nav .page-link { padding: .42rem .55rem; }
}

.page-kicker,
.request-soft-badge,
.single-request-panel-head > span:first-child {
    display: none !important;
}

.single-request-panel-head {
    gap: 0;
}
