/* ============================================
   Windows 11 Enhanced Design System
   ============================================ */

:root {
    /* Light Theme Colors */
    --mica-base: #F3F3F3;
    --mica-alt: #EBEBEB;
    --card-bg: #FFFFFF;
    --card-bg-secondary: #F9F9F9;

    /* Accent Colors with Gradient */
    --accent-default: #0067C0;
    --accent-secondary: #005FB8;
    --accent-tertiary: #004C99;
    --accent-disabled: rgba(0, 103, 192, 0.4);
    --accent-success: #107c10;
    --accent-gradient: linear-gradient(135deg, #0078D4 0%, #0067C0 100%);

    /* Text Colors */
    --text-primary: #1C1C1C;
    --text-secondary: #605E5C;
    --text-tertiary: #8A8886;
    --text-disabled: #A19F9D;
    --text-on-accent: #FFFFFF;

    /* Border & Divider */
    --divider-stroke: #E5E5E5;
    --control-stroke: #D1D1D1;
    --control-stroke-on-accent: rgba(255, 255, 255, 0.08);

    /* Elevation Shadows */
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-4: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-8: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-16: 0 8px 16px rgba(0, 0, 0, 0.14);
    --shadow-32: 0 16px 32px rgba(0, 0, 0, 0.16);
    --shadow-64: 0 32px 64px rgba(0, 0, 0, 0.18);

    /* Typography */
    --font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

    /* Type Ramp */
    --type-caption: 12px;
    --type-body: 14px;
    --type-body-strong: 14px;
    --type-body-large: 18px;
    --type-subtitle: 20px;
    --type-title: 28px;
    --type-title-large: 40px;
    --type-display: 68px;

    /* Spacing (4px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-xxl: 24px;
    --space-xxxl: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Control Heights */
    --control-height-sm: 24px;
    --control-height-md: 32px;
    --control-height-lg: 40px;

    /* Animation Durations */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;

    /* Easing Functions */
    --ease-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-accelerate: cubic-bezier(0.4, 0.0, 1, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --mica-base: #202020;
    --mica-alt: #2C2C2C;
    --card-bg: #2C2C2C;
    --card-bg-secondary: #252525;

    --text-primary: #FFFFFF;
    --text-secondary: #C8C8C8;
    --text-tertiary: #8A8886;
    --text-disabled: #6D6D6D;

    --divider-stroke: #3D3D3D;
    --control-stroke: #5D5D5D;

    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-4: 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-8: 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-16: 0 8px 16px rgba(0, 0, 0, 0.6);
    --shadow-32: 0 16px 32px rgba(0, 0, 0, 0.7);
    --shadow-64: 0 32px 64px rgba(0, 0, 0, 0.8);
}

/* ============================================
   Base Styles
   ============================================ */

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

body {
    background: linear-gradient(135deg, #e6e6e6 0%, #f7f7f7 100%);
    font-family: var(--font-family);
    color: var(--text-primary);
    font-size: var(--type-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration-slow) var(--ease-standard);
}

/* ============================================
   Window Container
   ============================================ */

.win-app {
    width: 95vw;
    height: 92vh;
    max-width: 1600px;
    max-height: 1000px;
    background: var(--mica-base);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-64);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: all var(--duration-normal) var(--ease-standard);
}

/* Mica Effect with Noise Texture */
.win-app::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   Titlebar
   ============================================ */

.win-titlebar {
    height: 48px;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    -webkit-app-region: drag;
    user-select: none;
    position: relative;
    z-index: 100;
}

.win-titlebar-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.web-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-chip-mini {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-chip-mini i {
    font-size: 16px;
    color: white;
}

.logo-text-styled-mini {
    font-size: 18px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.logo-text-styled-mini span {
    color: #3b82f6;
}

.win-titlebar .theme-toggle {
    color: rgba(255, 255, 255, 0.7);
}

.win-titlebar .theme-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.win-titlebar .win-ctrl-btn {
    color: rgba(255, 255, 255, 0.7);
}

.win-titlebar .win-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.win-titlebar .win-ctrl-btn.close:hover {
    background: #e81123;
    color: white;
}

.win-titlebar-title {
    font-size: var(--type-caption);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.01em;
}

/* Window Controls */
.win-controls {
    display: flex;
    height: 100%;
    -webkit-app-region: no-drag;
}

.win-ctrl-btn {
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-standard);
}

.win-ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.win-ctrl-btn:active {
    background: rgba(0, 0, 0, 0.08);
}

.win-ctrl-btn.close:hover {
    background: #C42B1C;
    color: white;
}

.win-ctrl-btn.close:active {
    background: #A52313;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 6px;
    right: 160px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all var(--duration-fast) var(--ease-standard);
    -webkit-app-region: no-drag;
}

.theme-toggle:hover {
    color: var(--accent-default);
    transform: rotate(20deg);
}

/* ============================================
   NavigationView with Acrylic Effect
   ============================================ */

.win-nav-view {
    width: 48px;
    background: rgba(235, 235, 235, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-right: 1px solid var(--divider-stroke);
    display: flex;
    flex-direction: column;
    transition: width var(--duration-normal) var(--ease-standard);
    position: relative;
    z-index: 10;
}

[data-theme="dark"] .win-nav-view {
    background: rgba(44, 44, 44, 0.7);
}

.win-nav-view.expanded {
    width: 230px;
}

/* Pane Toggle Button */
.nav-toggle {
    width: 48px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--duration-fast) var(--ease-standard);
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.nav-toggle:active {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(0.95);
}

/* Navigation Items */
.nav-items {
    flex: 1;
    padding: var(--space-xs) 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    margin: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    background: transparent;
    border: none;
    width: calc(100% - 8px);
    transition: all var(--duration-fast) var(--ease-standard);
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(2px);
}

.nav-item:active {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(0.98);
}

.nav-item.selected {
    background: rgba(0, 103, 192, 0.08);
}

.nav-item.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent-default);
    border-radius: 0 2px 2px 0;
    animation: slideIn var(--duration-fast) var(--ease-decelerate);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-3px);
    }

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

.nav-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform var(--duration-fast) var(--ease-standard);
}

