/* ===================================================
   Primewheel Customer Portal — Frontend Styles
   Theme: Luxury Automotive — Dark/Steel Aesthetic
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --pw-dark:       #0d1117;
    --pw-surface:    #161b22;
    --pw-surface2:   #1f2937;
    --pw-border:     #30363d;
    --pw-text:       #e6edf3;
    --pw-text-muted: #8b949e;
    --pw-accent:     #f59e0b;
    --pw-accent2:    #d97706;
    --pw-blue:       #3b82f6;
    --pw-green:      #10b981;
    --pw-red:        #ef4444;
    --pw-radius:     12px;
    --pw-shadow:     0 8px 32px rgba(0,0,0,0.4);
}

/* ─── Wrapper ─────────────────────────────────── */
.pw-portal-wrap {
    font-family: 'Inter', sans-serif;
    background: var(--pw-dark);
    min-height: 80vh;
    color: var(--pw-text);
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

/* ─── Header ──────────────────────────────────── */
.pw-portal-header {
    background: linear-gradient(135deg, #0d1117 0%, #1a2332 50%, #0d1117 100%);
    border-bottom: 1px solid var(--pw-border);
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.pw-portal-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pw-accent), var(--pw-blue), var(--pw-green));
}

.pw-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pw-header-logo {
    font-size: 40px;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.4));
}

.pw-portal-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--pw-text);
    margin: 0 0 2px 0;
    letter-spacing: 0.5px;
}

.pw-portal-sub {
    color: var(--pw-text-muted);
    font-size: 14px;
    margin: 0;
}

.pw-logout-btn {
    background: transparent;
    border: 1px solid var(--pw-border);
    color: var(--pw-text-muted);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.pw-logout-btn:hover {
    border-color: var(--pw-red);
    color: var(--pw-red);
    text-decoration: none;
}

/* ─── Login Box ───────────────────────────────── */
.pw-login-box {
    max-width: 440px;
    margin: 80px auto;
    text-align: center;
    background: var(--pw-surface);
    border: 1px solid var(--pw-border);
    border-radius: 20px;
    padding: 52px 44px;
    box-shadow: var(--pw-shadow);
}

.pw-login-logo {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 0 16px rgba(245,158,11,0.5));
}

.pw-login-box h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 26px;
    color: var(--pw-text);
    margin-bottom: 12px;
}

.pw-login-box p {
    color: var(--pw-text-muted);
    margin-bottom: 28px;
    font-size: 15px;
}

.pw-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--pw-accent), var(--pw-accent2));
    color: #000;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.pw-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,158,11,0.35);
    text-decoration: none;
    color: #000;
}

.pw-denied .pw-login-logo { filter: drop-shadow(0 0 16px rgba(239,68,68,0.4)); }

/* ─── Vehicles Grid ───────────────────────────── */
.pw-vehicles-grid {
    padding: 32px 36px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(540px, 1fr));
    gap: 24px;
}

/* ─── Vehicle Card ────────────────────────────── */
.pw-vehicle-card {
    background: var(--pw-surface);
    border: 1px solid var(--pw-border);
    border-radius: var(--pw-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pw-vehicle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    border-color: #374151;
}

.pw-vehicle-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #1a2332, #0d1117);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pw-vehicle-placeholder {
    font-size: 72px;
    opacity: 0.25;
    filter: grayscale(1);
}

.pw-vehicle-status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.pw-vehicle-body {
    padding: 24px;
}

.pw-vehicle-name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--pw-text);
    margin: 0 0 14px 0;
    letter-spacing: 0.3px;
}

/* ─── Vehicle Details ─────────────────────────── */
.pw-vehicle-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--pw-surface2);
    border: 1px solid var(--pw-border);
    border-radius: 8px;
    padding: 14px;
}

.pw-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pw-text-muted);
}

.pw-detail-item strong {
    color: var(--pw-text);
}

.pw-detail-icon {
    font-size: 14px;
}

/* ─── Progress Tracker ────────────────────────── */
.pw-progress-section h4,
.pw-timeline-section h4,
.pw-tracking-notes h4 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--pw-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 14px 0;
}

.pw-progress-track {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.pw-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pw-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid var(--pw-border);
    background: var(--pw-surface2);
    color: var(--pw-text-muted);
    transition: all 0.3s;
}

.pw-step-done .pw-step-circle {
    color: #fff;
    font-size: 16px;
}

.pw-step-current .pw-step-circle {
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.08);
    animation: pw-pulse 2s infinite;
}

@keyframes pw-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,0.08); }
    50%       { box-shadow: 0 0 0 8px rgba(255,255,255,0.04); }
}

.pw-step-pending .pw-step-circle {
    opacity: 0.4;
}

.pw-step-label {
    font-size: 10px;
    color: var(--pw-text-muted);
    text-align: center;
    white-space: nowrap;
}

.pw-step-current .pw-step-label {
    color: var(--pw-text);
    font-weight: 600;
}

.pw-step-connector {
    flex: 1;
    height: 2px;
    background: var(--pw-border);
    min-width: 20px;
    margin-bottom: 18px;
    transition: background 0.3s;
}

.pw-connector-done {
    background: var(--pw-green);
}

/* ─── Timeline ────────────────────────────────── */
.pw-timeline-section {
    margin-bottom: 20px;
}

.pw-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 4px;
}

.pw-timeline-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.pw-tl-dot {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.pw-tl-content {
    display: flex;
    justify-content: space-between;
    flex: 1;
    background: var(--pw-surface2);
    border: 1px solid var(--pw-border);
    border-radius: 8px;
    padding: 8px 14px;
}

.pw-tl-content strong {
    color: var(--pw-text);
    font-weight: 500;
}

.pw-tl-content span {
    color: var(--pw-text-muted);
    font-size: 12px;
}

.pw-tl-upcoming .pw-tl-content {
    border-style: dashed;
    opacity: 0.7;
}

/* ─── Tracking Notes ──────────────────────────── */
.pw-tracking-notes {
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(16,185,129,0.05));
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 10px;
    padding: 16px;
    margin-top: 8px;
}

.pw-tracking-notes p {
    margin: 0;
    font-size: 13px;
    color: var(--pw-text);
    line-height: 1.7;
}

/* ─── Empty State ─────────────────────────────── */
.pw-empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--pw-text-muted);
}

.pw-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.pw-empty-state h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    color: var(--pw-text);
    margin-bottom: 10px;
}

/* ─── Footer ──────────────────────────────────── */
.pw-portal-footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--pw-border);
    color: var(--pw-text-muted);
    font-size: 13px;
}

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

/* ─── Manager Portal Additions ────────────────── */
.pw-customer-tag {
    font-size: 13px;
    color: var(--pw-text-muted);
    margin: 0 0 14px 0;
}

.pw-edit-link {
    display: inline-block;
    font-size: 13px;
    color: var(--pw-blue);
    text-decoration: none;
    border: 1px solid rgba(59,130,246,0.3);
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.pw-edit-link:hover {
    background: rgba(59,130,246,0.1);
    text-decoration: none;
    color: var(--pw-blue);
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 680px) {
    .pw-portal-header { padding: 20px; flex-direction: column; gap: 16px; text-align: center; }
    .pw-vehicles-grid { padding: 20px; grid-template-columns: 1fr; }
    .pw-vehicle-details { grid-template-columns: 1fr; }
    .pw-step-label { display: none; }
    .pw-tl-content { flex-direction: column; gap: 2px; }
}
