/* ====================================================
   BRIXEN CONSULTANTS - PREMIUM BRANDING & CSS SYSTEM
   Official Brand Palette: Deep Corporate Navy (#003971), 
   Vivid Accent Blue (#006cff), Teal Accent (#008075).
   ==================================================== */

:root {
    /* Brixen Light Corporate & Liquid Glass Palette */
    --brand-primary: #003971;
    --brand-secondary: #006cff;
    --brand-accent: #008075;
    --brand-dark: #061324;
    --brand-gradient: linear-gradient(135deg, #003971 0%, #006cff 100%);
    --brand-glow: rgba(0, 108, 255, 0.15);
    
    /* Clean Light Surfaces & Jobie-Inspired Structure */
    --bg-canvas: #f7f9fc;
    --bg-content: #f7f9fc;
    --bg-card: #ffffff;
    --bg-glass-card: #ffffff;
    --border-color: #e2e8f0;
    --border-glass: rgba(255, 255, 255, 0.8);
    --border-brand-subtle: rgba(0, 108, 255, 0.25);
    
    /* Sidebar Deep Brixen Navy */
    --sidebar-bg: linear-gradient(180deg, #061324 0%, #09203f 50%, #003971 100%);
    --sidebar-active-bg: rgba(255, 255, 255, 0.14);
    --sidebar-text: #cbd5e1;
    --sidebar-text-muted: #94a3b8;
    
    /* Corporate Executive Typography */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    /* Muted Status Colors */
    --status-success: #059669;
    --status-success-bg: #ecfdf5;
    --status-info: #0284c7;
    --status-info-bg: #e0f2fe;
    --status-warning: #d97706;
    --status-warning-bg: #fffbeb;
    --status-danger: #dc2626;
    --status-danger-bg: #fef2f2;

    /* Apple-Style Glass Curves & Soft Elevation */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-elevated: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    --transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Red Hat Display', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    display: flex;
}

ul, ol, li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; outline: none; }
input, select, textarea { font-family: inherit; }

#app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 270px;
    background: var(--sidebar-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    padding: 24px 16px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 50;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 18px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-container-glass {
    background: #ffffff;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.brixen-brand-logo {
    max-height: 28px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav { flex: 1; padding-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.nav-group-title { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sidebar-text-muted); padding: 0 10px; margin-bottom: 8px; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item { list-style: none; }
.nav-item a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--radius-md); color: var(--sidebar-text); font-size: 0.88rem; font-weight: 500; transition: var(--transition); }
.nav-item a:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }

/* Liquid Glass Active Sidebar Navigation Item */
.nav-item.active a {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-weight: 700;
    border-left: 3px solid var(--brand-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.support-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg); padding: 16px; margin: 12px 0; text-align: center; }
.support-card h4 { font-size: 0.85rem; font-weight: 700; color: #ffffff; margin-bottom: 4px; }
.support-card p { font-size: 0.75rem; color: #cbd5e1; margin-bottom: 12px; }
.btn-support-card { display: block; width: 100%; padding: 8px 12px; background: #ffffff; color: var(--brand-primary); font-size: 0.8rem; font-weight: 700; border-radius: var(--radius-md); transition: var(--transition); }
.btn-support-card:hover { background: #f1f5f9; color: var(--brand-secondary); }

.sidebar-user { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: rgba(0, 0, 0, 0.3); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.08); }
.user-info-wrapper { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-primary); color: #ffffff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.user-details { overflow: hidden; }
.user-details .name { font-size: 0.82rem; font-weight: 700; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-details .role-badge { font-size: 0.68rem; color: var(--brand-secondary); font-weight: 600; }
.btn-logout { color: #94a3b8; padding: 6px; border-radius: 6px; transition: var(--transition); }
.btn-logout:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

/* MAIN CONTENT WRAPPER */
.main-wrapper { flex: 1; margin-left: 270px; display: flex; flex-direction: column; min-height: 100vh; background: var(--bg-canvas); width: calc(100vw - 270px); }
.top-header {
    height: 72px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Liquid Glass Search Control (.glassEffect(.regular, in: .capsule)) */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 9999px; /* Capsule Geometry */
    padding: 8px 18px;
    width: 340px;
    box-shadow: 
        inset 0 1.5px 0 0 rgba(255, 255, 255, 0.95),  /* Top Specular Edge Highlight */
        inset 0 -1px 0 0 rgba(15, 23, 42, 0.05),     /* Bottom Rim Shadow */
        0 8px 24px -4px rgba(15, 23, 42, 0.08);       /* Soft Depth Shadow */
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box:focus-within {
    background: #ffffff;
    border-color: rgba(0, 108, 255, 0.5);
    box-shadow: 
        inset 0 1.5px 0 0 rgba(255, 255, 255, 1),
        0 0 0 3px rgba(0, 108, 255, 0.12),
        0 12px 32px -4px rgba(0, 108, 255, 0.18);
    transform: translateY(-1.5px);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 100%;
}

.search-box input::placeholder {
    color: #94a3b8;
}

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

/* Liquid Glass Client / Account Control (.glassEffect(.regular, in: .capsule)) */
.glass-account-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 9999px; /* Capsule Geometry */
    padding: 6px 16px;
    box-shadow: 
        inset 0 1.5px 0 0 rgba(255, 255, 255, 0.95),  /* Top Specular Edge Highlight */
        inset 0 -1px 0 0 rgba(15, 23, 42, 0.05),     /* Bottom Rim Shadow */
        0 8px 24px -4px rgba(15, 23, 42, 0.08);       /* Soft Depth Shadow */
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.glass-account-control:hover {
    transform: translateY(-1.5px) scale(1.01);
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 
        inset 0 1.5px 0 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 0 rgba(0, 108, 255, 0.15),
        0 12px 32px -4px rgba(0, 108, 255, 0.15);
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.account-details {
    display: flex;
    flex-direction: column;
}

.account-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.account-role {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--brand-secondary);
}

.role-switcher-select.glass-select {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.btn-icon-relative { position: relative; padding: 8px; border-radius: 50%; color: var(--text-secondary); transition: var(--transition); }
.btn-icon-relative:hover { background: #f1f5f9; color: var(--brand-primary); }
.notification-badge { position: absolute; top: 4px; right: 4px; background: #ef4444; color: #ffffff; font-size: 0.65rem; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.page-container { padding: 32px; flex: 1; display: flex; flex-direction: column; gap: 28px; width: 100%; }
.view-panel { display: flex; flex-direction: column; gap: 28px; width: 100%; }

/* ====================================================
   WELCOME HERO BANNER (LIGHT BRIXEN + BLUE ACCENT)
   ==================================================== */
.welcome-hero {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-secondary);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    margin-bottom: 4px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-left .hero-date {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-secondary);
    margin-bottom: 2px;
}

.hero-left h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 2px 0;
}

.hero-left p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

.hero-right {
    text-align: right;
    background: #f8fafc;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-width: 125px;
    flex-shrink: 0;
}

.hero-right .hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1;
}

.hero-right .hero-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 4px;
}

.hero-right .hero-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-secondary);
    margin-top: 4px;
}

/* ====================================================
   3 HORIZONTAL STATISTIC CARDS (PORTFOLIO, OVERDUE, UPCOMING)
   ==================================================== */
.stats-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.stat-card-brixen {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition);
}

.stat-card-brixen:nth-child(2) {
    background: #f0f6ff;
    border: 1px solid #cce0ff;
}

.stat-card-brixen:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--border-brand-subtle);
}

.stat-card-brixen .card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-card-brixen .card-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.stat-card-brixen .card-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-card-brixen .card-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.stat-card-brixen .card-big-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.country-badges-row {
    display: flex;
    gap: 6px;
}

.country-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.health-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.health-badge.success { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.health-badge.info    { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.health-badge.warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* ====================================================
   ORDER STATUS TRACKER SECTION HEADER & CARDS
   ==================================================== */
.tracker-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.tracker-section-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.tracker-section-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.active-orders-pill {
    padding: 6px 14px;
    background: #e0f2fe;
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

/* Horizontal 5-Stage Timeline inside Active Order Card */
.card-horizontal-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 12px 0 6px 0;
    margin: 10px 0;
}

.card-horizontal-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.stage-icon-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    border: 2px solid #ffffff;
    box-shadow: var(--shadow-subtle);
}

.timeline-stage-item.completed .stage-icon-circle {
    background: var(--status-success);
    color: #ffffff;
}

.timeline-stage-item.current .stage-icon-circle {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.stage-label-text {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.timeline-stage-item.completed .stage-label-text { color: var(--status-success); }
.timeline-stage-item.current .stage-label-text   { color: var(--brand-primary); font-weight: 800; }

/* Sub-Services Table inside Order Card */
.card-services-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-services-table th {
    padding: 8px 12px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
}

.card-services-table td {
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid #e2e8f0;
}

.card-services-table tr:last-child td {
    border-bottom: none;
}

/* Modals & Controls */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 1000; opacity: 0; transition: opacity 0.2s ease; }
.modal-overlay.active { display: flex !important; opacity: 1; }
.modal-card { background: #ffffff; border-radius: var(--radius-xl); width: 100%; max-width: 640px; padding: 28px; box-shadow: var(--shadow-elevated); display: flex; flex-direction: column; gap: 20px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-color); padding-bottom: 14px; }
.modal-header h3 { font-size: 1.25rem; font-weight: 800; }

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-3 { grid-template-columns: 1fr; }
    .orders-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; width: 100vw; }
    .welcome-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
    .hero-right { align-self: flex-start; text-align: left; }
    .stats-grid { grid-template-columns: 1fr; }
    .orders-grid { grid-template-columns: 1fr; }
    .top-header { padding: 0 16px; }
    .page-container { padding: 16px; }
}

/* ====================================================
   4 TOP STATISTIC CARDS (.stats-grid, .stat-card)
   ==================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--border-brand-subtle);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-info .label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-info .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-icon.navy   { background: #e0f2fe; color: var(--brand-primary); }
.stat-icon.purple { background: #e0f2fe; color: var(--brand-secondary); }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }

/* ====================================================
   FILTER & SEARCH CONTROLS ROW
   ==================================================== */
.orders-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin-top: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ====================================================
   DATA TABLES & CARD CONTAINERS
   ==================================================== */
.data-table-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    width: 100%;
}

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

.data-table th {
    padding: 14px 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8fafc;
}

/* ====================================================
   ORDERS GRID & ORDER CARD STYLING
   ==================================================== */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.order-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition);
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--border-brand-subtle);
}