.nav-item:hover .nav-item-icon {
    transform: scale(1.1);
}

.nav-item.selected .nav-item-icon {
    color: var(--accent-default);
}

.nav-item-label {
    margin-left: var(--space-md);
    font-size: var(--type-body);
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-standard);
}

.win-nav-view.expanded .nav-item-label {
    opacity: 1;
}

/* Settings Item (Bottom) */
.nav-footer {
    border-top: 1px solid var(--divider-stroke);
    padding: var(--space-xs) 0;
}

/* ============================================
   Main Content Area
   ============================================ */

.win-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--mica-base);
    position: relative;
    z-index: 2;
}

/* CommandBar with Gradient */
.command-bar {
    height: 48px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--divider-stroke);
    display: flex;
    align-items: center;
    padding: 0 var(--space-lg);
    justify-content: space-between;
}

.command-bar-left,
.command-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.command-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

/* Main Scrollable Area */
.win-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-lg) var(--space-xxl);
    scroll-behavior: smooth;
}

/* ============================================
   Enhanced Buttons
   ============================================ */

/* Accent Button with Gradient */
.btn-accent {
    height: var(--control-height-md);
    padding: 0 var(--space-lg);
    background: var(--accent-gradient);
    color: var(--text-on-accent);
    border: 1px solid var(--control-stroke-on-accent);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--type-body);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    overflow: hidden;
}

.btn-accent::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-standard);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-8);
}

.btn-accent:hover::before {
    opacity: 1;
}

.btn-accent:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-4);
}

.btn-accent:disabled {
    background: var(--accent-disabled);
    cursor: not-allowed;
    transform: none;
}

/* Standard Button */
.btn-standard {
    height: var(--control-height-md);
    padding: 0 var(--space-lg);
    background: var(--card-bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--control-stroke);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--type-body);
    font-weight: 400;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-standard:hover {
    background: #F3F3F3;
    border-color: #C7C7C7;
    transform: translateY(-1px);
    box-shadow: var(--shadow-4);
}

.btn-standard:active {
    background: #EBEBEB;
    transform: scale(0.98);
}

