/*
 * Plus Light Tech - Custom CSS Overrides
 * Additional styles beyond Tailwind utilities
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */

:root {
    /* Primary Colors - Sky Blue Theme */
    --color-primary-50: #f0f9ff;
    --color-primary-100: #e0f2fe;
    --color-primary-200: #bae6fd;
    --color-primary-300: #7dd3fc;
    --color-primary-400: #38bdf8;
    --color-primary-500: #0ea5e9;
    --color-primary-600: #0284c7;
    --color-primary-700: #0369a1;
    --color-primary-800: #075985;
    --color-primary-900: #0c4a6e;

    /* Neutral Colors - Slate */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;

    /* Semantic Colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 72px;
    --header-height: 64px;
    --content-max-width: 1440px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Z-index Layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-tooltip: 600;
    --z-toast: 700;

    /* Light Mode Defaults */
    --bg-primary: #ffffff;
    --bg-secondary: var(--color-slate-50);
    --bg-tertiary: var(--color-slate-100);
    --text-primary: var(--color-slate-900);
    --text-secondary: var(--color-slate-500);
    --text-muted: var(--color-slate-400);
    --border-color: var(--color-slate-200);
    --border-color-light: var(--color-slate-100);
}

/* Dark Mode Overrides */
.dark {
    --bg-primary: var(--color-slate-900);
    --bg-secondary: var(--color-slate-800);
    --bg-tertiary: var(--color-slate-700);
    --text-primary: var(--color-slate-100);
    --text-secondary: var(--color-slate-400);
    --text-muted: var(--color-slate-500);
    --border-color: var(--color-slate-700);
    --border-color-light: var(--color-slate-800);
}

/* ============================================
   Font Face Declarations
   ============================================ */

