
/* =====================================
   SAPIANT GLOBAL — CUSTOMER DASHBOARD
===================================== */

.dashboard-page {
    margin: 0;
    background: #f7f9f7;
    font-family: 'DM Sans', sans-serif;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

/* SIDEBAR */

.dashboard-sidebar {
    background: #102a43;
    color: #ffffff;
    padding: 35px 22px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-logo {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.7px;
    padding: 0 12px;
    white-space: nowrap;
}

.dashboard-logo span {
    color: #7fd19a;
}

.dashboard-menu-label {
    margin: 60px 12px 18px;
    color: #8fa99d;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.dashboard-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 15px;
    border-radius: 9px;
    color: #b9c9c1;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.dashboard-nav-link span {
    font-size: 1.2rem;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active {
    background: #174a35;
    color: #ffffff;
}

.dashboard-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: auto;
    padding: 28px 12px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.dashboard-website-link {
    color: #b9c9c1;
    font-size: 0.84rem;
    font-weight: 600;
}

.dashboard-logout {
    padding: 0;
    border: 0;
    background: none;
    color: #ffffff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

/* MAIN AREA */

.dashboard-main {
    min-width: 0;
    padding: 45px clamp(24px, 4vw, 75px) 25px;
}

.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.dashboard-eyebrow {
    color: #174a35;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    margin-bottom: 12px;
}

.dashboard-topbar h1 {
    color: #102a43;
    font-size: clamp(2rem, 3vw, 2.8rem);
    letter-spacing: -1.5px;
}

.dashboard-topbar h1 span {
    color: #4faf70;
}

.dashboard-avatar,
.dashboard-account-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #174a35;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
}

/* WELCOME BANNER */

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 40px;
    border-radius: 16px;
    background: #174a35;
    color: #ffffff;
}

.dashboard-welcome .dashboard-eyebrow {
    color: #7fd19a;
}

.dashboard-welcome h2 {
    max-width: 550px;
    font-size: clamp(1.6rem, 2.5vw, 2.3rem);
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.dashboard-welcome p:not(.dashboard-eyebrow) {
    color: #c8d8cf;
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 500px;
}

.dashboard-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
    background: #ffffff;
    color: #174a35;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s;
}

.dashboard-primary-button:hover {
    background: #eef4ef;
    transform: translateY(-2px);
}

/* STATS */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0 50px;
}

.dashboard-stat-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8e3;
    border-radius: 13px;
}

.dashboard-stat-card > p {
    color: #65736b;
    font-size: 0.82rem;
    font-weight: 600;
}

.dashboard-stat-card strong {
    display: block;
    margin: 18px 0;
    color: #102a43;
    font-size: 2.3rem;
    line-height: 1;
}

.dashboard-stat-card span {
    color: #8a9990;
    font-size: 0.75rem;
}

/* SECTIONS */

.dashboard-section {
    margin-bottom: 45px;
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-section-heading h2 {
    color: #102a43;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
}

.dashboard-text-link {
    color: #174a35;
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-empty-state {
    padding: 55px 25px;
    background: #ffffff;
    border: 1px dashed #cbdccf;
    border-radius: 14px;
    text-align: center;
}

.dashboard-empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 22px;
    border-radius: 14px;
    background: #eef4ef;
    color: #174a35;
    font-size: 1.7rem;
}

.dashboard-empty-state h3 {
    color: #102a43;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.dashboard-empty-state p {
    max-width: 450px;
    margin: 0 auto 25px;
    color: #65736b;
    font-size: 0.85rem;
    line-height: 1.7;
}

.dashboard-empty-state .dashboard-primary-button {
    background: #174a35;
    color: #ffffff;
}

.dashboard-empty-state .dashboard-primary-button:hover {
    background: #102a43;
}

/* ACCOUNT CARD */

.dashboard-account-card {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e8e3;
    border-radius: 14px;
}

.dashboard-account-avatar {
    width: 58px;
    height: 58px;
}

.dashboard-account-card h3 {
    color: #102a43;
    font-size: 1rem;
    margin-bottom: 8px;
}

.dashboard-account-card p {
    color: #65736b;
    font-size: 0.84rem;
    line-height: 1.7;
}

/* FOOTER */

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 25px;
    border-top: 1px solid #e2e8e3;
}