.order-card:nth-child(1) { animation: float 6s ease-in-out infinite; animation-delay: 0s; }
.order-card:nth-child(2) { animation: float 6s ease-in-out infinite; animation-delay: 0.8s; }
.order-card:nth-child(3) { animation: float 6s ease-in-out infinite; animation-delay: 1.6s; }

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.order-number {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.01em;
}

.order-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.order-service-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.order-progress-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.progress-track {
    height: 8px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--brand-secondary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-bar.completed {
    background: var(--status-success);
}

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: 4px;
}

.delivery-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ====================================================
   STATUS BADGES & BUTTONS
   ==================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-badge.completed, .status-badge.paid, .status-badge.active, .status-badge.approved {
    background: var(--status-success-bg);
    color: var(--status-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.processing, .status-badge.in-progress, .status-badge.pending-review {
    background: var(--status-info-bg);
    color: var(--status-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.pending, .status-badge.open {
    background: var(--status-warning-bg);
    color: var(--status-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.cancelled, .status-badge.expired, .status-badge.rejected {
    background: var(--status-danger-bg);
    color: var(--status-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 2px 8px var(--brand-glow);
}

.btn-primary:hover {
    background: var(--brand-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--brand-primary);
}

.btn-details {
    padding: 6px 14px;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
}

.btn-details:hover {
    background: var(--brand-secondary);
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.page-title-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-title-text p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.select-filter {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
}