/* Import from CDN in HTML, but define fallbacks here */
.font-display {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ============================================
   Data Display Styles (for specs, prices, codes)
   ============================================ */

.data-value {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.price-value {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.code-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.dark .code-value {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Sidebar Enhancements
   ============================================ */

.sidebar-logo {
    height: 40px;
    width: auto;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-logo {
    height: 32px;
}

.sidebar-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-nav-text {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar.collapsed .sidebar-nav-text {
    opacity: 0;
    transform: translateX(-10px);
    position: absolute;
}

.sidebar-tooltip {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    padding: 6px 12px;
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1e293b;
}

.sidebar.collapsed .sidebar-nav-item:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Search Command Palette
   ============================================ */

.search-modal {
    max-width: 600px;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input-wrapper input {
    padding-left: 48px;
    padding-right: 80px;
}

.search-shortcut {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #64748b;
}

.dark .kbd {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

/* ============================================
   Data Table Enhancements
   ============================================ */

.table-sortable th {
    cursor: pointer;
    user-select: none;
}

.table-sortable th:hover {
    background-color: #f1f5f9;
}

.dark .table-sortable th:hover {
    background-color: #1e293b;
}

.sort-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 4px;
    font-size: 7px;
    line-height: 1;
    gap: 0;
    opacity: 0.3;
}

.sort-indicator .arrow-up,
.sort-indicator .arrow-down {
    line-height: 1;
}

.sort-indicator.asc .arrow-up,
.sort-indicator.desc .arrow-down {
    opacity: 1;
}

th:hover .sort-indicator {
    opacity: 0.6;
}

.table-row-selected {
    background-color: #eff6ff !important;
}

.dark .table-row-selected {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* ============================================
   Product Image Gallery
   ============================================ */

.product-gallery {
    display: grid;
    gap: 12px;
}

.product-gallery-main {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 12px;
    background: #EAEAEA;
}

.dark .product-gallery-main {
    background: #EAEAEA;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-gallery-main:hover img {
    transform: scale(1.05);
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.product-gallery-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-gallery-thumb:hover {
    border-color: #cbd5e1;
}

.product-gallery-thumb.active {
    border-color: #0ea5e9;
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Drag and Drop Upload Zone
   ============================================ */

.upload-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dark .upload-zone {
    border-color: #475569;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

.upload-zone.drag-over {
    transform: scale(1.01);
}

.upload-zone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #94a3b8;
}

.upload-zone:hover .upload-zone-icon {
    color: #0ea5e9;
}

/* ============================================
   Charts Container
   ============================================ */

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container canvas {
    max-height: 100%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    justify-content: center;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ============================================
   Form Multi-Step Wizard
   ============================================ */

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e2e8f0;
}

.dark .wizard-steps::before {
    background: #475569;
}

.wizard-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: white;
    border: 2px solid #e2e8f0;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.dark .wizard-step-number {
    background: #1e293b;
    border-color: #475569;
}

.wizard-step.active .wizard-step-number {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.wizard-step.completed .wizard-step-number {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
}

.wizard-step-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    max-width: 100px;
}

.wizard-step.active .wizard-step-label,
.wizard-step.completed .wizard-step-label {
    color: #0f172a;
}

.dark .wizard-step.active .wizard-step-label,
.dark .wizard-step.completed .wizard-step-label {
    color: #f1f5f9;
}

/* ============================================
   Import Preview Table
   ============================================ */

.import-preview {
    max-height: 400px;
    overflow: auto;
}

.import-row-valid {
    background-color: rgba(34, 197, 94, 0.05);
}

.import-row-error {
    background-color: rgba(239, 68, 68, 0.05);
}

.import-row-warning {
    background-color: rgba(245, 158, 11, 0.05);
}

.import-cell-error {
    border: 1px solid #ef4444;
    border-radius: 4px;
}

/* ============================================
   Datasheet Preview
   ============================================ */

.datasheet-preview {
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.datasheet-preview-content {
    aspect-ratio: 8.5/11;
    padding: 24px;
    font-size: 10px;
}

/* ============================================
   Activity Timeline
   ============================================ */

.activity-timeline {
    position: relative;
    padding-left: 32px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.dark .activity-timeline::before {
    background: #475569;
}

.activity-item {
    position: relative;
    padding-bottom: 24px;
}

.activity-item:last-child {
    padding-bottom: 0;
}

.activity-dot {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
}

.dark .activity-dot {
    background: #1e293b;
    border-color: #475569;
}

.activity-item.create .activity-dot {
    border-color: #22c55e;
    background: #dcfce7;
}

.activity-item.update .activity-dot {
    border-color: #3b82f6;
    background: #dbeafe;
}

.activity-item.delete .activity-dot {
    border-color: #ef4444;
    background: #fee2e2;
}

/* ============================================
   Notification Bell Animation
   ============================================ */

.notification-bell {
    position: relative;
}

.notification-bell.has-notifications::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.dark .notification-bell.has-notifications::after {
    border-color: #1e293b;
}

@keyframes bell-ring {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-bell.ringing svg {
    animation: bell-ring 0.5s ease;
}

/* ============================================
   Status Indicators
   ============================================ */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.status-dot.offline {
    background: #94a3b8;
}

.status-dot.away {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.status-dot.busy {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ============================================
   Skeleton Loading
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #f1f5f9 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.dark .skeleton {
    background: linear-gradient(
        90deg,
        #334155 25%,
        #475569 50%,
        #334155 75%
    );
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 4/3;
}

/* ============================================
   Responsive Utilities
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 30;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar.mobile-open + .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   Quick Actions Bar
   ============================================ */

.quick-actions-bar {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-action-btn {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.quick-action-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 640px) {
    .quick-actions-bar {
        flex-direction: column;
    }

    .quick-action-btn {
        justify-content: flex-start;
        min-width: 100%;
    }
}

/* ============================================
   Compact Stats Grid
   ============================================ */

.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

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

@media (max-width: 640px) {
    .stats-grid-compact {
        grid-template-columns: 1fr;
    }
}

.stat-card-compact {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

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

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

.stat-card-compact .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
}

.stat-card-compact .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.stat-card-compact .stat-trend {
    font-size: 0.6875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 6px;
}

.stat-trend.trend-up {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.stat-trend.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ============================================
   Inline Filter Bar (Compact)
   ============================================ */

.filter-bar-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.filter-bar-inline .search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-bar-inline .search-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.filter-bar-inline .search-input {
    width: 100%;
    padding: 8px 12px 8px 40px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
}

.filter-bar-inline .search-input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.filter-bar-inline .filter-select {
    padding: 8px 32px 8px 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    cursor: pointer;
    min-width: 140px;
}

.view-toggle-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.view-toggle-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
    background: var(--bg-secondary);
}

.view-toggle-btn.active {
    background: var(--color-primary-600);
    color: white;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Form Wizard Sidebar Navigation
   ============================================ */

.wizard-layout {
    display: flex;
    gap: 24px;
}

.wizard-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.wizard-sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wizard-sidebar-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wizard-sidebar-step:hover {
    background: var(--bg-secondary);
}

.wizard-sidebar-step.active {
    background: var(--color-primary-50);
}

.dark .wizard-sidebar-step.active {
    background: rgba(14, 165, 233, 0.1);
}

.wizard-sidebar-step .step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.wizard-sidebar-step.active .step-number {
    border-color: var(--color-primary-600);
    color: var(--color-primary-600);
}

.wizard-sidebar-step.completed .step-number {
    background: var(--color-primary-600);
    border-color: var(--color-primary-600);
    color: white;
}

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

.wizard-sidebar-step.active .step-label,
.wizard-sidebar-step.completed .step-label {
    color: var(--text-primary);
}

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

.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
}

.wizard-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 16px;
    margin: 16px -16px -16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 1024px) {
    .wizard-layout {
        flex-direction: column;
    }

    .wizard-sidebar {
        width: 100%;
    }

    .wizard-sidebar-steps {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .wizard-sidebar-step {
        flex-shrink: 0;
        min-width: fit-content;
    }

    .wizard-sidebar-step .step-label {
        display: none;
    }
}

/* ============================================
   Product Detail Styles
   ============================================ */

.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
    }
}

.quick-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
}

@media (max-width: 640px) {
    .quick-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-spec-card {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--border-radius);
    text-align: center;
}

.quick-spec-card .spec-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.quick-spec-card .spec-value {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.price-highlight-card {
    background: linear-gradient(135deg, var(--color-primary-50), #e0f2fe);
    border: 1px solid var(--color-primary-100);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.dark .price-highlight-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(14, 165, 233, 0.05));
    border-color: rgba(14, 165, 233, 0.3);
}

/* Sticky Tabs */
.sticky-tabs-container {
    position: sticky;
    top: var(--header-height);
    background: var(--bg-primary);
    z-index: var(--z-sticky);
    border-bottom: 1px solid var(--border-color);
    margin: 0 -24px;
    padding: 0 24px;
}

/* Market Switcher */
.market-switcher-bar {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow-x: auto;
}

.market-switch-btn {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.market-switch-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.dark .market-switch-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.market-switch-btn.active {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

/* Certification Cards */
.cert-card-regional {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
}

.cert-card-regional.india {
    background: linear-gradient(135deg, rgba(255, 153, 51, 0.05), rgba(255, 153, 51, 0.02));
    border-color: rgba(255, 153, 51, 0.2);
}

.cert-card-regional.us {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.02));
    border-color: rgba(59, 130, 246, 0.2);
}

.cert-card-regional.eu {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.02));
    border-color: rgba(99, 102, 241, 0.2);
}

.cert-card-regional.uk {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.02));
    border-color: rgba(220, 38, 38, 0.2);
}

/* ============================================
   Import Page Styles
   ============================================ */

.import-steps-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.import-step-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.import-step-item.active {
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-200);
}

.dark .import-step-item.active {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

.import-step-item .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.import-step-item.active .step-num {
    background: var(--color-primary-600);
    color: white;
}

.import-step-item.completed .step-num {
    background: var(--color-success);
    color: white;
}

.template-download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.template-download-card .template-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .import-steps-indicator {
        flex-direction: column;
    }

    .import-step-item .step-info {
        display: none;
    }
}

/* ============================================
   Settings Page Styles
   ============================================ */

.settings-layout-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.settings-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.settings-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.settings-nav-link.active {
    background: var(--color-primary-50);
    color: var(--color-primary-600);
}

.dark .settings-nav-link.active {
    background: rgba(14, 165, 233, 0.1);
}

.settings-nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.settings-section-panel {
    display: none;
}

.settings-section-panel.active {
    display: block;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--color-slate-300);
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dark .toggle-switch {
    background: var(--color-slate-600);
}

.toggle-switch.active {
    background: var(--color-primary-600);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-row:last-child {
    border-bottom: none;
}

.avatar-upload-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    flex-shrink: 0;
}

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

    .settings-nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .settings-nav-link {
        white-space: nowrap;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .no-print,
    .sidebar,
    .header,
    button,
    .btn {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: none !important;
        color: inherit !important;
    }

    .table {
        font-size: 10pt;
    }
}

/* ============================================
   Modal Overlay and Dropdown Styles
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.dark .modal {
    background: #1e293b;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    left: 0;
    margin-top: 8px;
    min-width: 200px;
    max-height: 280px;
    overflow: auto;
    padding: 4px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.dark .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    color: #475569;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: background-color 0.15s ease;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    border: none;
    background: none;
}

.dark .dropdown-item {
    color: #cbd5e1;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

.dark .dropdown-item:hover {
    background-color: #334155;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
}

.dropdown-item.active {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.dark .dropdown-item.active {
    background-color: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
}

.dropdown-item.active::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 700;
}

.dropdown-item-none {
    border-bottom: 1px solid #e2e8f0;
    color: #94a3b8;
    font-style: italic;
}

.dark .dropdown-item-none {
    border-bottom-color: #334155;
    color: #64748b;
}

.dropdown-item-none.active {
    background-color: transparent;
    color: #94a3b8;
    font-weight: 400;
}

.dark .dropdown-item-none.active {
    background-color: transparent;
    color: #64748b;
}

.dropdown-item-none.active::after {
    content: none;
}

.dropdown-empty {
    padding: 10px 16px;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

.sidebar.collapsed .collapse-icon {
    display: none;
}

.sidebar.collapsed .expand-icon {
    display: block !important;
}

.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* No scrollbar for sidebar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   Original Dashboard Sidebar Styles
   ============================================ */

/* Sidebar collapse button */
.collapse-btn {
    position: absolute;
    right: -12px;
    top: 24px;
    width: 24px;
    height: 24px;
    background: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background 0.2s ease;
    border: none;
}

.collapse-btn:hover {
    background: #0369a1;
}

.collapse-btn svg {
    width: 14px;
    height: 14px;
    color: white;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .collapse-btn svg {
    transform: rotate(180deg);
}

/* Sidebar collapsed states */
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .theme-label,
.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .logo-section {
    justify-content: center;
}

.sidebar.collapsed .theme-toggle-btn {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .user-section {
    justify-content: center;
}

/* Mobile sidebar */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .collapse-btn {
        display: none !important;
    }
    
    .sidebar.mobile-open .nav-label,
    .sidebar.mobile-open .logo-text,
    .sidebar.mobile-open .theme-label,
    .sidebar.mobile-open .user-info {
        display: block;
    }
    
    .sidebar.mobile-open .sidebar-nav-item {
        justify-content: flex-start;
        padding: 12px 16px;
    }
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 30;
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 1024px) {
    .main-content,
    .main-content.expanded {
        margin-left: 0 !important;
    }
}

/* ============================================
   Toast / Alert Components
   ============================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background-color: #fde047;
    color: #000000;
    border-color: #facc15;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Dark mode overrides */
.dark .alert-success {
    background-color: rgba(22, 101, 52, 0.2);
    color: #86efac;
    border-color: #166534;
}

.dark .alert-error {
    background-color: rgba(153, 27, 27, 0.2);
    color: #fca5a5;
    border-color: #991b1b;
}

.dark .alert-warning {
    background-color: #facc15;
    color: #000000;
    border-color: #eab308;
}

.dark .alert-info {
    background-color: rgba(30, 64, 175, 0.2);
    color: #93c5fd;
    border-color: #1e40af;
}

/* ── WYSIWYG / prose content — restore list styles stripped by CSS reset ── */
.prose ol, .prose ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.prose ol {
    list-style-type: decimal;
}
.prose ul {
    list-style-type: disc;
}
.prose li {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    line-height: 1.6;
}