.dashboard-footer p,
.dashboard-footer a {
    color: #87948c;
    font-size: 0.75rem;
}

.dashboard-footer div {
    display: flex;
    gap: 20px;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .dashboard-layout {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-sidebar {
        min-height: auto;
        padding: 22px;
    }

    .dashboard-menu-label {
        margin: 25px 12px 12px;
    }

    .dashboard-navigation {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-sidebar-bottom {
        flex-direction: row;
        justify-content: space-between;
        margin-top: 20px;
        padding-top: 18px;
    }

    .dashboard-main {
        padding: 30px 20px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome {
        padding: 28px;
    }

    .dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Hide dashboard until authentication check finishes */
.dashboard-layout[hidden] {
    display: none !important;
}


/* Keep the admin dashboard hidden until access is verified */
.dashboard-layout[hidden] {
    display: none !important;
}


/* ==========================================
   ADMIN DASHBOARD — BUTTON FIX
========================================== */

.dashboard-welcome .dashboard-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 170px;
    min-height: 52px;

    padding: 14px 24px;
    flex-shrink: 0;

    background: #ffffff;
    color: #123d30;

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 9px;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    transition: background 0.2s ease,
                transform 0.2s ease;
}

.dashboard-welcome .dashboard-primary-button:hover {
    background: #e5f5ec;
    color: #123d30;
    transform: translateY(-2px);
}

.dashboard-welcome .dashboard-primary-button:focus-visible {
    outline: 3px solid #71ddb0;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .dashboard-welcome .dashboard-primary-button {
        width: 100%;
        min-width: 0;
    }
}


/* ==========================================
   SAPIANT GLOBAL — ADMIN LOADING
========================================== */

.admin-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;

    background: #07130f;
    color: #e8fff1;

    font-family: inherit;
}

.admin-loading-spinner {
    width: 38px;
    height: 38px;

    border: 3px solid rgba(111, 211, 158, 0.18);
    border-top-color: #65d9a0;
    border-radius: 50%;

    animation: adminSpin 0.7s linear infinite;
}

.admin-loading-screen p {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.07em;
    color: #a8c8b7;
}

@keyframes adminSpin {
    to {
        transform: rotate(360deg);
    }
}

.dashboard-layout.admin-ready {
    animation: adminFadeIn 0.25s ease-out both;
}

@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-loading-spinner,
    .dashboard-layout.admin-ready {
        animation: none;
    }
}


/* PICKUP MANAGEMENT */

#pickupRequestsList {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.dashboard-pickup-card {
    background: #111b17;
    border: 1px solid rgba(117, 175, 136, 0.2);
    border-radius: 16px;
    padding: 24px;
    overflow-wrap: anywhere;
}

.dashboard-pickup-card h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.2rem;
}

.dashboard-pickup-card p {
    margin: 9px 0;
    color: #d4dfd8;
    line-height: 1.6;
}

.dashboard-pickup-card strong {
    color: #ffffff;
}

.dashboard-pickup-status {
    display: inline-block;
    margin-bottom: 15px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(99, 175, 119, 0.15);
    color: #a9e2b7;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
}

#pickupListStatus {
    color: #c5d4ca;
    margin-top: 18px;
}

/* REMOVE DASHBOARD GRADIENTS */

.dashboard-page .dashboard-welcome {
    background: #174a35;
}


/* ==========================================
   ADMIN DASHBOARD — CARD REFINEMENTS
========================================== */

/* Customer and inquiry list spacing */
#customerDirectory,
#inquiryList,
#pickupRequestsList {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 22px;
    margin-bottom: 30px;
}

/* Individual cards */
.dashboard-pickup-card {
    padding: 30px 32px;
    border-radius: 18px;
    box-sizing: border-box;
    width: 100%;
}

/* Customer and inquiry names */
.dashboard-pickup-card h3 {
    margin: 0 0 18px;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
}

