/* 
 * Cash My Gadget - Pickup Partner Portal Master Design System
 * Architecture: Mobile-First, Premium Squircle, Slate-Indigo-Orange
 */

:root {
    --pp-slate-50: #f8fafc;
    --pp-slate-100: #f1f5f9;
    --pp-slate-200: #e2e8f0;
    --pp-slate-400: #94a3b8;
    --pp-slate-600: #475569;
    --pp-slate-700: #334155;
    --pp-slate-900: #0f172a;
    --pp-indigo-600: #4f46e5;
    --pp-indigo-700: #4338ca;
    --pp-orange-primary: #f47321;
    --pp-orange-dark: #d35400;
    --pp-danger-500: #ef4444;
    --pp-danger-600: #dc2626;
    --pp-success-500: #10b981;
    --pp-success-soft: #ecfdf5;
    --pp-radius-card: 24px;
    --pp-radius-element: 16px;
    --pp-shadow-sm: 0 1px 3px rgba(0,0,0,0.02);
    --pp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --pp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 1. Base Framework */
body {
    font-family: 'Outfit', sans-serif !important;
    background-color: #0f172a;
    color: var(--pp-slate-200);
    padding-bottom: 70px;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 992px) {
    body { padding-bottom: 0; }
}

.fw-800 { font-weight: 800 !important; }
.fw-900 { font-weight: 900 !important; }

/* 1.5 Container & Typography */
.safe-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.page-title-large {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.page-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    margin-bottom: 24px;
}

.segmented-control {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 85px;
    z-index: 1040;
}

.segment-item { 
    flex: 1;
    text-align: center;
    padding: 12px 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.segment-item:hover { color: #ffffff; background: rgba(255,255,255,0.05); }
.segment-item.active { 
    background: rgba(255, 255, 255, 0.1); 
    color: #ffffff !important; 
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

/* 2. Global Navigation & Layout */
.page-header {
    background: #0f172a;
    height: 72px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.brand-section {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link-ent {
    display: flex; align-items: center; gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    transition: all 0.2s ease;
}

.nav-link-ent:hover { color: #ffffff; }
.nav-link-ent.active { color: var(--pp-orange-primary); }

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--pp-danger-500);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--pp-radius-element);
    font-weight: 700;
    padding: 8px 16px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--pp-danger-600);
    color: white;
}

.mobile-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    height: 65px; background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 1060; box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}

.mobile-nav-item {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem; font-weight: 800; gap: 6px;
    transition: all 0.2s ease;
}

.mobile-nav-item.active { color: var(--pp-orange-primary); }

/* 3. Component Library */
.pp-card {
    background: #1e293b;
    border-radius: var(--pp-radius-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.pp-btn {
    height: 52px;
    border-radius: var(--pp-radius-element);
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

.pp-btn-orange {
    background: linear-gradient(135deg, var(--pp-orange-primary), var(--pp-orange-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(244, 115, 33, 0.2);
}

.pp-btn-orange:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(244, 115, 33, 0.3); color: #fff; }

.pp-input {
    width: 100%;
    height: 54px;
    background: #f8fafc;
    border: 2px solid var(--pp-slate-100);
    border-radius: var(--pp-radius-element);
    padding: 0 20px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.pp-input:focus {
    border-color: var(--pp-orange-primary);
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(244, 115, 33, 0.1);
}

/* 4. Action System (Mobile Action Shelf) */
.action-shelf {
    position: fixed; bottom: 65px; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 12px 16px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    z-index: 1055;
}

@media (min-width: 992px) {
    .action-shelf {
        position: relative; bottom: 0;
        background: white; border-radius: var(--pp-radius-card);
        padding: 24px; border: 1px solid var(--pp-slate-200);
        grid-template-columns: 1fr 1fr; transform: none; left: 0;
        box-shadow: var(--pp-shadow-sm); z-index: 10;
    }
}

.pp-spacer-mobile { height: 280px; }

/* 5. Dashboard Hub */
.analytics-shelf {
    display: flex;
    flex-wrap: wrap; 
    gap: 12px;
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .analytics-shelf {
        flex-wrap: nowrap;
        gap: 20px;
    }
}

.hero-metric-card {
    flex: 1 1 100%; /* Full width on mobile */
    min-width: 0;
    background: linear-gradient(135deg, var(--pp-orange-primary) 0%, var(--pp-orange-dark) 100%);
    border-radius: var(--pp-radius-card);
    padding: 24px; color: white;
    box-shadow: 0 10px 25px rgba(244, 115, 33, 0.2);
}

@media (min-width: 768px) {
    .hero-metric-card {
        flex: 2; /* Larger on desktop */
        min-width: 280px;
    }
}

.pp-card-metric {
    flex: 1 1 calc(50% - 6px); /* 2 per row on small tablets/large mobile */
    min-width: 140px;
}

@media (max-width: 480px) {
    .pp-card-metric {
        flex: 1 1 100%; /* Stack on small mobile */
    }
}

/* 6. List Items & Diagnostics */
.pp-list-item {
    background: #1e293b; 
    padding: 14px 18px;
    border-radius: var(--pp-radius-card); margin-bottom: 12px;
    display: flex; align-items: center; gap: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.pp-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    background: #273548;
    border-color: rgba(255,255,255,0.1);
}

.pp-list-completed {
    background: #0f172a;
    border-color: rgba(255,255,255,0.02);
    position: relative;
    overflow: hidden;
}
.fulfilled-watermark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(-5deg);
    right: 20px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(16, 185, 129, 0.05);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 1;
}

.audit-card {
    background: #1e293b;
    border-radius: var(--pp-radius-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    margin-bottom: 1.5rem;
}

.faults-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fault-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.fault-chip:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.fault-chip.active {
    background: var(--pp-orange-primary);
    border-color: var(--pp-orange-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(244, 115, 33, 0.3);
}

.fault-chip.danger.active {
    background: var(--pp-danger-500);
    border-color: var(--pp-danger-500);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.inspection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.inspection-card {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.inspection-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.inspection-card.active { border-color: var(--pp-orange-primary); background: rgba(244, 115, 33, 0.03); }


.pp-badge {
    padding: 6px 12px; border-radius: 100px;
    font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.pp-badge-success { background: var(--pp-success-soft); color: var(--pp-success-500); }

/* 7. Shared Internal Page Utilities */
.card-body-luxury { padding: 24px; }
.card-luxury-header { 
    padding: 16px 24px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.diag-pill {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--pp-radius-element);
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.diag-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.1em;
}

.diag-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

/* End of Design System */

/* 8. Native List Architecture (Orders) */
.native-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.native-leading {
    width: 65px;
    height: 85px;
    background: #0f172a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 5px;
}

.native-leading img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.native-content {
    flex: 1;
    min-width: 0;
}

.native-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.native-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.native-trailing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.native-price {
    font-size: 0.95rem;
    font-weight: 900;
    color: #ffffff;
}

.native-status {
    font-size: 0.7rem;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-badge-blue {
    background: rgba(244, 115, 33, 0.1);
    color: var(--pp-orange-primary);
}

.status-badge-green {
    background: var(--pp-success-soft);
    color: var(--pp-success-500);
}

.native-chevron {
    color: var(--pp-slate-300);
    font-size: 0.8rem;
    margin-left: 8px;
}
