/* Customer portal — inherits admin theme from planahome-theme.css + app.css */

.customer-portal-app {
    font-family: var(--bb-font);
    color: var(--bb-dark);
}

.customer-portal-app .main-content {
    background: var(--bb-body-bg);
}

/* Nav */
.customer-portal-nav-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.customer-portal-nav-top .nav-links-group {
    flex-wrap: nowrap;
    overflow: visible;
}

.customer-portal-nav-top .customer-portal-nav-dropdown {
    position: relative;
}

.customer-portal-nav-top .nav-settings-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.customer-portal-nav-top .dropdown-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.customer-portal-nav-switch {
    margin-left: 0.15rem;
}

@media (min-width: 769px) {
    .customer-portal-nav-top .nav-text {
        max-width: 7.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 768px) {
    .customer-portal-nav-badge {
        display: none;
    }
}

/* Page shell — same typography as admin .page-wrapper */
.customer-portal-page.rk-admin-page {
    max-width: 100%;
    font-family: var(--bb-font);
}

.customer-portal-page.rk-admin-page .page-header {
    margin-bottom: 1.5rem;
}

.customer-portal-page.rk-admin-page .page-title {
    font-family: var(--bb-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bb-dark);
    letter-spacing: -0.02em;
}

.customer-portal-page.rk-admin-page .page-subtitle {
    font-family: var(--bb-font);
    font-size: 0.9rem;
    color: var(--bb-secondary);
}

.customer-portal-page.rk-admin-page .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bb-dark);
}

.customer-portal-page.rk-admin-page .form-control,
.customer-portal-page.rk-admin-page .form-select {
    font-family: var(--bb-font);
    font-size: 0.875rem;
}

/* Stat cards — aligned with admin .erp-stat-card / dashboard cards */
.customer-portal-stat-row {
    margin-bottom: 1.25rem;
}

.customer-portal-card,
.customer-portal-page .erp-stat-card {
    background: var(--bb-card-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    padding: 0.85rem 1rem;
    box-shadow: var(--bb-shadow-sm);
    height: 100%;
}

.customer-portal-card:hover,
.customer-portal-page .erp-stat-card:hover {
    box-shadow: var(--bb-shadow);
}

.customer-portal-card > span,
.customer-portal-card__label,
.customer-portal-page .erp-stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bb-secondary);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.customer-portal-card > strong,
.customer-portal-card__value,
.customer-portal-page .erp-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bb-dark);
    line-height: 1.25;
}

.customer-portal-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.customer-portal-panel {
    background: var(--bb-card-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    box-shadow: var(--bb-shadow-sm);
    padding: 1rem 1.25rem;
}

.customer-portal-progress {
    height: 0.65rem;
    margin-top: 0.5rem;
    background: #e2e8f0;
    border-radius: 999px;
}

.customer-portal-progress .progress-bar {
    background-color: var(--pah-primary-bright);
    border-radius: 999px;
}

/* Tables — aligned with admin rk-admin-data-table */
.customer-portal-page .card.shadow-sm {
    box-shadow: var(--bb-shadow) !important;
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    overflow: hidden;
}

.customer-portal-page .rk-admin-data-table thead,
.customer-portal-page .rk-admin-data-table thead.table-light {
    background: #f1f5f9 !important;
}

.customer-portal-page .rk-admin-data-table thead th {
    font-family: var(--bb-font) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: var(--bb-dark) !important;
    padding: 0.75rem 1rem !important;
    border-color: var(--bb-border) !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-portal-page .rk-admin-data-table tbody td {
    font-size: 0.875rem;
    color: var(--bb-dark);
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.customer-portal-page .rk-admin-data-table tbody tr:hover {
    background-color: rgba(0, 169, 157, 0.045);
}

/* Gallery week accordion */
.customer-portal-week {
    background: var(--bb-card-bg);
    border: 1px solid var(--bb-border);
    border-radius: var(--bb-radius-lg);
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--bb-shadow-sm);
}

.customer-portal-week__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: var(--bb-card-bg);
    border: 0;
    text-align: left;
    font-family: var(--bb-font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bb-dark);
}

.customer-portal-week__header:hover {
    background: #f8fafc;
}

.customer-portal-week__body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--bb-border);
}