/* Request/inquiry status badges */
.dashboard-pickup-card .dashboard-pickup-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 22px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* Details inside cards */
.dashboard-pickup-card p {
    margin: 0 0 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.dashboard-pickup-card p strong {
    font-weight: 700;
    margin-right: 5px;
}

/* Status update controls */
.dashboard-pickup-card label {
    display: block;
    margin-top: 22px;
    margin-bottom: 12px !important;
    color: #e7f5ec;
    font-size: 14px;
    font-weight: 600;
}

/* Dropdowns */
.dashboard-pickup-card select {
    min-height: 44px;
    padding: 10px 14px !important;
    border-radius: 9px !important;
    border: 1px solid #b9c9c0 !important;
    background: #ffffff;
    color: #10251b;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Save buttons */
.dashboard-pickup-card button {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Status feedback */
.dashboard-pickup-card [role="status"] {
    margin-top: 14px !important;
    margin-bottom: 0;
    color: #b5e8ca;
    font-size: 13px;
}

/* List headings and loading messages */
#customerListStatus,
#inquiryListStatus,
#pickupListStatus {
    margin-top: 18px;
    margin-bottom: 4px;
    line-height: 1.6;
}

/* Prevent cards from touching the footer */
.dashboard-section {
    margin-bottom: 36px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dashboard-pickup-card {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .dashboard-pickup-card h3 {
        font-size: 18px;
    }

    .dashboard-pickup-card select {
        max-width: 100%;
    }

    .dashboard-pickup-card button {
        margin-top: 4px;
    }

    #customerDirectory,
    #inquiryList,
    #pickupRequestsList {
        gap: 16px;
    }
}


/* ==========================================
   SAPIANT GLOBAL
   PROFESSIONAL ADMIN MANAGEMENT DESIGN
========================================== */

/* CUSTOMER, INQUIRY AND PICKUP LISTS */

#customerDirectory,
#inquiryList,
#pickupRequestsList {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 36px;
}

/* STATUS MESSAGES ABOVE LISTS */

#customerListStatus,
#inquiryListStatus,
#pickupListStatus {
    margin: 12px 0 18px;
    color: #64766c;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
}

/* MAIN MANAGEMENT CARDS */

#customerDirectory .dashboard-pickup-card,
#inquiryList .dashboard-pickup-card,
#pickupRequestsList .dashboard-pickup-card {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e0e9e2;
    border-radius: 14px;

    padding: 24px 28px;

    box-shadow: 0 3px 14px rgba(16, 42, 30, 0.035);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#customerDirectory .dashboard-pickup-card:hover,
#inquiryList .dashboard-pickup-card:hover,
#pickupRequestsList .dashboard-pickup-card:hover {
    border-color: #b9d8c4;
    box-shadow: 0 6px 22px rgba(16, 42, 30, 0.065);
}

/* CUSTOMER / REQUEST HEADINGS */

#customerDirectory .dashboard-pickup-card h3,
#inquiryList .dashboard-pickup-card h3,
#pickupRequestsList .dashboard-pickup-card h3 {
    margin: 0 0 16px;

    color: #102a43;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

/* DETAILS — CLEAN INFORMATION ROWS */

#customerDirectory .dashboard-pickup-card p,
#inquiryList .dashboard-pickup-card p,
#pickupRequestsList .dashboard-pickup-card p {
    margin: 0;
    padding: 10px 0;

    color: #53675b;
    font-size: 13.5px;
    line-height: 1.65;

    border-bottom: 1px solid #edf1ee;

    overflow-wrap: anywhere;
}

/* REMOVE DIVIDER AFTER FINAL DETAIL */

#customerDirectory .dashboard-pickup-card > p:last-child {
    border-bottom: none;
}

/* DETAIL LABELS */

#customerDirectory .dashboard-pickup-card strong,
#inquiryList .dashboard-pickup-card strong,
#pickupRequestsList .dashboard-pickup-card strong {
    color: #193e2c;
    font-size: 13px;
    font-weight: 700;
    margin-right: 6px;
}

