/* --- CSS Variables & Design Tokens --- */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-ai: #ec4899;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --ai-gradient: linear-gradient(135deg, var(--accent-secondary), var(--accent-ai));
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-bg-hover: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input,
textarea,
select {
    font-family: inherit;
    outline: none;
}

.hidden {
    display: none !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.text-secondary {
    color: var(--text-secondary);
}

.block {
    display: block;
}

/* --- BG Shapes --- */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    transition: all 1s ease;
}

.shape-1 {
    top: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
}

.shape-3 {
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.15);
}

/* --- Navigation & Tabs --- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
}

.accent-dot {
    color: var(--accent-primary);
}

.b2b-dashboard {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
}

.company-badge i {
    color: var(--accent-primary);
}

.view-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.view-tab {
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
}

.view-tab:hover {
    color: var(--text-primary);
}

.view-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* --- Basic UI --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    padding: var(--spacing-lg);
}

.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.glass-btn:hover:not(:disabled) {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
}

.primary-btn {
    background: var(--accent-gradient);
    border: none;
}

.primary-btn:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
}

.icon-only {
    padding: 0.6rem;
    border-radius: 50%;
}

.glass-input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    width: 100%;
    transition: all var(--transition-fast);
}

.glass-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* --- Login --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: var(--bg-darker);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.login-header {
    text-align: center;
}

.login-header h2 {
    font-size: 1.5rem;
    margin: var(--spacing-sm) 0;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.login-hint {
    display: block;
    margin-top: var(--spacing-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.w-full {
    width: 100%;
}

.justify-center {
    justify-content: center;
}

/* --- Catalog View --- */
.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 110px var(--spacing-lg) var(--spacing-xl);
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.page-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    padding-right: 1rem;
}

.budget-widget {
    min-width: 300px;
    padding: var(--spacing-md) var(--spacing-lg);
}

.budget-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.budget-amount {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-primary);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-success);
    width: 0%;
    transition: width 0.5s ease;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.category-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.category-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    padding-left: 2.75rem;
    border-radius: var(--radius-full);
}

/* PRODUCT CARDS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.product-image-container {
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--spacing-md);
    transition: transform 0.3s;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* FIXED BADGES CSS */
.category-badge,
.smart-badge {
    position: absolute;
    top: 10px;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.category-badge {
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.smart-badge {
    right: 10px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-ai));
    color: white;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: none;
}

.product-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    line-height: 1.3;
}

.cart-item-features {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.vol-badge {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
    font-size: 0.65rem;
    border: 1px solid var(--accent-success);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 4px;
    white-space: nowrap;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: monospace;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.glass-modal {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
}

.modal-title {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    background: rgba(15, 23, 42, 0.4);
}

.icon-btn {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

/* --- UNIVERSAL PRODUCT DETAIL MODAL --- */
.mockup-modal {
    max-width: 1000px;
    width: 95%;
}

.mockup-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

@media (max-width: 800px) {
    .mockup-layout {
        grid-template-columns: 1fr;
    }
}

.mockup-preview-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease;
}

.mockup-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    padding: 2rem;
    transition: all 0.5s;
    z-index: 1;

}

/* AI LOADING ANIMATION (Generative Image) */
.canvas-container.ai-loading {
    border-color: var(--accent-ai);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.2) inset;
}

.canvas-container.ai-loading .mockup-base {
    filter: blur(10px) brightness(0.5);
    transform: scale(0.95);
}

.canvas-container.ai-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(236, 72, 153, 0.3), transparent);
    animation: scanAI 1.5s infinite linear;
}