/* Text Button */
.btn-text {
    height: var(--control-height-md);
    padding: 0 var(--space-md);
    background: transparent;
    color: var(--accent-default);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--type-body);
    font-weight: 400;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
}

.btn-text:hover {
    background: rgba(0, 103, 192, 0.04);
}

.btn-text:active {
    background: rgba(0, 103, 192, 0.08);
    transform: scale(0.95);
}

/* ============================================
   Card Component
   ============================================ */

.win-card {
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.win-card-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================
   Form Controls
   ============================================ */

/* TextBox (Input) */
.text-box {
    height: var(--control-height-md);
    padding: 0 var(--space-md);
    background: var(--card-bg);
    border: 1px solid var(--control-stroke);
    border-bottom: 2px solid var(--control-stroke);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--type-body);
    color: var(--text-primary);
    outline: none;
    transition: all var(--duration-fast) var(--ease-standard);
    width: 100%;
}

.text-box:hover {
    border-color: #B3B3B3;
}

.text-box:focus {
    border-bottom-color: var(--accent-default);
    border-bottom-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.1);
}

.text-box::placeholder {
    color: var(--text-tertiary);
}

/* ComboBox (Select) */
.combo-box {
    height: var(--control-height-md);
    padding: 0 var(--space-md);
    padding-right: 32px;
    background: var(--card-bg);
    border: 1px solid var(--control-stroke);
    border-bottom: 2px solid var(--control-stroke);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: var(--type-body);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23605E5C" d="M2.15 4.65L6 8.5l3.85-3.85L9.15 4 6 7.15 2.85 4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all var(--duration-fast) var(--ease-standard);
    width: 100%;
}

.combo-box:hover {
    border-color: #B3B3B3;
}

.combo-box:focus {
    border-bottom-color: var(--accent-default);
    box-shadow: 0 0 0 2px rgba(0, 103, 192, 0.1);
}

/* ============================================
   Pivot (Tabs) with Animation
   ============================================ */

.pivot {
    display: flex;
    position: relative;
    height: 100%;
}

.pivot-item {
    padding: 0 var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-family);
    font-size: var(--type-body);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.pivot-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.pivot-item.selected {
    color: var(--accent-default);
    border-bottom-color: var(--accent-default);
}

/* ============================================
   Progress Indicator for Wizard
   ============================================ */

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin: -12px -20px 24px -20px;
    padding: 10px 20px;
    background: var(--card-bg-secondary);
    border-bottom: 1px solid var(--divider-stroke);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
    color: var(--accent-success);
}

.progress-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.progress-dot.active {
    background: var(--accent-success);
    color: white;
    border-color: var(--accent-success);
    box-shadow: 0 0 0 4px rgba(16, 124, 16, 0.15);
    animation: dotPulse 2s infinite;
}

.progress-dot.completed {
    background: var(--accent-success);
    color: white;
    border-color: var(--accent-success);
    transform: scale(1.1);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--divider-stroke);
    margin: 0 12px;
    align-self: center;
    position: relative;
    overflow: hidden;
}

.progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--accent-success);
    transition: width 0.6s ease-in-out;
}

.progress-line.completed::after {
    width: 100%;
}

@keyframes dotPulse {
    0% {
        box-shadow: 0 0 0 0px rgba(16, 124, 16, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(16, 124, 16, 0);
    }

    100% {
        box-shadow: 0 0 0 0px rgba(16, 124, 16, 0);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(0, 103, 192, 0.1);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 103, 192, 0.05);
    }
}

/* ============================================
   ListView
   ============================================ */

.list-view {
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.list-item {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--divider-stroke);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(4px);
}

.list-item:active {
    background: rgba(0, 0, 0, 0.04);
}

/* ============================================
   InfoBadge (Status) with Glow
   ============================================ */

.info-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 var(--space-sm);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: all var(--duration-fast) var(--ease-standard);
}

.info-badge.success {
    background: #DFF6DD;
    color: #107C10;
}

.info-badge.success:hover {
    box-shadow: 0 0 8px rgba(16, 124, 16, 0.3);
}

.info-badge.warning {
    background: #FFF4CE;
    color: #8A6116;
}

