/* ============================================
   Client Portal Styles
   Separate from admin CSS to prevent conflicts
   ============================================ */

:root {
    --portal-primary: #e9a71f;
    --portal-dark: #121212;
    --portal-light: #f4f7f6;
    --portal-white: #ffffff;
    --portal-light-gold: #fff9e6;
}

/* Auth Pages */
.auth-body {
    background: var(--portal-light);
}

.auth-card {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    background: var(--portal-white);
}

.auth-header {
    background: var(--portal-dark);
    color: white;
    padding: 25px 30px;
}

.auth-body {
    padding: 30px;
}

.portal-input {
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    padding: 10px 15px !important;
    transition: border-color 0.3s;
}

.portal-input:focus {
    border-color: var(--portal-primary) !important;
    box-shadow: 0 0 0 3px rgba(233, 167, 31, 0.1) !important;
}

/* Status Badges - Extended */
.status-pending { background: #fef3c7; color: #d97706; }
.status-processing { background: #dbeafe; color: #3b82f6; }
.status-on-hold { background: #fce7f3; color: #db2777; }
.status-completed { background: #d1fae5; color: #059669; }
.status-cancelled { background: #fee2e2; color: #dc2626; }
.status-refunded { background: #ede9fe; color: #7c3aed; }
.status-failed { background: #fee2e2; color: #dc2626; }
.status-trash { background: #f3f4f6; color: #6b7280; }
.status-shipped { background: #eef2ff; color: #4f46e5; }
.status-delivered { background: #f0fdf4; color: #16a34a; }

/* Dashboard Stat Cards */
.stat-card {
    background: var(--portal-white);
    border-radius: 20px;
    padding: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: 0.3s;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--portal-light-gold);
    color: var(--portal-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 15px;
}

/* Cards */
.card-custom {
    background: white;
    border-radius: 24px;
    padding: 30px;
    border: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

/* Tables */
.order-table-card {
    background: var(--portal-white);
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table thead {
    background: #fafafa;
}

.table th {
    padding: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    border: none;
}

.table td {
    vertical-align: middle;
    padding: 20px;
    border-bottom: 1px solid #f8f8f8;
    font-size: 14px;
    color: #000;
}

/* Status Badges */
.badge-status {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

/* Order Detail Header */
.detail-header {
    background: var(--portal-dark);
    color: white;
    padding: 80px 0 120px;
}

.dashboard-container {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* Product Image */
.product-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid #eee;
}

/* Progress Tracker */
.step-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 30px;
}

.step-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #eee;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100px;
}

.step-icon {
    width: 32px;
    height: 32px;
    background: #eee;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    border: 4px solid white;
}

.step.active .step-icon {
    background: var(--portal-primary);
    color: white;
}

.step.active .step-text {
    color: var(--portal-primary);
    font-weight: 700;
}

.step-text {
    font-size: 12px;
    font-weight: 500;
    color: #999;
}

/* Text Gold */
.text-gold {
    color: var(--portal-primary) !important;
}

/* Button overrides for portal */
.btn-track-main {
    background: var(--portal-primary);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-track-main:hover {
    background: #d19519;
    color: white;
    transform: scale(1.02);
}

/* ── Portal Navbar ─────────────────────────────────────── */
nav.portal-navbar {
    background: #fff;
    border-bottom: 1px solid #ede8d8;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    z-index: 1030;
}


.portal-nav-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    padding: 0 6px;
    white-space: nowrap;
}

.portal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    border: 1.5px solid #cfcabc;
    background: #fff;
    color: #1a1a2e;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s, border-color .18s, color .18s;
    cursor: pointer;
    line-height: 1.4;
}
.portal-nav-btn:hover,
.portal-nav-btn:focus {
    background: #f5f2ea;
    border-color: #C9A84C;
    color: #1a1a2e;
    text-decoration: none;
    outline: none;
}
.portal-nav-btn--active {
    background: #f5f2ea;
    border-color: #C9A84C;
    color: #C9A84C;
}
.portal-nav-btn--gold {
    background: #C9A84C;
    border-color: #C9A84C;
    color: #fff;
}
.portal-nav-btn--gold:hover,
.portal-nav-btn--gold:focus {
    background: #b8953f;
    border-color: #b8953f;
    color: #fff;
}

/* Cart badge */
.portal-nav-cart { position: relative; }
.portal-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    background: #C9A84C;
    color: #fff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    gap: 4px;
    flex-wrap: wrap;
    --bs-pagination-active-bg: #C9A84C;
    --bs-pagination-active-border-color: #C9A84C;
}
.pagination .page-item .page-link {
    border-radius: 8px !important;
    border: 1.5px solid #e5e0d0;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 13px;
    background: #fff;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.5;
}
.pagination .page-item .page-link:hover {
    background: #f5f2ea;
    border-color: #C9A84C;
    color: #1a1a2e;
}
.pagination .page-item.active .page-link {
    background: #C9A84C;
    border-color: #C9A84C;
    color: #fff;
    font-weight: 700;
}
.pagination .page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-header {
        padding: 40px 0 80px;
    }
    .detail-header h1 {
        font-size: 1.5rem;
    }
    .step-container {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 50px;
    }
    .step {
        align-items: flex-start;
        text-align: left;
        padding-bottom: 25px;
        width: auto;
    }
    .step-container::before {
        left: 15px;
        top: 0;
        width: 2px;
        height: 100%;
    }
    .step-icon {
        position: absolute;
        left: -50px;
    }
    .stat-card {
        padding: 15px;
    }
    .card-custom {
        padding: 20px;
    }
}