@keyframes scanAI {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.canvas-container.ai-success {
    border-color: var(--accent-success);
}

.canvas-container.ai-success .mockup-base {
    filter: none;
    padding: 0;
    transform: scale(1);
    animation: spawnImage 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes spawnImage {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.mockup-controls {
    display: flex;
    flex-direction: column;
}

.detail-header-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mockup-price {
    font-size: 1.8rem;
    color: var(--accent-success);
    font-family: monospace;
    transition: color 0.3s;
}

.detail-sku {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.spec-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.inventory-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.inventory-badge.loading {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.inventory-badge.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: greenPulse 2s infinite;
}

@keyframes greenPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

.color-options {
    display: flex;
    gap: 0.75rem;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.color-circle.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.color-circle.selected {
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

/* AI Upload Zone */
.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--accent-ai);
    background: rgba(236, 72, 153, 0.05);
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* DYNAMIC PRICING CONFIGURATOR */
.size-configurator {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.size-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-radio-label {
    cursor: pointer;
    display: block;
}

.size-radio-label input {
    display: none;
}

.size-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.pill-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pill-price {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.size-radio-label input:checked+.size-pill {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary);
    box-shadow: inset 0 0 0 1px var(--accent-primary);
}

.size-radio-label input:checked+.size-pill .pill-title {
    color: var(--accent-primary);
}

.size-radio-label input:checked+.size-pill .pill-price {
    color: var(--text-primary);
    font-weight: 600;
}

.size-radio-label:hover .size-pill {
    background: rgba(255, 255, 255, 0.08);
}

.action-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-end;
    margin-top: auto;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.qty-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.qty-input {
    width: 80px;
    text-align: center;
    font-size: 1.1rem;
}

.flex-1 {
    flex: 1;
    justify-content: center;
}


/* --- CSS FOR PHASE 9: ADVANCED TRACKING (PO & TABS) --- */

/* Tracking Navigation Tabs */
.tracker-nav-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.track-tab {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.track-tab:hover {
    color: var(--text-primary);
}

.track-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* PO Badge inside tracker card header */
.po-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    font-family: monospace;
    font-size: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-left: 10px;
    vertical-align: middle;
}

/* Historic Table */
.historic-table-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    padding: 1px;
}

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

.historic-table th {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.2);
}

.historic-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

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

.historic-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Original Timeline Tracking */
.tracking-badge {
    background: var(--accent-danger);
    color: white;
    border-radius: 50%;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    position: absolute;
    top: -5px;
    right: -5px;
}

.orders-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.tracker-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--spacing-md);
}

.order-info h3 {
    font-size: 1.1rem;
}

.order-meta {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.order-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-success);
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: var(--spacing-sm);
}

.timeline::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.timeline-progress {
    position: absolute;
    top: 22px;
    left: 10%;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 2px;
    z-index: 2;
    transition: width 0.5s ease;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    position: relative;
    width: 80px;
    text-align: center;
}

.timeline-step::before {
    content: '';
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: block;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timeline-step.completed::before {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.timeline-step.active::before {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.empty-orders {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.empty-orders i {
    font-size: 3rem;
    opacity: 0.5;
}

/* --- AI KIT BUILDER --- */
.ai-fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--ai-gradient);
    color: white;
    border-radius: var(--radius-full);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
    z-index: 90;
    transition: transform 0.2s;
}

.ai-fab-btn:hover {
    transform: scale(1.05);
}

.ai-modal {
    max-width: 450px;
    height: 600px;
    max-height: 80vh;
}

.chat-container {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    overflow-y: auto;
}

.chat-message {
    max-width: 90%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bot-msg {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.user-msg {
    background: var(--accent-primary);
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-input-area {
    display: flex;
    gap: var(--spacing-sm);
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

/* AI Suggestions Styling */
.ai-kit-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.kit-images-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
    padding-bottom: 5px;
}

.kit-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px;
}

.kit-details h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--accent-ai);
}

.kit-ul {
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.kit-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

.kit-total-price {
    font-family: monospace;
    font-weight: 700;
    color: var(--text-primary);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* --- Cart & Success Overlays --- */
.cart-items {
    min-height: 100px;
}

.cart-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.cart-item-img {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 4px;
    object-fit: contain;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
}

.size-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-size: 0.65rem;
    margin-left: 5px;
    font-weight: 600;
    vertical-align: middle;
}

.cart-item-price {
    font-family: monospace;
    color: var(--accent-success);
    font-size: 0.85rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.item-total-price {
    font-weight: 600;
    font-family: monospace;
    width: 80px;
    text-align: right;
}

.cart-summary {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--glass-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.total-row {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-success);
    margin-top: var(--spacing-sm);
}

.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--accent-success);
    margin-bottom: var(--spacing-md);
}