.info-badge.warning:hover {
    box-shadow: 0 0 8px rgba(138, 97, 22, 0.3);
}

.info-badge.error {
    background: #FDE7E9;
    color: #C42B1C;
}

.info-badge.info {
    background: #E6F3FF;
    color: #0078D4;
}

/* ============================================
   ProgressRing (Loading)
   ============================================ */

.progress-ring {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 103, 192, 0.2);
    border-top-color: var(--accent-default);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Enhanced Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 103, 192, 0.3);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background var(--duration-fast) var(--ease-standard);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 103, 192, 0.5);
    background-clip: content-box;
}

/* ============================================
   Selection Cards with Stagger Animation
   ============================================ */

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.selection-card {
    aspect-ratio: 1;
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-standard);
    font-weight: 600;
    font-size: var(--type-body);
    color: var(--text-primary);
    text-align: center;
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp var(--duration-normal) var(--ease-decelerate) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.selection-card:nth-child(1) {
    animation-delay: 0ms;
}

.selection-card:nth-child(2) {
    animation-delay: 50ms;
}

.selection-card:nth-child(3) {
    animation-delay: 100ms;
}

.selection-card:nth-child(4) {
    animation-delay: 150ms;
}

.selection-card:nth-child(5) {
    animation-delay: 200ms;
}

.selection-card:nth-child(6) {
    animation-delay: 250ms;
}

.selection-card:nth-child(7) {
    animation-delay: 300ms;
}

.selection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 103, 192, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-standard);
}

.selection-card:hover {
    border-color: var(--accent-default);
    box-shadow: var(--shadow-16);
    transform: translateY(-4px) scale(1.02);
}

.selection-card:hover::before {
    opacity: 1;
}

.selection-card:active {
    transform: translateY(-2px) scale(1);
}

.selection-card.selected {
    background: rgba(0, 103, 192, 0.12);
    border-color: var(--accent-default);
    border-width: 2.5px;
    box-shadow: 0 0 15px rgba(0, 103, 192, 0.2);
    transform: scale(1.05);
}

/* Glassmorphism for cards */
.selection-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .selection-card {
    background: rgba(44, 44, 44, 0.6);
}

/* Staggered Animations */
.selection-card:nth-child(n+1) {
    animation-delay: calc(var(--index, 0) * 50ms);
}


/* Manufacturer Logos */
.selection-card-logo {
    width: 80px;
    height: 48px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 6px;
    box-shadow: var(--shadow-2);
    transition: transform var(--duration-normal) var(--ease-standard);
}

.selection-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.selection-card:hover .selection-card-logo {
    transform: scale(1.1) rotate(-2deg);
}

/* Brand specific accents (optional addition) */
.manufacturer-card[data-name*="HP"] {
    border-bottom: 3px solid #0096D6;
}

.manufacturer-card[data-name*="Samsung"] {
    border-bottom: 3px solid #1428a0;
}

.manufacturer-card[data-name*="Xerox"] {
    border-bottom: 3px solid #ff0000;
}

.manufacturer-card[data-name*="Pantum"] {
    border-bottom: 3px solid #ee1c25;
}

.manufacturer-card[data-name*="Dell"] {
    border-bottom: 3px solid #0085c3;
}

/* Tooltip Premium Look */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: help;
    font-size: 14px;
    padding: 2px;
    transition: all var(--duration-fast) var(--ease-standard);
}

/* Info Banner */
.info-banner {
    background: linear-gradient(90deg, rgba(0, 103, 192, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--accent-default);
    padding: 16px var(--space-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-xxl);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.info-banner i {
    font-size: 24px;
    color: var(--accent-default);
}

/* Premium Balance Pill */
.premium-balance-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 8px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.premium-balance-pill:hover {
    transform: translateY(-1px) scale(1.02);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--accent-default);
}

.balance-icon-container {
    width: 28px;
    height: 28px;
    background: var(--accent-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 10px rgba(0, 103, 192, 0.3);
    position: relative;
}

.balance-icon-container i {
    font-size: 14px;
    z-index: 1;
}

.balance-icon-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
}

.balance-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.balance-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    line-height: 1;
    margin-bottom: 2px;
}