/* STATUS BADGES */

#inquiryList .dashboard-pickup-status,
#pickupRequestsList .dashboard-pickup-status {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    padding: 6px 13px;
    margin: 0 0 15px;

    border-radius: 999px;

    background: #e6f4eb;
    color: #237245;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

/* INQUIRY / PICKUP STATUS CONTROLS */

#inquiryList .dashboard-pickup-card > div:last-child,
#pickupRequestsList .dashboard-pickup-card > div:last-child {
    margin-top: 20px !important;
    padding-top: 18px;

    border-top: 1px solid #e0e9e2;
}

/* LABELS */

#inquiryList .dashboard-pickup-card label,
#pickupRequestsList .dashboard-pickup-card label {
    display: block;

    margin: 0 0 12px !important;

    color: #234d35;
    font-size: 13px;
    font-weight: 700;
}

/* STATUS DROPDOWNS */

#inquiryList .dashboard-pickup-card select,
#pickupRequestsList .dashboard-pickup-card select {
    min-width: 160px;
    min-height: 44px;

    padding: 10px 14px !important;
    margin: 0 10px 10px 0 !important;

    background: #ffffff;
    color: #173c29;

    border: 1px solid #cbdcd0 !important;
    border-radius: 8px !important;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;
}

/* SAVE STATUS BUTTONS */

#inquiryList .dashboard-pickup-card button,
#pickupRequestsList .dashboard-pickup-card button {
    min-height: 44px;

    padding: 10px 20px;

    background: #174a35;
    color: #ffffff;

    border: 1px solid #174a35;
    border-radius: 8px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#inquiryList .dashboard-pickup-card button:hover,
#pickupRequestsList .dashboard-pickup-card button:hover {
    background: #226a4b;
    transform: translateY(-1px);
}

#inquiryList .dashboard-pickup-card button:disabled,
#pickupRequestsList .dashboard-pickup-card button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

/* SUCCESS / ERROR FEEDBACK */

#inquiryList .dashboard-pickup-card [role="status"],
#pickupRequestsList .dashboard-pickup-card [role="status"] {
    margin: 10px 0 0 !important;
    padding: 0;

    border: none;

    color: #237245;
    font-size: 12px;
    font-weight: 600;
}

/* SECTION SPACING */

.dashboard-section {
    margin-bottom: 48px;
}

.dashboard-section-heading {
    margin-bottom: 18px;
}

/* ADMIN STATISTICS REFINEMENT */

#adminDashboard .dashboard-stat-card {
    padding: 25px 26px;
    border-radius: 13px;

    border: 1px solid #e1eae3;
    background: #ffffff;

    box-shadow: 0 3px 14px rgba(16, 42, 30, 0.025);
}

#adminDashboard .dashboard-stat-card strong {
    color: #174a35;
    font-size: 2.2rem;
}

/* ADMIN FOOTER */

#adminDashboard .dashboard-footer {
    margin-top: 36px;
    padding-top: 26px;
}

/* ==========================================
   RESPONSIVE ADMIN LAYOUT
========================================== */

@media (max-width: 768px) {

    #customerDirectory,
    #inquiryList,
    #pickupRequestsList {
        gap: 12px;
    }

    #customerDirectory .dashboard-pickup-card,
    #inquiryList .dashboard-pickup-card,
    #pickupRequestsList .dashboard-pickup-card {
        padding: 20px 18px;
        border-radius: 12px;
    }

    #customerDirectory .dashboard-pickup-card h3,
    #inquiryList .dashboard-pickup-card h3,
    #pickupRequestsList .dashboard-pickup-card h3 {
        font-size: 17px;
    }

    #inquiryList .dashboard-pickup-card select,
    #pickupRequestsList .dashboard-pickup-card select {
        width: 100%;
        min-width: 0;
        margin-right: 0 !important;
    }

    #inquiryList .dashboard-pickup-card button,
    #pickupRequestsList .dashboard-pickup-card button {
        width: 100%;
    }

    #adminDashboard .dashboard-stat-card {
        padding: 22px;
    }
}
