/* RNR Portal — professional construction client UI */
:root {
    --primary-font: "Inter", system-ui, sans-serif;
    --primary-color: #0b3a82;
    --primary-color-hover: #082e68;
    --ca-primary: #0b3a82;
    --ca-accent: #0b3a82;
    --ca-bg: #eef2f7;
    --ca-surface: #ffffff;
    --ca-border: #dbe3ef;
    --ca-text: #0f172a;
    --ca-muted: #64748b;
    --ca-sidebar: #0b1220;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --bs-primary: #0b3a82;
    --bs-primary-rgb: 11, 58, 130;
}

body,
.ca-theme {
    font-family: var(--primary-font);
    color: var(--ca-text);
}

.ca-app {
    background: var(--ca-bg) !important;
}

.ca-content-wrap {
    background: #ffffff;
}

.ca-toolbar {
    background: #ffffff !important;
    border-bottom: 1px solid #eef2f7 !important;
    padding: 1rem 1.5rem !important;
}

.ca-toolbar-title {
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.ca-content {
    padding: 1.5rem 1.75rem !important;
    max-width: none;
    width: 100%;
}

/* Dark sidebar default (client) */
.ca-sidebar {
    background: linear-gradient(180deg, #0b1220 0%, #111827 100%) !important;
    width: 260px !important;
}

.ca-sidebar__brand {
    padding: 1.25rem 1.15rem !important;
}

.ca-sidebar__brand a {
    font-size: 1.05rem !important;
    gap: 0.65rem !important;
}

.ca-sidebar__user {
    margin: 0 0.85rem 0.75rem;
    padding: 0.9rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.ca-sidebar__user .avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    font-weight: 700;
    font-size: 0.95rem;
}

.ca-sidebar__nav a {
    margin: 0 0.65rem 0.2rem;
    border-radius: 10px;
    border-left: none !important;
    padding: 0.7rem 0.9rem !important;
}

.ca-sidebar__nav a.active,
.ca-nav-list a.active {
    background: rgba(11, 58, 130, 0.55) !important;
    color: #fff !important;
}

.ca-sidebar__footer {
    padding: 1rem !important;
}

.ca-mobile-top {
    background: #fff !important;
    box-shadow: var(--shadow-sm);
}

/* ========== Grow-style ADMIN shell (light sidebar + top bar) ========== */
.admin-shell {
    --ca-bg: #f4f6f9;
    --admin-topbar-h: 62px;
    --admin-sidebar-w: 250px;
    background: #f4f6f9 !important;
}

.admin-shell__frame {
    min-height: 100vh;
}

.admin-topbar {
    height: var(--admin-topbar-h);
    background: #fff;
    border-bottom: 1px solid #e8edf3;
    padding: 0 1.1rem;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-topbar__left,
.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar__brand .brand-logo-img {
    max-height: 36px;
    width: auto;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    mix-blend-mode: multiply;
}

.admin-shell .admin-topbar__brand .brand-lockup,
.admin-shell .ca-mobile-brand .brand-lockup {
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.admin-shell .admin-topbar__brand .brand-logo-img,
.admin-shell .ca-mobile-brand .brand-logo-img {
    background: transparent !important;
    mix-blend-mode: multiply;
}

.admin-topbar__brand .brand-lockup__name {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.98rem;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary-color, #0b3a82) 14%, #fff);
    color: var(--primary-color, #0b3a82);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-topbar__menu {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-topbar__menu:hover {
    background: #f1f5f9;
    color: var(--primary-color, #0b3a82);
}

.admin-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-icon-btn:hover {
    background: #eef2f7;
    color: var(--primary-color, #0b3a82);
}

.admin-icon-btn__dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    background: transparent;
    padding: 0.2rem 0.35rem;
    border-radius: 999px;
    color: #334155;
}

.admin-user-chip:hover {
    background: #f8fafc;
}

.admin-user-chip__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color, #0b3a82);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-user-chip__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}

.admin-user-chip__meta small {
    color: #94a3b8;
    font-size: 0.72rem;
}

.admin-notify-menu {
    width: 300px;
    padding: 0;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    overflow: hidden;
}

.admin-notify-menu__head {
    padding: 0.75rem 1rem;
    font-weight: 700;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfc;
}

.admin-notify-menu__item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-notify-menu__empty {
    padding: 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

.admin-shell .ca-layout {
    min-height: calc(100vh - var(--admin-topbar-h));
}

.admin-shell .ca-sidebar {
    width: var(--admin-sidebar-w) !important;
    background: #fff !important;
    border-right: 1px solid #e8edf3 !important;
    color: #475569 !important;
}

.admin-shell .ca-sidebar__brand {
    display: none !important;
}

.admin-shell .ca-sidebar__user,
.admin-shell .ca-sidebar__footer {
    display: block !important;
}

.admin-shell .ca-sidebar__user {
    margin: 0.85rem;
    padding: 0.8rem !important;
    border: 1px solid #e8edf3 !important;
    border-radius: 10px;
    background: #f8fafc !important;
    align-items: center;
    gap: 0.7rem;
}

.admin-shell .ca-sidebar__user .avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
    background: var(--primary-color, #0b3a82) !important;
    color: #fff !important;
    font-weight: 700;
}

.admin-shell .ca-sidebar__user-meta,
.admin-shell .ca-sidebar__user-meta .fw-semibold {
    color: #0f172a !important;
}

.admin-shell .ca-sidebar__user-meta small {
    color: #64748b !important;
}

.admin-shell .ca-sidebar__footer {
    border-top: 1px solid #eef2f7 !important;
    padding: 1rem !important;
    margin-top: auto;
}

.admin-shell .ca-sidebar__nav {
    padding-top: 0.35rem;
    flex: 1;
}

@media (min-width: 992px) {
    .admin-shell .ca-sidebar {
        display: flex !important;
        flex-direction: column;
    }

    .admin-shell .ca-sidebar__user {
        display: flex !important;
    }
}

.admin-shell .ca-sidebar__nav a,
.admin-shell .ca-nav-list a {
    color: #64748b !important;
    margin: 0 0.65rem 0.15rem;
    border-radius: 0 8px 8px 0;
    border-left: 3px solid transparent !important;
    padding: 0.72rem 0.95rem !important;
    font-weight: 500;
}

.admin-shell .ca-sidebar__nav a i {
    width: 1.15rem;
    text-align: center;
    color: #94a3b8;
}

.admin-shell .ca-sidebar__nav a:hover,
.admin-shell .ca-nav-list a:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.admin-shell .ca-sidebar__nav a.active,
.admin-shell .ca-nav-list a.active {
    background: #eff6ff !important;
    color: var(--primary-color, #2563eb) !important;
    border-left-color: var(--primary-color, #2563eb) !important;
    font-weight: 600;
}

.admin-shell .ca-sidebar__nav a.active i {
    color: var(--primary-color, #2563eb);
}

.admin-shell .ca-content-wrap {
    background: #f4f6f9 !important;
}

.admin-shell .ca-toolbar {
    background: transparent !important;
    border-bottom: 0 !important;
    padding: 1.15rem 1.5rem 0.35rem !important;
}

.admin-shell .ca-toolbar-title {
    font-weight: 700 !important;
    color: #0f172a;
}

.admin-shell .ca-content {
    padding: 0.85rem 1.5rem 1.75rem !important;
}

.admin-shell .ca-mobile-drawer {
    background: #fff !important;
    color: #334155 !important;
}

.admin-shell .ca-mobile-drawer__head {
    border-bottom: 1px solid #e8edf3;
    color: #0f172a;
}

.admin-sidebar-collapsed .ca-sidebar {
    width: 0 !important;
    overflow: hidden;
    border-right: 0 !important;
}

.admin-shell .card.border-0,
.admin-shell .grow-panel {
    border: 1px solid #e8edf3 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    border-radius: 10px !important;
    background: #fff;
}

.admin-shell .grow-panel__head {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    padding: 0.9rem 1.1rem;
}

.admin-shell .admin-table thead th,
.admin-shell .grow-table thead th {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    padding: 0.85rem 1rem;
}

.admin-shell .admin-table td,
.admin-shell .grow-table td {
    border-color: #f1f5f9;
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.grow-stat {
    position: relative;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 1.15rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    min-height: 96px;
}

.grow-stat::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
}

.grow-stat--blue::before { background: #3b82f6; }
.grow-stat--sky::before { background: #38bdf8; }
.grow-stat--orange::before { background: #f59e0b; }
.grow-stat--rose::before { background: #f43f5e; }
.grow-stat--slate::before { background: #64748b; }
.grow-stat--green::before { background: #22c55e; }
.grow-stat--amber::before { background: #f59e0b; }

.grow-stat__value {
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.grow-stat__label {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.9rem;
}

.grow-stat__icon {
    font-size: 1.75rem;
    color: #94a3b8;
    opacity: 0.85;
}

.chart-card-body {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-card-body canvas {
    max-width: 100%;
}

.assign-box {
    max-height: 240px;
    overflow: auto;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    background: #fafbfc;
}

.assign-box__item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #eef2f7;
    margin: 0;
    cursor: pointer;
}

.assign-box__item:last-child {
    border-bottom: 0;
}

.assign-box__item:hover {
    background: #f1f5f9;
}

.assign-box__item input {
    margin-top: 0.2rem;
}

.people-picker {
    position: relative;
    z-index: 1;
}

.people-picker.is-open {
    z-index: 80;
}

.people-picker__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 48px;
    margin-bottom: 0.65rem;
}

.people-picker__empty {
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.35rem 0.15rem;
}

.people-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem 0.35rem 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    max-width: 100%;
}

.people-chip__avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--primary-color, #0b3a82);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.people-chip__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.people-chip__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.people-chip__meta {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.people-chip__remove {
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.people-chip__remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.people-picker__search {
    position: relative;
}

.people-picker__search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
    pointer-events: none;
    font-size: 0.85rem;
    width: 1rem;
    text-align: center;
}

.ca-content .people-picker__search .form-control,
.people-picker__search .form-control {
    padding-left: 2.65rem !important;
}

.people-picker__suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 90;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
    max-height: 260px;
    overflow: auto;
}

.people-suggest__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.people-suggest__item:last-child {
    border-bottom: 0;
}

.people-suggest__item:hover {
    background: #f8fafc;
}

.people-suggest__add {
    margin-left: auto;
    color: var(--primary-color, #0b3a82);
}

.people-suggest__empty {
    padding: 0.85rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

.progress-input {
    position: relative;
}

.progress-input__suffix {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 700;
}

.grow-activity {
    display: flex;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
}

.grow-activity:last-child {
    border-bottom: none;
}

.grow-activity:hover {
    background: #fafbfc;
}

.grow-activity__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.grow-activity__time {
    color: #94a3b8;
    font-size: 0.75rem;
}

.grow-status {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: none;
}

.grow-status.in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.grow-status.completed {
    background: #dcfce7;
    color: #15803d;
}

.grow-status.on_hold {
    background: #ffedd5;
    color: #c2410c;
}

.grow-status.planning {
    background: #f1f5f9;
    color: #475569;
}

.grow-status.on_schedule {
    background: #dcfce7;
    color: #15803d;
}

.grow-status.at_risk {
    background: #fef3c7;
    color: #b45309;
}

.grow-status.delayed {
    background: #fee2e2;
    color: #b91c1c;
}

.status-picker {
    position: relative;
    z-index: 1;
}

.status-picker.is-open {
    z-index: 60;
}

.status-picker__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d7dee8;
    border-radius: 0.5rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.status-picker__trigger:hover,
.status-picker__trigger[aria-expanded="true"] {
    border-color: #0b3a82;
    box-shadow: 0 0 0 3px rgba(11, 58, 130, 0.12);
}

.status-picker__trigger .fa-chevron-down {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.15s ease;
}

.status-picker__trigger[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.status-picker__menu {
    position: fixed;
    z-index: 1080;
    min-width: 200px;
    padding: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.status-picker__menu[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.status-picker__option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.45rem 0.55rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.status-picker__option:hover,
.status-picker__option.is-active {
    background: #f1f5f9;
}

.status-picker__option .grow-status {
    pointer-events: none;
}

.pro-form .card.grow-panel {
    position: relative;
    z-index: 1;
}

.pro-form .card.grow-panel:focus-within {
    z-index: 4;
}

.pro-form .form-control,
.pro-form textarea.form-control {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.ca-site-overlay:not(.is-visible) {
    pointer-events: none !important;
}

.ca-mobile-drawer:not(.is-open) {
    pointer-events: none !important;
}

.ca-mobile-drawer.is-open {
    pointer-events: auto !important;
}

.admin-shell .project-detail-top {
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    background: #fff;
}

.admin-shell .project-detail-percent {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color, #0b3a82);
    line-height: 1;
}

.admin-shell .empty-state {
    text-align: center;
    padding: 2rem 1.25rem;
    color: #64748b;
}

.admin-shell .stat-card {
    border: 1px solid #e8edf3;
    box-shadow: none;
    border-radius: 10px;
    background: #fff;
}

@media (max-width: 991.98px) {
    .admin-shell .ca-layout {
        min-height: auto;
    }

    .admin-shell .ca-sidebar {
        display: none !important;
    }

    .admin-shell .admin-topbar {
        display: none !important;
    }

    .admin-shell .ca-mobile-top {
        display: flex;
        gap: 0.5rem;
        padding: 0.55rem 0.75rem;
        position: sticky;
        top: 0;
        z-index: 40;
        background: #fff !important;
        border-bottom: 1px solid #e8edf3;
    }

    .admin-shell .ca-mobile-brand {
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .admin-shell .ca-mobile-brand .brand-logo-img {
        max-height: 26px !important;
        max-width: 96px !important;
    }

    .admin-shell .ca-mobile-drawer {
        display: block;
        background: #fff !important;
        color: #0f172a !important;
        width: min(300px, 86vw);
        box-shadow: 8px 0 30px rgba(15, 23, 42, 0.12);
    }

    .admin-shell .ca-mobile-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid #e8edf3;
        color: #0f172a;
        font-weight: 700;
    }

    .admin-shell .ca-mobile-drawer .ca-sidebar__nav a,
    .admin-shell .ca-mobile-drawer .ca-nav-list a {
        color: #475569 !important;
        border-left: 3px solid transparent !important;
    }

    .admin-shell .ca-mobile-drawer .ca-sidebar__nav a.active,
    .admin-shell .ca-mobile-drawer .ca-nav-list a.active {
        background: #eff6ff !important;
        color: var(--primary-color, #2563eb) !important;
        border-left-color: var(--primary-color, #2563eb) !important;
    }

    .admin-shell .ca-toolbar {
        padding: 0.9rem 1rem 0.25rem !important;
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .admin-shell .ca-toolbar-actions {
        width: 100%;
    }

    .admin-shell .ca-toolbar-actions .btn {
        width: 100%;
    }

    .admin-shell .ca-content {
        padding: 0.65rem 1rem 1.25rem !important;
    }

    .admin-shell .grow-stat {
        min-height: 78px;
        padding: 0.9rem 1rem;
    }

    .admin-shell .grow-stat__value {
        font-size: 1.3rem;
    }

    .admin-shell .grow-stat__label {
        font-size: 0.82rem;
    }

    .admin-shell .admin-table {
        min-width: 640px;
    }

    .admin-shell .table-responsive {
        margin: 0 -0.25rem;
        border-radius: 0;
    }

    .admin-shell .grow-activity {
        padding: 0.8rem 0.9rem;
    }

    .admin-drawer-user {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        margin: 0.85rem;
        padding: 0.8rem;
        border: 1px solid #e8edf3;
        border-radius: 10px;
        background: #f8fafc;
    }

    .admin-drawer-user__avatar {
        width: 38px;
        height: 38px;
        border-radius: 999px;
        background: var(--primary-color, #0b3a82);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        flex-shrink: 0;
    }

    .admin-drawer-footer {
        padding: 1rem;
        border-top: 1px solid #eef2f7;
        margin-top: 0.5rem;
    }
}

@media (min-width: 992px) {
    .admin-drawer-user,
    .admin-drawer-footer {
        display: none !important;
    }
}


/* Login — clean white */
.portal-login-body {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
}

.portal-login {
    width: 100%;
    max-width: 440px;
}

.portal-login__top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.portal-login__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.portal-login__logo {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 14px;
    background: #eff6ff;
    color: #0b3a82;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.portal-login__hint {
    border-top: 1px solid #eef2f7;
    padding-top: 1rem;
}

.portal-login .form-control {
    border-color: #e5e7eb;
    background: #fff;
}

.portal-login .form-control:focus {
    border-color: #0b3a82;
    box-shadow: 0 0 0 0.2rem rgba(11, 58, 130, 0.12);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3rem;
}

.password-field__toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #64748b;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
}

.password-field__toggle:hover,
.password-field__toggle:focus-visible {
    color: var(--primary-color, #0b3a82);
    background: rgba(15, 23, 42, 0.05);
    outline: none;
}


/* Welcome / page hero */
.page-hero {
    background: linear-gradient(135deg, #0b3a82 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.page-hero__eyebrow {
    opacity: 0.8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.page-hero h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.page-hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Cards */
.stat-card,
.ui-card,
.project-card,
.progress-block,
.notify-card {
    background: var(--ca-surface);
    border: 1px solid var(--ca-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.stat-card {
    padding: 1.05rem 1.15rem;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--ca-muted);
    margin-bottom: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 750;
    line-height: 1.1;
    color: var(--ca-text);
}

.stat-card--icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eff6ff;
    color: #0b3a82;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.progress-inline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 120px;
    max-width: 220px;
}

.progress-inline--compact {
    max-width: 180px;
}

.progress-inline .progress {
    height: 8px;
    background: #e8eef7;
    border-radius: 999px;
    overflow: hidden;
}

.progress-inline--compact .progress {
    height: 6px;
}

.progress-inline__value {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0b3a82;
    min-width: 2.4rem;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.user-cell__avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #0b3a82;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.badge-role {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-role--admin {
    background: #0f172a;
    color: #fff;
}

.badge-role--team {
    background: #0b3a82;
    color: #fff;
}

.badge-role--client {
    background: #e2e8f0;
    color: #334155;
}

.update-row--link {
    display: block;
    transition: background 0.15s ease;
}

.update-row--link:hover {
    background: #f8fafc;
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: 10px;
}

.project-card {
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #c7d7f5;
}

.project-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.project-card__percent {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ca-accent);
    line-height: 1;
}

.project-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.project-card__meta {
    color: var(--ca-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-card__footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--ca-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.progress {
    height: 10px !important;
    background: #e2e8f0 !important;
    border-radius: 999px !important;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #0b3a82, #3b82f6);
}

.progress-bar--planning {
    background: linear-gradient(90deg, #64748b, #94a3b8) !important;
    border-color: transparent !important;
}

.progress-bar--in_progress {
    background: linear-gradient(90deg, #1d4ed8, #3b82f6) !important;
    border-color: transparent !important;
}

.progress-bar--on_hold {
    background: linear-gradient(90deg, #c2410c, #f59e0b) !important;
    border-color: transparent !important;
}

.progress-bar--completed {
    background: linear-gradient(90deg, #15803d, #22c55e) !important;
    border-color: transparent !important;
}

.progress-inline__value--planning { color: #475569; }
.progress-inline__value--in_progress { color: #1d4ed8; }
.progress-inline__value--on_hold { color: #c2410c; }
.progress-inline__value--completed { color: #15803d; }

.projects-table__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.projects-table-wrap {
    overflow-x: auto;
}

.projects-table {
    min-width: 960px;
    table-layout: auto;
}

.projects-table td,
.projects-table th {
    overflow: visible;
    vertical-align: middle;
}

.projects-table td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.projects-table__col-project {
    min-width: 200px;
}

.projects-table__col-status {
    min-width: 132px;
    width: 1%;
    white-space: nowrap;
}

.projects-table__col-progress {
    min-width: 150px;
    width: 160px;
}

.projects-table__col-date {
    min-width: 130px;
    white-space: nowrap;
}

.projects-table__col-clients {
    min-width: 120px;
}

.projects-table__col-actions {
    min-width: 170px;
    width: 1%;
    white-space: nowrap;
}

.projects-table__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.projects-table .progress-inline {
    max-width: 100%;
}

.badge.text-bg-primary {
    background: #0b3a82 !important;
}

.badge.text-bg-success {
    background: #15803d !important;
}

.badge.text-bg-warning {
    background: #d97706 !important;
    color: #fff !important;
}

.btn-primary {
    background: #0b3a82 !important;
    border-color: #0b3a82 !important;
    font-weight: 600;
    border-radius: 10px !important;
    padding: 0.55rem 1rem;
}

.btn-primary:hover {
    background: #082e68 !important;
    border-color: #082e68 !important;
}

.btn-outline-secondary,
.btn-outline-primary {
    border-radius: 10px !important;
    font-weight: 600;
}

.notify-card {
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.notify-card .card-header {
    background: #fff;
    border-bottom: 1px solid var(--ca-border);
    padding: 0.9rem 1.1rem;
}

.notify-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--ca-border);
    transition: background 0.15s ease;
}

.notify-item:last-child {
    border-bottom: none;
}

.notify-item:hover {
    background: #f8fafc;
}

.notify-item__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(11, 58, 130, 0.1);
    color: #0b3a82;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-block {
    padding: 1.15rem;
    height: 100%;
}

.progress-block--compact {
    padding: 0.85rem;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
}

.progress-block h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.progress-report {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--ca-border) !important;
}

.progress-report__date {
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.72rem !important;
}

.progress-report__gallery {
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
}

.progress-report__no-media {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1rem;
    border: 1px dashed #dbe3ef;
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.88rem;
    background: #f8fafc;
}

.approval-box,
.comments-box {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #f8fafc;
}

.comment-item {
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef2f7;
}

.comment-item:last-of-type {
    border-bottom: none;
}

/* Consistent form controls + professional buttons */
.ca-content .form-control,
.ca-content .form-select,
.ca-content .btn:not(.btn-sm):not(.btn-link) {
    min-height: 44px;
}

.ca-content .form-control,
.ca-content .form-select {
    padding: 0.55rem 0.85rem;
    font-size: 0.95rem;
    border-radius: 10px;
    border-color: #dbe3ef;
}

.ca-content .form-control:focus,
.ca-content .form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(11, 58, 130, 0.12);
}

.ca-content .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: #334155;
}

.pro-page {
    max-width: none;
    width: 100%;
}

.pro-page__intro {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
}

.user-cell__avatar--lg {
    width: 44px !important;
    height: 44px !important;
    font-size: 1rem !important;
}

.pro-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
    position: sticky;
    bottom: 0.75rem;
    z-index: 5;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e8edf3;
    border-radius: 10px;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.05);
}

.admin-shell .grow-panel__head strong {
    display: block;
}

.admin-shell .ca-content .card.grow-panel .card-body {
    padding: 1.15rem 1.2rem;
}

.admin-shell .ca-toolbar {
    margin-bottom: 0.25rem;
}

@media (max-width: 767.98px) {
    .pro-form__actions {
        position: static;
        justify-content: stretch;
    }

    .pro-form__actions .btn {
        flex: 1 1 auto;
    }
}

.ca-content .btn:not(.btn-sm):not(.btn-link) {
    padding: 0.55rem 1rem;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.ca-content .btn-primary {
    background: #0b3a82;
    border-color: #0b3a82;
}

.ca-content .btn-primary:hover {
    background: #082e68;
    border-color: #082e68;
}

.update-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.update-actions form {
    display: inline;
    margin: 0;
}

.update-actions .btn {
    min-height: 38px;
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
}

.portal-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.55rem;
}

.portal-inline-form > .form-control,
.portal-inline-form > .form-select {
    flex: 1 1 160px;
    min-width: 140px;
}

.portal-inline-form > .btn {
    flex: 0 0 auto;
    min-width: 100px;
}

.portal-inline-form__grow {
    flex: 2 1 220px !important;
}

.portal-inline-form--wrap > .form-control[type="file"] {
    flex: 1 1 180px;
}

.portal-input-group {
    align-items: stretch;
}

.portal-input-group .form-control {
    min-height: 44px;
    border-radius: 10px 0 0 10px;
}

.portal-input-group .btn {
    min-height: 44px;
    border-radius: 0 10px 10px 0;
    padding-left: 1.15rem;
    padding-right: 1.15rem;
}

.brand-lockup__name {
    font-weight: 700;
    color: inherit;
}

body:not(.sidebar-theme-light) .ca-sidebar .brand-lockup__name {
    color: #fff;
}

.portal-footer a {
    color: var(--primary-color);
    text-decoration: none;
}



.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.ui-card .card-header,
.card.border-0 .card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--ca-border) !important;
    font-weight: 700;
}

.card.border-0 {
    border: 1px solid var(--ca-border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card.border-0.grow-panel,
.pro-form .card.border-0,
.pro-form .card.grow-panel,
.pro-form .card.grow-panel .card-body {
    overflow: visible !important;
}

.quick-actions .btn {
    min-height: 44px;
}

/* Media gallery */
.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.media-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.media-filter {
    border: 1px solid var(--ca-border);
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.media-filter.is-active {
    background: #0b3a82;
    border-color: #0b3a82;
    color: #fff;
}

.media-filter__count {
    opacity: 0.75;
    font-size: 0.75rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .media-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.media-tile {
    position: relative;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
}

.media-tile__open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.media-tile img,
.media-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.media-tile__open:hover img,
.media-tile__open:hover video {
    transform: scale(1.04);
}

.media-tile .media-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    font-size: 0.68rem;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.media-tile .media-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
}

.media-tile__play,
.media-tile__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
    color: #fff;
    font-size: 1.35rem;
    opacity: 0.95;
    pointer-events: none;
}

.media-tile__play i,
.media-tile__zoom i {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(11, 58, 130, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.media-tile__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.55rem 0.7rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.85));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 2;
}

.media-tile--pdf {
    background: #fff5f5;
}

.media-pdf-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #b91c1c;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.media-pdf-preview i {
    font-size: 2.1rem;
}

.media-pdf-link {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #b91c1c;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.media-pdf-link i {
    font-size: 2rem;
}

/* Upload picker */
.media-picker {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    padding: 1rem;
}

.media-picker__drop {
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.media-picker__drop.is-dragover {
    background: #e8f0ff;
}

.media-picker__drop-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.65rem;
    border-radius: 12px;
    background: #e8f0ff;
    color: #0b3a82;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.media-picker__browse {
    color: #0b3a82;
    font-weight: 700;
}

.media-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.media-preview-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ca-border);
    background: #0f172a;
    aspect-ratio: 1;
}

.media-preview-card img,
.media-preview-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-preview-card--pdf {
    background: #fff5f5;
    color: #b91c1c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

.media-preview-card__icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.25);
    font-size: 1.1rem;
}

.media-preview-card__meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.35rem;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-picker__count {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0b3a82;
}

/* Lightbox viewer */
body.gallery-open {
    overflow: hidden;
}

.gallery-lightbox[hidden] {
    display: none !important;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
}

.gallery-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100% - 1.5rem));
    height: min(90vh, 860px);
    margin: 5vh auto 0;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.gallery-lightbox__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.gallery-lightbox__type {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #93c5fd;
}

.gallery-lightbox__caption {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-lightbox__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.gallery-lightbox__counter {
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-right: 0.25rem;
}

.gallery-lightbox__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem;
    background: #000;
}

.gallery-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-lightbox__video {
    width: min(100%, 960px);
    max-height: 100%;
    background: #000;
}

.gallery-lightbox__pdf {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    border-radius: 8px;
}

.gallery-lightbox__pdf-fallback {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
    max-width: 260px;
}

.gallery-lightbox__pdf-fallback i {
    color: #f87171;
    font-size: 1.25rem;
}

.gallery-lightbox__pdf-fallback p {
    margin: 0;
    font-size: 0.82rem;
    color: #e2e8f0;
}

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}

.gallery-lightbox__nav--prev {
    left: 0.75rem;
}

.gallery-lightbox__nav--next {
    right: 0.75rem;
}

@media (max-width: 767.98px) {
    .gallery-lightbox__dialog {
        width: calc(100% - 0.75rem);
        height: 88vh;
        margin-top: 6vh;
    }

    .gallery-lightbox__nav {
        width: 38px;
        height: 38px;
    }
}

.lang-switcher {
    display: inline-flex;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.lang-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #64748b;
    line-height: 1.2;
}

.lang-btn.active {
    background: #0b3a82;
    color: #fff;
}

.ca-sidebar .lang-switcher {
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
    margin: 0.75rem 1rem;
}

.ca-sidebar .lang-btn {
    color: #cbd5e1;
}

.ca-sidebar .lang-btn.active {
    background: #0b3a82;
    color: #fff;
}

.portal-login-body > .lang-switcher {
    display: none;
}

body.locale-ne,
body.locale-ne .ca-theme {
    font-family: "Noto Sans Devanagari", "Inter", system-ui, sans-serif;
}

@media (max-width: 991.98px) {
    .ca-content {
        padding: 1rem !important;
    }

    .ca-toolbar {
        padding: 0.85rem 1rem !important;
    }

    .page-hero {
        padding: 1.1rem;
    }

    .page-hero h1 {
        font-size: 1.15rem;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .project-card {
        padding: 1.1rem;
    }
}

@media (min-width: 992px) {
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

/* Nepali smart date picker */
.portal-date-field {
    position: relative;
    z-index: 1;
}

.portal-date-field.is-open {
    z-index: 50;
}

.portal-date-field__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-height: 44px;
    background: #fff;
    cursor: pointer;
}

.portal-date-field__label {
    font-weight: 600;
    color: #0f172a;
}

.portal-date-field__hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.portal-date-picker {
    position: fixed;
    z-index: 1080;
    min-width: 292px;
    max-width: min(360px, calc(100vw - 16px));
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.card.grow-panel,
.card.grow-panel .card-body {
    overflow: visible;
}

.portal-date-picker__nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.portal-date-picker__selects {
    display: flex;
    gap: 0.35rem;
    flex: 1;
}

.portal-date-picker__nav-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background: #fff;
    color: #334155;
}

.portal-date-picker__weekdays,
.portal-date-picker__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
}

.portal-date-picker__weekdays {
    margin-bottom: 0.35rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
}

.portal-date-picker__day,
.portal-date-picker__empty {
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
}

.portal-date-picker__day {
    cursor: pointer;
    color: #0f172a;
}

.portal-date-picker__day:hover {
    background: #eff6ff;
}

.portal-date-picker__day.is-active {
    background: #0b3a82;
    color: #fff;
}

.portal-date-picker__footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #eef2f7;
}


/* Smart milestones — progress tracker */
.ms-summary,
.cr-summary {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}

.ms-ring {
    --ms-pct: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(#fff 58%, transparent 59%),
        conic-gradient(#0b3a82 calc(var(--ms-pct) * 1%), #e2e8f0 0);
    flex-shrink: 0;
}

.ms-ring__value {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0b3a82;
}

.ms-head-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: #64748b;
}

.ms-head-stats__current strong {
    color: #0f172a;
}

.ms-track {
    height: 6px;
    background: #e8eef7;
    border-radius: 999px;
    overflow: hidden;
}

.ms-track__bar {
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8, #22c55e);
    border-radius: 999px;
}

.ms-composer,
.cr-composer,
.cr-review {
    border: 1px dashed #d7dee8;
    border-radius: 12px;
    background: #fbfdff;
}

.ms-composer__summary,
.cr-composer__summary,
.cr-review > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    font-weight: 600;
    color: #0b3a82;
}

.ms-composer__summary::-webkit-details-marker,
.cr-composer__summary::-webkit-details-marker,
.cr-review > summary::-webkit-details-marker {
    display: none;
}

.ms-composer__form,
.cr-composer__form,
.cr-review__form {
    padding: 0 0.9rem 0.9rem;
    border-top: 1px solid #eef2f7;
    padding-top: 0.85rem;
}

.ms-tracker {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.ms-step {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.75rem;
    position: relative;
}

.ms-step:not(:last-child) {
    padding-bottom: 1rem;
}

.ms-step:not(:last-child) .ms-step__rail::after {
    content: "";
    position: absolute;
    top: 40px;
    bottom: 0;
    left: 19px;
    width: 2px;
    background: #e2e8f0;
}

.ms-step.is-complete:not(:last-child) .ms-step__rail::after {
    background: linear-gradient(#22c55e, #86efac);
}

.ms-step.is-current:not(:last-child) .ms-step__rail::after {
    background: linear-gradient(#0b3a82, #e2e8f0);
}

.ms-step__rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.ms-step__node {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    background: #fff;
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px #fff;
}

button.ms-step__node {
    cursor: pointer;
}

.ms-step.is-complete .ms-step__node {
    background: #22c55e;
    border-color: #16a34a;
    color: #fff;
}

.ms-step.is-current .ms-step__node {
    background: #0b3a82;
    border-color: #0b3a82;
    color: #fff;
    box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(11, 58, 130, 0.18);
}

.ms-step--awaiting .ms-step__node {
    background: #f59e0b;
    border-color: #d97706;
    color: #fff;
}

.ms-step__card {
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    background: #fff;
}

.ms-step.is-current .ms-step__card {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 8px 20px rgba(11, 58, 130, 0.06);
}

.ms-step--awaiting .ms-step__card {
    border-color: #fde68a;
    background: #fffbeb;
}

.ms-step--approved .ms-step__card {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.ms-step__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.ms-step__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.ms-step__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.ms-step__title.is-done {
    color: #64748b;
}

.ms-step__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    color: #64748b;
    font-size: 0.78rem;
    margin-bottom: 0.65rem;
}

.ms-step__meta i {
    margin-right: 0.3rem;
}

.ms-step__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.ms-badge--pending {
    background: #e2e8f0;
    color: #475569;
}

.ms-badge--awaiting {
    background: #fef3c7;
    color: #b45309;
}

.ms-badge--approved {
    background: #dcfce7;
    color: #15803d;
}

.ms-empty,
.cr-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1.25rem 0.5rem;
}

.ms-empty i,
.cr-empty i {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    display: block;
}

.ms-empty p,
.cr-empty p {
    margin: 0;
    font-size: 0.85rem;
}

.cr-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* Smart change requests */
.cr-card {
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
}

.cr-card--open {
    border-left: 4px solid #f59e0b;
}

.cr-card--in_review {
    border-left: 4px solid #3b82f6;
}

.cr-card--accepted {
    border-left: 4px solid #22c55e;
}

.cr-card--rejected {
    border-left: 4px solid #ef4444;
}

.cr-card--closed {
    border-left: 4px solid #94a3b8;
}

.cr-card__head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.55rem;
}

.cr-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: #0f172a;
}

.cr-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.cr-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.cr-card__body {
    margin: 0 0 0.75rem;
    color: #334155;
    font-size: 0.92rem;
}

.cr-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.cr-metric {
    min-width: 110px;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.cr-metric__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cr-metric__value {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
}

.cr-metric--link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: #0b3a82;
    font-weight: 600;
    font-size: 0.85rem;
}

.cr-response {
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.75rem;
}

.cr-response--empty {
    background: #f8fafc;
    border-color: #e8edf3;
    color: #94a3b8;
    font-size: 0.85rem;
}

.cr-response__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.cr-response__text {
    color: #0f172a;
    font-size: 0.9rem;
}

.cr-response__by {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

.cr-review {
    margin-top: 0.25rem;
}

.cr-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.cr-pill--low { background: #f1f5f9; color: #64748b; }
.cr-pill--normal { background: #dbeafe; color: #1d4ed8; }
.cr-pill--high { background: #ffedd5; color: #c2410c; }
.cr-pill--urgent { background: #fee2e2; color: #b91c1c; }
.cr-pill--open { background: #fef3c7; color: #b45309; }
.cr-pill--review { background: #dbeafe; color: #1d4ed8; }
.cr-pill--accepted { background: #dcfce7; color: #15803d; }
.cr-pill--rejected { background: #fee2e2; color: #b91c1c; }
.cr-pill--closed { background: #e2e8f0; color: #475569; }

/* Smart documents */
.doc-head-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: #64748b;
}

.doc-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

.doc-filter {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.doc-filter span {
    background: #f1f5f9;
    color: #64748b;
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
    font-size: 0.7rem;
}

.doc-filter.is-active {
    background: #0b3a82;
    border-color: #0b3a82;
    color: #fff;
}

.doc-filter.is-active span {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.doc-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    background: #fff;
}

.doc-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}

.doc-card__icon--blueprint { background: #dbeafe; color: #1d4ed8; }
.doc-card__icon--permit { background: #e0f2fe; color: #0369a1; }
.doc-card__icon--contract { background: #e2e8f0; color: #334155; }
.doc-card__icon--invoice { background: #ffedd5; color: #c2410c; }
.doc-card__icon--receipt { background: #dcfce7; color: #15803d; }
.doc-card__icon--other { background: #f1f5f9; color: #64748b; }

.doc-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.doc-card__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.doc-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.35rem;
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.doc-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.doc-card__note {
    margin: 0 0 0.65rem;
    color: #64748b;
    font-size: 0.85rem;
}

.doc-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.doc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.doc-badge--blueprint { background: #dbeafe; color: #1d4ed8; }
.doc-badge--permit { background: #e0f2fe; color: #0369a1; }
.doc-badge--contract { background: #e2e8f0; color: #334155; }
.doc-badge--invoice { background: #ffedd5; color: #c2410c; }
.doc-badge--receipt { background: #dcfce7; color: #15803d; }
.doc-badge--other { background: #f1f5f9; color: #64748b; }
.doc-badge--shared { background: #dcfce7; color: #15803d; }
.doc-badge--internal { background: #f1f5f9; color: #64748b; }

@media (max-width: 576px) {
    .doc-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .doc-card__head {
        flex-direction: column;
    }

    .doc-card__pills {
        justify-content: flex-start;
    }
}