.balance-amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-default);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.balance-currency {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}


.tooltip-premium {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    box-shadow: var(--shadow-16);
    padding: 12px;
    border-radius: 8px;
    width: 220px;
    font-size: 12px;
    color: var(--text-secondary);
    z-index: 1001;
    display: none;
    animation: fadeInUp 0.2s var(--ease-decelerate);
}

.tooltip-premium::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--divider-stroke) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-premium {
    display: block;
}

/* ============================================
   Loading Overlay
   ============================================ */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    gap: var(--space-lg);
}

#loading-overlay .progress-ring {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

#loading-overlay .loading-text {
    color: white;
    font-size: var(--type-body);
    font-weight: 600;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-caption {
    font-size: var(--type-caption);
}

.text-body {
    font-size: var(--type-body);
}

.text-body-strong {
    font-size: var(--type-body-strong);
    font-weight: 600;
}

.text-subtitle {
    font-size: var(--type-subtitle);
    font-weight: 600;
}

.text-title {
    font-size: var(--type-title);
    font-weight: 600;
}

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

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

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

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mb-xxl {
    margin-bottom: var(--space-xxl);
}

/* ============================================
   Skeleton Loader
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, var(--card-bg-secondary) 25%, var(--divider-stroke) 50%, var(--card-bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 140px;
    width: 100%;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: var(--space-sm);
}

/* ============================================
   Tooltip Button
   ============================================ */

.tooltip-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: help;
    font-size: 14px;
    padding: 0;
    transition: all var(--duration-fast) var(--ease-standard);
    position: relative;
}

.tooltip-btn:hover {
    color: var(--accent-default);
    transform: scale(1.1);
}

.tooltip-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-standard);
    z-index: 1000;
    box-shadow: var(--shadow-16);
}

.tooltip-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-standard);
    z-index: 1000;
}

.tooltip-btn:hover::after,
.tooltip-btn:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Validation Icons
   ============================================ */

.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: all var(--duration-fast) var(--ease-standard);
}

.validation-icon.valid {
    color: #107C10;
}

.validation-icon.valid::before {
    content: '✓';
    font-weight: bold;
}

.validation-icon.invalid {
    color: #C42B1C;
}

.validation-icon.invalid::before {
    content: '✗';
    font-weight: bold;
}

/* ============================================
   Compact Model Cards
   ============================================ */

.model-card-compact {
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-card-compact:hover {
    border-color: var(--accent-default);
    background: rgba(0, 103, 192, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-4);
}

/* ============================================
   News & Promotions Modules
   ============================================ */

.secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xxl);
    margin-top: var(--space-xxxl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .secondary-grid {
        grid-template-columns: 1fr;
    }
}

.news-section,
.promo-section {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-4);
    transition: all var(--duration-normal) var(--ease-standard);
}

.news-section:hover,
.promo-section:hover {
    box-shadow: var(--shadow-8);
    border-color: rgba(0, 103, 192, 0.2);
}

/* News Feed Styling */
.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.news-item {
    padding: var(--space-md);
    background: var(--card-bg);
    border: 1px solid var(--divider-stroke);
    border-radius: var(--radius-md);
    display: flex;
    gap: var(--space-md);
    transition: all var(--duration-fast) var(--ease-standard);
    cursor: default;
}

.news-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-8);
    border-color: var(--accent-default);
}

.news-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 103, 192, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-default);
    flex-shrink: 0;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.news-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.news-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Promotion Cards Styling */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
}

.promo-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(0, 103, 192, 0.08) 0%, rgba(0, 103, 192, 0.02) 100%);
    border: 1px solid rgba(0, 103, 192, 0.15);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-standard);
    cursor: pointer;
}

.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 103, 192, 0.1);
    border-color: var(--accent-default);
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(30deg);
    pointer-events: none;
    transition: all 0.5s ease;
}

.promo-card:hover::before {
    top: -20%;
    left: -20%;
}

.promo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.promo-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-default);
    margin-bottom: 8px;
}

.promo-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.promo-footer {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-default);
    display: flex;
    align-items: center;
    gap: 4px;
}