.customer-portal-week__body h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bb-dark);
}

/* Gallery filters — uses uniform-filter-card from app.css */
.customer-portal-gallery-filters.uniform-filter-card {
    padding: 1rem 1.25rem;
}

.customer-portal-gallery-filters__month {
    min-width: 8.75rem;
}

.customer-portal-gallery-filters__year {
    min-width: 6.25rem;
}

.customer-portal-gallery-filters__date {
    min-width: 9.375rem;
}

.customer-portal-gallery-filters__stage {
    min-width: 12.5rem;
    max-width: 18rem;
}

@media (max-width: 767.98px) {
    .customer-portal-gallery-filters .row > .col-auto {
        width: 100%;
    }

    .customer-portal-gallery-filters__month,
    .customer-portal-gallery-filters__year,
    .customer-portal-gallery-filters__date,
    .customer-portal-gallery-filters__stage {
        width: 100%;
        max-width: none;
    }

    .customer-portal-gallery-filters .btn-group {
        width: 100%;
    }

    .customer-portal-gallery-filters .btn-group .btn {
        flex: 1 1 0;
    }
}

/* Photo grid */
.customer-portal-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.65rem;
}

.customer-portal-photo {
    border-radius: var(--bb-radius);
    overflow: hidden;
    border: 1px solid var(--bb-border);
    background: var(--bb-card-bg);
}

.customer-portal-photo--clickable {
    display: block;
    width: 100%;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-portal-photo--clickable:hover {
    border-color: var(--pah-primary);
    box-shadow: 0 0 0 2px rgba(0, 169, 157, 0.15);
}

.customer-portal-photo--clickable:focus-visible {
    outline: 2px solid var(--pah-primary);
    outline-offset: 2px;
}

.customer-portal-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.customer-portal-photo__meta {
    padding: 0.45rem 0.5rem;
    font-size: 0.75rem;
    color: var(--bb-secondary);
    line-height: 1.35;
}

/* Photo modal */
.customer-portal-photo-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
}

.customer-portal-photo-modal {
    width: min(56rem, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--bb-radius-lg);
    background: var(--bb-card-bg);
    box-shadow: var(--bb-shadow-lg);
    outline: none;
}

.customer-portal-photo-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bb-border);
}

.customer-portal-photo-modal__header h5 {
    font-family: var(--bb-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--bb-dark);
}

.customer-portal-photo-modal__title {
    min-width: 0;
}

.customer-portal-photo-modal__body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
    padding: 0.5rem;
    background: #0f172a;
}

.customer-portal-photo-modal__image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 9rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.customer-portal-photo-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
    transition: background 0.15s ease;
}

.customer-portal-photo-modal__nav:hover {
    background: rgba(255, 255, 255, 0.28);
}

.customer-portal-photo-modal__nav--prev {
    left: 0.75rem;
}

.customer-portal-photo-modal__nav--next {
    right: 0.75rem;
}

.customer-portal-photo-modal__footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--bb-border);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--bb-secondary);
    text-align: center;
}

.customer-portal-photo-modal__remarks {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
}

/* Status colours */
.customer-portal-status--completed {
    color: var(--bb-success);
    font-weight: 600;
}

.customer-portal-status--progress {
    color: var(--bb-warning);
    font-weight: 600;
}

.customer-portal-status--pending {
    color: var(--bb-secondary);
}

@media (max-width: 640px) {
    .customer-portal-photo-modal-backdrop {
        padding: 0.5rem;
    }

    .customer-portal-photo-modal__nav {
        width: 2.25rem;
        height: 2.25rem;
    }

    .customer-portal-photo-modal__nav--prev {
        left: 0.35rem;
    }

    .customer-portal-photo-modal__nav--next {
        right: 0.35rem;
    }

    .customer-portal-page.rk-admin-page .page-title {
        font-size: 1.35rem;
    }
}
