@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bmw-blue: #0066b2;
    --bmw-blue-hover: #004f8c;
    --bmw-blue-light: #e8f3fa;
    --bmw-dark: #0c1927;
    --bmw-dark-card: #132235;
    --bmw-slate: #1e293b;
    --bmw-gray-bg: #f5f7fa;
    --bmw-gray-border: #e2e8f0;
    --bmw-gray-text: #64748b;
    --bmw-heading: #0f172a;
    --bmw-badge-ready: #dcfce7;
    --bmw-badge-ready-text: #166534;
    --bmw-badge-progress: #e0f2fe;
    --bmw-badge-progress-text: #0369a1;
    --bmw-badge-pending: #f1f5f9;
    --bmw-badge-pending-text: #475569;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bmw-gray-bg);
    color: var(--bmw-heading);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    border-right: 1px solid var(--bmw-gray-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Brand Header */
.brand-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.brand-logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bmw-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 102, 178, 0.25);
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--bmw-heading);
    line-height: 1.2;
}

.brand-text p {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--bmw-gray-text);
    font-weight: 600;
}

/* Sidebar Nav */
.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.nav-item:hover {
    background-color: #f8fafc;
    color: var(--bmw-blue);
}

.nav-item.active {
    background-color: var(--bmw-blue);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 102, 178, 0.2);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* Sidebar Footer Profile */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff;
}

.user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--bmw-blue);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bmw-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info .user-status {
    font-size: 11px;
    color: var(--bmw-gray-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
}

/* Top Navbar */
.top-navbar {
    height: 68px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--bmw-gray-border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.showroom-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
}

.showroom-selector select {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    cursor: pointer;
}

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

.nav-link-sub {
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}

.nav-link-sub:hover {
    color: var(--bmw-blue);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
}

.icon-btn:hover {
    background-color: #f8fafc;
    color: var(--bmw-blue);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
}

.btn-primary-dark {
    background-color: #0c1927;
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-primary-dark:hover {
    background-color: #172a3a;
}

/* Page Body Container */
.page-body {
    padding: 32px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title-group h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--bmw-heading);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-title-group p {
    font-size: 14px;
    color: var(--bmw-gray-text);
}

/* Buttons */
.btn-bmw {
    background-color: var(--bmw-blue);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-bmw:hover {
    background-color: var(--bmw-blue-hover);
    box-shadow: 0 4px 12px rgba(0, 102, 178, 0.25);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--bmw-gray-border);
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background-color: #ffffff;
    border: 1px solid var(--bmw-gray-border);
    border-radius: 14px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.kpi-card.featured {
    background-color: #0066b2;
    color: #ffffff;
    border: none;
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bmw-gray-text);
}

.kpi-card.featured .kpi-label {
    color: rgba(255, 255, 255, 0.85);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bmw-blue);
}

.kpi-card.featured .kpi-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.kpi-body {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.kpi-value {
    font-size: 34px;
    font-weight: 800;
    color: var(--bmw-heading);
    letter-spacing: -0.5px;
}

.kpi-card.featured .kpi-value {
    color: #ffffff;
}

.kpi-subtext {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.kpi-card.featured .kpi-subtext {
    color: rgba(255, 255, 255, 0.9);
}

/* Delivery Spotlight Banner */
.spotlight-banner {
    background: linear-gradient(135deg, #0c1927 0%, #15293d 100%);
    border-radius: 14px;
    padding: 36px 40px;
    color: #ffffff;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.spotlight-content {
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.spotlight-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #38bdf8;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotlight-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #ffffff;
}

.spotlight-desc {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* Card & Table Component */
.card-table-container {
    background-color: #ffffff;
    border: 1px solid var(--bmw-gray-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.card-header-row {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bmw-gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-row h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--bmw-heading);
}

.card-header-row a {
    color: var(--bmw-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.bmw-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.bmw-table th {
    background-color: #fcfdfe;
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid var(--bmw-gray-border);
}

.bmw-table td {
    padding: 18px 20px;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.bmw-table tr:hover td {
    background-color: #fbfcfe;
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-status.in-progress {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-status.pending {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-status.ready {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-status.delivered {
    background-color: #f3e8ff;
    color: #7e22ce;
}

/* 5-Stage Fulfillment Tracker Component */
.journey-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 24px 10px;
    margin: 20px 0 30px 0;
}

.journey-tracker::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.journey-progress-line {
    position: absolute;
    top: 40px;
    left: 40px;
    height: 3px;
    background-color: var(--bmw-blue);
    z-index: 2;
    transition: width 0.3s ease;
}

.journey-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 3px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.journey-step.completed .step-node {
    background-color: #0066b2;
    border-color: #0066b2;
    color: #ffffff;
}

.journey-step.active .step-node {
    background-color: #ffffff;
    border-color: #0066b2;
    color: #0066b2;
    box-shadow: 0 0 0 5px rgba(0, 102, 178, 0.15);
}

.step-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
}

.journey-step.completed .step-label,
.journey-step.active .step-label {
    color: #0066b2;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(12, 25, 39, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
