/**
 * Trade-In Submit Wizard Styles
 * Modern Apple-style design with dark theme
 */

/* Import Figtree and Inter fonts */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables - Dark Theme (Default) */
:root,
[data-bs-theme="dark"] {
    --ti-bg-dark: #1a1d21;
    --ti-bg-card: #2a2d31;
    --ti-bg-card-hover: #32363b;
    --ti-text-primary: #ffffff;
    --ti-text-secondary: #9ca3af;
    --ti-text-muted: #6b7280;
    --ti-accent-blue: #0066FF;
    --ti-accent-blue-hover: #0052CC;
    --ti-accent-green: #10B981;
    --ti-accent-red: #EF4444;
    --ti-accent-yellow: #F59E0B;
    --ti-accent-pink: #EC4899;
    --ti-accent-orange: #F97316;
    --ti-border-color: #3a3d41;
    --ti-border-radius: 12px;
    --ti-border-radius-lg: 16px;
    --ti-transition: all 0.3s ease;
    --ti-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    --ti-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* CSS Variables - Light Theme */
[data-bs-theme="light"] {
    --ti-bg-dark: #ffffff;
    --ti-bg-card: #f8f9fa;
    --ti-bg-card-hover: #e9ecef;
    --ti-text-primary: #1a1d21;
    --ti-text-secondary: #4a5568;
    --ti-text-muted: #718096;
    --ti-accent-blue: #0066FF;
    --ti-accent-blue-hover: #0052CC;
    --ti-accent-green: #10B981;
    --ti-accent-red: #EF4444;
    --ti-accent-yellow: #F59E0B;
    --ti-accent-pink: #EC4899;
    --ti-accent-orange: #F97316;
    --ti-border-color: #dee2e6;
    --ti-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ti-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
/* Prevent double scrollbar: body does not scroll, ti-main is the scroll container */
html {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--ti-bg-dark) !important;
    color: var(--ti-text-primary);
    font-family: 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100%;
    height: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

body * {
    box-sizing: border-box;
}

/* Main Container - scroll area with hidden scrollbar to avoid double scrollbar with dropdowns */
.ti-main {
    height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
    padding: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.ti-main::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.ti-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ti-container--with-summary {
    max-width: 1240px;
}

/* Wizard Container */
.ti-wizard {
    position: relative;
    min-height: 500px;
}

.ti-wizard--with-summary {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

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

/* ============================================
   Summary Sidebar - Floating left from Step 2
   ============================================ */
.ti-summary-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    background: #ffffff;
    /* 移除实体边框，使用阴影代替边界 */
    border: none;
    border-radius: 20px; /* 更圆润的角 */
    /* 强烈的弥散阴影，制造悬浮感 */
    box-shadow: 
        0 10px 40px -10px rgba(0, 0, 0, 0.08),
        0 0 20px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.02); /* 微弱的内描边替代边框 */
    overflow: hidden;
    z-index: 10;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .ti-summary-sidebar {
    background: #25282c; /* 稍微提亮背景 */
    /* 深色模式下的悬浮阴影 */
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.ti-summary-header {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1d21;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .ti-summary-header {
    color: #f3f4f6;
    background: #25282c;
    border-color: rgba(255, 255, 255, 0.05);
}

.ti-summary-sections {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.ti-summary-section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .ti-summary-section {
    border-color: rgba(255, 255, 255, 0.08);
}

.ti-summary-section:last-child {
    border-bottom: none;
}

.ti-summary-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1d21;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

[data-bs-theme="dark"] .ti-summary-section-header {
    color: #f3f4f6;
}

.ti-summary-section-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .ti-summary-section-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.ti-summary-section-header span {
    flex: 1;
}

.ti-summary-section-icon {
    color: #6b7280;
    font-size: 0.85rem;
}

[data-bs-theme="dark"] .ti-summary-section-icon {
    color: #9ca3af;
}

.ti-summary-chevron {
    color: #6b7280;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

[data-bs-theme="dark"] .ti-summary-chevron {
    color: #9ca3af;
}

.ti-summary-section-body {
    padding: 0 16px 12px 44px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

.ti-summary-section.collapsed .ti-summary-section-body {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.ti-summary-content {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.5;
}

[data-bs-theme="dark"] .ti-summary-content {
    color: #9ca3af;
}

.ti-summary-content.ti-summary-empty {
    color: #9ca3af;
    font-style: italic;
}

.ti-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.ti-summary-row span:first-child {
    color: #6b7280;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .ti-summary-row span:first-child {
    color: #9ca3af;
}

.ti-summary-row span:last-child {
    color: #4b5563;
    text-align: right;
    word-break: break-word;
}

[data-bs-theme="dark"] .ti-summary-row span:last-child {
    color: #d1d5db;
}

/* Step Container */
.ti-step {
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Page Title */
.ti-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ti-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.ti-page-subtitle {
    font-size: 1rem;
    color: var(--ti-text-secondary);
    margin-bottom: 32px;
}

/* Step Title */
.ti-step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ti-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.ti-step-subtitle {
    font-size: 1rem;
    color: var(--ti-text-secondary);
    margin-bottom: 24px;
}

/* Welcome / Pre-Intro Step - Modern, Apple-easy, black/white/blue, Inter font */
.ti-step-welcome {
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 40px 20px 48px;
    max-width: 640px;
    margin: 0 auto;
}

/* Ex-Demo link: subtle text link below Let's Go, no size change on hover */
.ti-welcome-exdemo-link {
    display: block;
    margin-top: 20px;
    font-size: 0.8125rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s;
}
.ti-welcome-exdemo-link:hover {
    color: var(--ti-accent-blue);
}

.ti-welcome-hero {
    text-align: center;
    margin-bottom: 40px;
}

.ti-welcome-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 255, 0.1); /* Pastel blue */
    border-radius: 28px; /* Slightly rounder */
    color: #0066FF; /* Icon color matches brand blue */
    font-size: 2.25rem;
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15); /* Soft shadow */
}

[data-bs-theme="dark"] .ti-welcome-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.ti-welcome-title {
    font-family: 'Inter', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #1a1d21 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

[data-bs-theme="dark"] .ti-welcome-title {
    background: linear-gradient(135deg, #f3f4f6 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ti-welcome-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

[data-bs-theme="dark"] .ti-welcome-subtitle {
    color: #9ca3af;
}

/* Step cards grid - rounder rectangles, flat design */
.ti-welcome-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 48px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 520px) {
    .ti-welcome-steps-grid {
        grid-template-columns: 1fr;
    }
}

.ti-welcome-step-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .ti-welcome-step-card {
    background: #1f2937;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ti-welcome-step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.ti-welcome-step-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Pastel backgrounds with solid icons */
.ti-welcome-step-blue .ti-welcome-step-icon { 
    background: rgba(0, 102, 255, 0.1); 
    color: #0066FF;
}
.ti-welcome-step-green .ti-welcome-step-icon { 
    background: rgba(16, 185, 129, 0.1); 
    color: #10B981;
}
.ti-welcome-step-orange .ti-welcome-step-icon { 
    background: rgba(249, 115, 22, 0.1); 
    color: #F97316;
}
.ti-welcome-step-red .ti-welcome-step-icon { 
    background: rgba(239, 68, 68, 0.1); 
    color: #EF4444;
}

.ti-welcome-step-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1d21;
    line-height: 1.2;
    margin-bottom: 4px;
}

[data-bs-theme="dark"] .ti-welcome-step-label {
    color: #f3f4f6;
}

.ti-welcome-step-desc {
    display: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}

[data-bs-theme="dark"] .ti-welcome-step-desc {
    color: #9ca3af;
}

@media (min-width: 521px) {
    .ti-welcome-step-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px 20px;
        gap: 10px;
    }
    .ti-welcome-step-desc {
        display: block;
    }
}

/* Footer with pagination and CTA */
.ti-welcome-footer {
    text-align: center;
    margin-top: 20px;
}

.ti-welcome-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.ti-welcome-pag-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-bs-theme="dark"] .ti-welcome-pag-text {
    color: #9ca3af;
}

.ti-welcome-pag-dots {
    display: flex;
    gap: 8px;
}

.ti-welcome-pag-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-bs-theme="dark"] .ti-welcome-pag-dots span {
    background: #4b5563;
}

.ti-welcome-pag-dots span.active {
    width: 32px;
    border-radius: 4px;
    background: #0066FF;
}

[data-bs-theme="dark"] .ti-welcome-pag-dots span.active {
    background: #3b82f6;
}

.ti-btn-welcome {
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px; /* Pill shape */
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 20px -5px rgba(0, 102, 255, 0.4);
    transition: all 0.3s ease;
}

.ti-btn-welcome:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px -5px rgba(0, 102, 255, 0.5);
}

@media (max-width: 768px) {
    .ti-step-welcome {
        padding: 32px 16px 40px;
    }
    .ti-welcome-title {
        font-size: 2rem;
    }
    .ti-welcome-icon {
        width: 72px;
        height: 72px;
        font-size: 1.875rem;
        border-radius: 20px;
    }
}

/* Cards */
.ti-card {
    background: var(--ti-bg-card);
    border: 2px solid transparent;
    border-radius: var(--ti-border-radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--ti-transition);
}

.ti-card:hover {
    background: var(--ti-bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--ti-shadow-hover);
}

.ti-card.selected {
    border-color: var(--ti-accent-blue);
    background: rgba(0, 102, 255, 0.1);
}

.ti-card.completed {
    border-color: var(--ti-accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.ti-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ti-card.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Check Cards (Step 2) */
.ti-check-card {
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-accent-blue);
    border-radius: var(--ti-border-radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--ti-transition);
}

.ti-check-card.border-yellow {
    border-color: var(--ti-accent-yellow);
}

.ti-check-card.border-pink {
    border-color: var(--ti-accent-pink);
}

.ti-check-card.completed {
    border-color: var(--ti-accent-green);
    background: rgba(16, 185, 129, 0.05);
}

.ti-check-card.collapsed {
    padding: 16px 24px;
}

.ti-check-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--ti-accent-blue);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    margin-right: 12px;
}

.ti-check-number.completed {
    background: var(--ti-accent-green);
}

.ti-check-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ti-accent-blue);
    display: inline;
}

.ti-check-title.completed {
    color: var(--ti-accent-green);
}

.ti-check-description {
    color: var(--ti-text-secondary);
    margin-top: 12px;
    margin-bottom: 16px;
}

.ti-check-warning {
    color: var(--ti-accent-red);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Condition Cards (Step 3) */
.ti-condition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.ti-condition-card {
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--ti-transition);
}

.ti-condition-card:hover {
    border-color: var(--ti-accent-blue);
    background: var(--ti-bg-card-hover);
}

.ti-condition-card.selected {
    border-color: var(--ti-accent-blue);
    background: rgba(0, 102, 255, 0.1);
}

.ti-condition-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ti-text-primary);
    margin-bottom: 8px;
}

.ti-condition-desc {
    font-size: 0.9rem;
    color: var(--ti-text-secondary);
}

/* Accessory Cards (Step 7) */
.ti-accessory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ti-accessory-card {
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--ti-transition);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ti-accessory-card:hover {
    border-color: var(--ti-accent-blue);
}

.ti-accessory-card.selected {
    border-color: var(--ti-accent-blue);
    background: rgba(0, 102, 255, 0.1);
}

.ti-accessory-icon {
    font-size: 28px;
    color: var(--ti-text-secondary);
    margin-bottom: 8px;
}

.ti-accessory-card.selected .ti-accessory-icon {
    color: var(--ti-accent-blue);
}

.ti-accessory-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ti-text-primary);
}

/* Quantity Selector */
.ti-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.ti-quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--ti-border-color);
    background: transparent;
    color: var(--ti-accent-blue);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--ti-transition);
}

.ti-quantity-btn:hover {
    background: var(--ti-accent-blue);
    color: white;
    border-color: var(--ti-accent-blue);
}

.ti-quantity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 500;
    color: var(--ti-text-primary);
    background: var(--ti-bg-dark);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Product Type Cards (Step 1) */
.ti-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.ti-type-card {
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--ti-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ti-type-card:hover {
    border-color: var(--ti-accent-blue);
    background: var(--ti-bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--ti-shadow);
}

.ti-type-card.selected {
    border-color: var(--ti-accent-blue);
    background: rgba(0, 102, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

.ti-type-icon {
    font-size: 2.5rem;
    color: var(--ti-accent-blue);
    margin-bottom: 8px;
}

.ti-type-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ti-text-primary);
}

/* ID Type Cards (Step 4) */
.ti-id-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

.ti-id-card {
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--ti-transition);
}

.ti-id-card:hover {
    border-color: var(--ti-accent-blue);
}

.ti-id-card.selected {
    border-color: var(--ti-accent-blue);
    background: rgba(0, 102, 255, 0.1);
}

.ti-id-icon {
    font-size: 32px;
    color: var(--ti-text-secondary);
    margin-bottom: 12px;
}

.ti-id-card.selected .ti-id-icon {
    color: var(--ti-accent-blue);
}

.ti-id-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ti-text-primary);
}

/* Buttons */
.ti-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--ti-border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ti-transition);
    border: none;
    text-decoration: none;
}

.ti-btn-primary {
    background: var(--ti-accent-blue);
    color: white;
}

.ti-btn-primary:hover {
    background: var(--ti-accent-blue-hover);
    transform: scale(1.02);
}

.ti-btn-primary:disabled {
    background: var(--ti-border-color);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.ti-btn-secondary {
    background: transparent;
    color: var(--ti-text-secondary);
    border: 1px solid var(--ti-border-color);
}

.ti-btn-secondary:hover {
    border-color: var(--ti-text-primary);
    color: var(--ti-text-primary);
}

.ti-btn-danger {
    background: var(--ti-accent-red);
    color: white;
}

.ti-btn-danger:hover {
    background: #dc2626; /* Keep specific hover color */
}

.ti-btn-success {
    background: var(--ti-accent-green);
    color: white;
}

.ti-btn-success:hover {
    background: #059669; /* Keep specific hover color */
}

.ti-btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.ti-btn-lg {
    padding: 16px 36px;
    font-size: 18px;
}

/* Button Groups */
.ti-btn-group {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ti-btn-yes,
.ti-btn-no {
    padding: 10px 24px;
    border-radius: var(--ti-border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--ti-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ti-btn-no {
    background: var(--ti-border-color);
    color: var(--ti-text-primary);
    border: none;
}

.ti-btn-no:hover {
    background: var(--ti-bg-card-hover);
}

.ti-btn-no.active {
    background: var(--ti-accent-red);
    color: white;
}

.ti-btn-yes {
    background: var(--ti-border-color);
    color: var(--ti-text-primary);
    border: none;
}

.ti-btn-yes:hover {
    background: var(--ti-bg-card-hover);
}

.ti-btn-yes.active {
    background: var(--ti-accent-green);
    color: white;
}

/* Navigation */
.ti-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--ti-border-color);
}

.ti-nav-back {
    color: var(--ti-text-secondary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--ti-transition);
}

.ti-nav-back:hover {
    color: var(--ti-text-primary);
}

/* Form Elements */
.ti-form-group {
    margin-bottom: 20px;
}

.ti-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ti-text-secondary);
    margin-bottom: 8px;
}

.ti-label .required {
    color: var(--ti-accent-red);
}

.ti-input {
    width: 100%;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    padding: 14px 16px;
    color: var(--ti-text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.ti-input:focus {
    border-color: var(--ti-accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

.ti-input.error {
    border-color: var(--ti-accent-red);
}

.ti-input::placeholder {
    color: var(--ti-text-muted);
}

/* Price display (after product selected) */
.ti-price-display {
    padding: 12px 16px;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
}

.ti-price-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.ti-price-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ti-price-callout {
    font-size: 0.75rem;
    color: var(--ti-text-muted);
    margin-top: 2px;
    max-width: 240px;
    line-height: 1.3;
}

/* VIP Price – whole block is hover/click trigger, no icon */
.ti-price-item.ti-price-item-vip {
    position: relative;
    cursor: help;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}
.ti-price-item-vip:hover,
.ti-price-item-vip.ti-vip-tooltip-pinned {
    background-color: rgba(0, 102, 255, 0.08);
}
.ti-vip-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    margin-bottom: 8px;
    padding: 12px 16px;
    background: var(--ti-bg-card);
    color: var(--ti-text-primary);
    font-size: 0.85rem;
    line-height: 1.5;
    border-radius: 10px;
    min-width: 220px;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--ti-border-color);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ti-price-item-vip:hover .ti-vip-tooltip,
.ti-price-item-vip.ti-vip-tooltip-pinned .ti-vip-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.ti-vip-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border: 8px solid transparent;
    border-top-color: var(--ti-bg-card);
}
.ti-vip-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -9px;
    border: 9px solid transparent;
    border-top-color: var(--ti-border-color);
}

.ti-price-label {
    font-size: 0.8rem;
    color: var(--ti-text-muted);
}

.ti-price-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ti-text-primary);
}

/* Field Error Messages */
.ti-field-error {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--ti-accent-red);
    border-radius: 8px;
    color: var(--ti-accent-red);
    font-size: 13px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.ti-field-error i {
    font-size: 14px;
}

/* ID Card Error State */
.ti-id-card.error {
    border-color: var(--ti-accent-red) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Address Autocomplete Styling - BaseCamp Style */
.ti-address-autocomplete-wrapper {
    position: relative;
}

.ti-address-input-container {
    position: relative;
}

.ti-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    box-shadow: var(--ti-shadow-hover);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ti-autocomplete-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--ti-border-color);
}

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

.ti-autocomplete-item:hover,
.ti-autocomplete-item.highlighted {
    background: var(--ti-bg-card-hover);
}

.ti-autocomplete-icon {
    color: var(--ti-accent-blue);
    font-size: 16px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

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

.ti-autocomplete-main {
    color: var(--ti-text-primary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 2px;
}

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

/* Scrollbar styling for dropdown */
.ti-autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.ti-autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.ti-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--ti-border-color);
    border-radius: 4px;
}

.ti-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--ti-text-muted);
}

/* Hide spinner for number inputs */
.ti-input-number {
    -moz-appearance: textfield;
}

.ti-input-number::-webkit-outer-spin-button,
.ti-input-number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ti-textarea {
    min-height: 100px;
    resize: vertical;
}

.ti-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.ti-error-text {
    color: var(--ti-accent-red);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Form Grid */
.ti-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .ti-form-row {
        grid-template-columns: 1fr;
    }
}

/* Search Input */
.ti-search-container {
    position: relative;
}

.ti-search-input {
    padding-right: 48px;
}

.ti-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ti-text-muted);
}

.ti-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
    box-shadow: var(--ti-shadow);
}

.ti-search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--ti-border-color);
}

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

.ti-search-item:hover {
    background: var(--ti-bg-card-hover);
}

.ti-search-item-title {
    font-weight: 500;
    color: var(--ti-text-primary);
}

.ti-search-item-subtitle {
    font-size: 0.85rem;
    color: var(--ti-text-secondary);
    margin-top: 2px;
}

/* File Upload */
.ti-file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ti-file-input {
    display: none;
}

.ti-file-btn {
    padding: 10px 20px;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    color: var(--ti-text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: var(--ti-transition);
}

.ti-file-btn:hover {
    background: var(--ti-bg-card-hover);
    border-color: var(--ti-accent-blue);
}

.ti-file-name {
    color: var(--ti-text-secondary);
    font-size: 14px;
}

.ti-file-hint {
    color: var(--ti-text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* File Upload Actions (Take Photo / Choose File buttons) */
.ti-file-upload-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.ti-file-upload-actions .ti-btn {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 52px; /* Tablet-friendly touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    font-family: 'Figtree', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.ti-file-upload-actions .ti-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ti-file-upload-actions .ti-btn:hover::before {
    left: 100%;
}

.ti-file-upload-actions .ti-btn-primary {
    background: linear-gradient(135deg, var(--ti-accent-blue) 0%, #0052CC 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35), 0 2px 6px rgba(0, 102, 255, 0.2);
}

.ti-file-upload-actions .ti-btn-primary:hover {
    background: linear-gradient(135deg, var(--ti-accent-blue-hover) 0%, #0040A3 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.45), 0 4px 8px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.ti-file-upload-actions .ti-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.ti-file-upload-actions .ti-btn-secondary {
    background: var(--ti-bg-card);
    color: var(--ti-text-primary);
    border: 2px solid var(--ti-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ti-file-upload-actions .ti-btn-secondary:hover {
    background: var(--ti-bg-card-hover);
    border-color: var(--ti-accent-blue);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
    transform: translateY(-2px);
    color: var(--ti-accent-blue);
}

.ti-file-upload-actions .ti-btn-secondary:active {
    transform: translateY(0);
}

.ti-file-upload-actions .ti-btn i {
    font-size: 18px;
}

.ti-file-name-display {
    padding: 12px 16px;
    background: var(--ti-bg-card);
    border-radius: var(--ti-border-radius);
    font-size: 0.875rem;
    color: var(--ti-text-secondary);
    display: flex;
    align-items: center;
    border: 1px solid var(--ti-border-color);
}

.ti-file-name-display i {
    color: var(--ti-accent-blue);
    margin-right: 8px;
}

/* Tablet optimizations */
@media (max-width: 1024px) {
    .ti-file-upload-actions {
        flex-direction: row;
        gap: 12px;
    }
    
    .ti-file-upload-actions .ti-btn {
        flex: 1;
        min-height: 56px; /* Larger touch target for tablets */
        font-size: 17px;
    }
}

@media (max-width: 640px) {
    .ti-file-upload-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ti-file-upload-actions .ti-btn {
        width: 100%;
    }
}

/* Table */
.ti-table-container {
    background: var(--ti-bg-card);
    border-radius: var(--ti-border-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.ti-table {
    width: 100%;
    border-collapse: collapse;
}

.ti-table th {
    background: var(--ti-bg-card);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ti-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ti-table th:hover {
    background: var(--ti-bg-card-hover);
}

.ti-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ti-border-color);
    color: var(--ti-text-primary);
}

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

.ti-table tr:hover td {
    background: var(--ti-bg-card-hover);
}

/* Pagination */
.ti-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.ti-page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ti-border-color);
    background: transparent;
    color: var(--ti-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--ti-transition);
}

.ti-page-btn:hover {
    border-color: var(--ti-accent-blue);
    color: var(--ti-accent-blue);
}

.ti-page-btn.active {
    background: var(--ti-accent-blue);
    border-color: var(--ti-accent-blue);
    color: white;
}

/* Sub-step Indicator (for Binding step) */
.ti-substep-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.ti-substep-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    transition: all 0.2s ease;
}

.ti-substep-dot.active {
    background: var(--ti-primary);
    border-color: var(--ti-primary);
}

/* Step Indicator */
.ti-step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
    margin-top: 32px;
}

.ti-step-dot {
    width: 32px;
    height: 4px;
    border-radius: 2px;
    background: var(--ti-border-color);
    transition: var(--ti-transition);
}

.ti-step-dot.active {
    background: var(--ti-accent-blue);
    width: 48px;
}

.ti-step-dot.completed {
    background: var(--ti-accent-green);
}

/* Warning Box */
.ti-warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--ti-accent-yellow);
    border-radius: var(--ti-border-radius);
    padding: 16px 20px;
    margin: 24px 0;
}

.ti-warning-box i {
    color: var(--ti-accent-yellow);
    margin-right: 12px;
}

.ti-warning-box strong {
    color: var(--ti-text-primary);
}

.ti-warning-box p {
    color: var(--ti-text-secondary);
    margin: 0;
}

/* Error Box */
.ti-error-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--ti-accent-red);
    border-radius: var(--ti-border-radius);
    padding: 16px 20px;
    margin: 24px 0;
}

.ti-error-box i {
    color: var(--ti-accent-red);
    margin-right: 12px;
}

/* Success Box */
.ti-success-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--ti-accent-green);
    border-radius: var(--ti-border-radius);
    padding: 16px 20px;
    margin: 24px 0;
    display: flex;
    align-items: center;
}

.ti-success-box i {
    color: var(--ti-accent-green);
    margin-right: 12px;
    font-size: 20px;
}

/* Signature Canvas */
.ti-signature-container {
    background: white;
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.ti-signature-canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    background: white;
}

.ti-signature-clear {
    color: var(--ti-accent-blue);
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 16px;
    display: inline-block;
}

.ti-signature-clear:hover {
    text-decoration: underline;
}

/* Terms Text */
.ti-terms {
    color: var(--ti-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.ti-terms p {
    margin-bottom: 16px;
}

/* Modal */
.ti-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ti-modal {
    background: var(--ti-bg-card);
    border-radius: var(--ti-border-radius-lg);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--ti-shadow-hover);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.ti-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ti-accent-red);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ti-modal-close {
    background: none;
    border: none;
    color: var(--ti-text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.ti-modal-close:hover {
    color: var(--ti-text-primary);
}

.ti-modal-body {
    color: var(--ti-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.ti-modal-footer {
    display: flex;
    justify-content: flex-end;
}

/* Toast Notifications */
.ti-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ti-toast {
    background: var(--ti-bg-card);
    border-radius: var(--ti-border-radius);
    padding: 16px 20px;
    box-shadow: var(--ti-shadow-hover);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ti-toast.success {
    border-left: 4px solid var(--ti-accent-green);
    background: color-mix(in srgb, var(--ti-accent-green) 12%, var(--ti-bg-card));
}

.ti-toast.error {
    border-left: 4px solid var(--ti-accent-red);
    background: color-mix(in srgb, var(--ti-accent-red) 10%, var(--ti-bg-card));
}

.ti-toast.warning {
    border-left: 4px solid var(--ti-accent-yellow);
    background: color-mix(in srgb, var(--ti-accent-yellow) 10%, var(--ti-bg-card));
}

.ti-toast-icon {
    font-size: 20px;
}

.ti-toast.success .ti-toast-icon {
    color: var(--ti-accent-green);
}

.ti-toast.error .ti-toast-icon {
    color: var(--ti-accent-red);
}

.ti-toast.warning .ti-toast-icon {
    color: var(--ti-accent-yellow);
}

.ti-toast-message {
    flex: 1;
    color: var(--ti-text-primary);
}

/* Loading Spinner */
.ti-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Complete Badge */
.ti-complete-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ti-accent-green);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: checkPulse 0.4s ease;
}

@keyframes checkPulse {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Step Counter */
.ti-step-counter {
    color: var(--ti-text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Example Images Section */
.ti-example-images-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--ti-border-color);
}

.ti-example-images-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ti-text-primary);
    margin-bottom: 16px;
    font-family: 'Figtree', 'Inter', sans-serif;
}

.ti-example-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.ti-example-image-card {
    position: relative;
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.ti-example-image-card:hover {
    border-color: var(--ti-accent-blue);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
    transform: translateY(-2px);
}

.ti-example-image-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.15);
}

.ti-example-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ti-example-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.ti-example-badge-good {
    background: var(--ti-accent-green);
    color: white;
}

.ti-example-badge-bad {
    background: var(--ti-accent-red);
    color: white;
}

.ti-example-good {
    border-color: rgba(16, 185, 129, 0.3);
}

.ti-example-bad {
    border-color: rgba(239, 68, 68, 0.3);
}

.ti-example-good:hover {
    border-color: var(--ti-accent-green);
}

.ti-example-bad:hover {
    border-color: var(--ti-accent-red);
}

/* Responsive */
@media (max-width: 992px) {
    .ti-summary-sidebar {
        display: none;
    }

    .ti-wizard--with-summary .ti-wizard-main {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ti-container {
        padding: 0 12px;
    }
    
    .ti-page-title,
    .ti-step-title {
        font-size: 1.5rem;
    }
    
    .ti-card {
        padding: 16px;
    }
    
    .ti-accessory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ti-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .ti-nav {
        flex-direction: column;
        gap: 16px;
    }
    
    .ti-example-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .ti-example-badge {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Example Image Preview Modal - Modern Apple-Easy Style */
.example-image-preview-modal .modal-dialog {
    max-width: 95vw;
    margin: 1rem auto;
}

.example-image-preview-modal .modal-content {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.example-image-preview-header {
    border: none;
    padding: 1rem 1.5rem;
    background: transparent;
    justify-content: flex-end;
    align-items: flex-start;
}

.example-image-preview-close {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 1.125rem;
}

.example-image-preview-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: scale(1.05);
}

.example-image-preview-close:active {
    transform: scale(0.95);
}

.example-image-preview-close i {
    margin: 0;
}

.example-image-preview-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    max-height: 85vh;
}

.example-image-preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.example-image-preview-img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    object-fit: contain;
    animation: imagePreviewFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes imagePreviewFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark backdrop */
.example-image-preview-modal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
    .example-image-preview-modal .modal-dialog {
        max-width: 100vw;
        margin: 0;
    }
    
    .example-image-preview-body {
        padding: 1rem;
        min-height: 50vh;
        max-height: 80vh;
    }
    
    .example-image-preview-img {
        max-height: 80vh;
        border-radius: 12px;
    }
    
    .example-image-preview-close {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Checkbox Styles */
.ti-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.ti-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    background: var(--ti-bg-card);
    border: 2px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    transition: all 0.3s ease;
    user-select: none;
}

.ti-checkbox-label:hover {
    border-color: var(--ti-accent-blue);
    background: var(--ti-bg-card-hover);
}

.ti-checkbox-label:has(input:checked) {
    border-color: var(--ti-accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.ti-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--ti-accent-green);
    flex-shrink: 0;
}

.ti-checkbox-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--ti-text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.ti-checkbox-label:has(input:checked) .ti-checkbox-text {
    color: var(--ti-text-primary);
}

@media (max-width: 768px) {
    .ti-checkbox-label {
        padding: 12px;
    }
    
    .ti-checkbox-text {
        font-size: 0.875rem;
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── In The Box (matches ti-form-group / ti-input style) ── */
.ti-itb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 124px;
    gap: 10px;
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .ti-itb-grid { grid-template-columns: 1fr; }
}

/* Card - same bg/border/radius as ti-input */
.ti-itb-card {
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--ti-transition);
    user-select: none;
    height: 100%;
    min-height: 124px;
    display: flex;
    flex-direction: column;
}
.ti-itb-card:hover {
    border-color: var(--ti-accent-blue);
    background: var(--ti-bg-card-hover);
}

/* Selected */
.ti-itb-card.selected {
    border-color: var(--ti-accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.25);
}

/* Quantity mismatch */
.ti-itb-card.compulsory.qty-invalid {
    border-color: var(--ti-accent-red);
    background: rgba(239, 68, 68, 0.08);
}

/* Content */
.ti-itb-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
}
.ti-itb-card:not(.selected) .ti-itb-content { justify-content: center; }
.ti-itb-card.selected .ti-itb-content { justify-content: flex-start; }

/* Top row */
.ti-itb-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}
.ti-itb-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ti-text-primary);
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ti-itb-badge {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
}
.ti-itb-badge.compulsory-badge {
    background: rgba(0, 102, 255, 0.15);
    color: var(--ti-accent-blue);
}
.ti-itb-badge.optional-badge {
    background: rgba(156, 163, 175, 0.2);
    color: var(--ti-text-secondary);
}

/* Quantity row */
.ti-itb-row-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--ti-border-color);
    min-height: 36px;
}
.ti-itb-qty-label {
    font-size: 0.75rem;
    color: var(--ti-text-muted);
    flex: 1;
}
.ti-itb-qty-input {
    width: 52px;
    padding: 6px 8px;
    border: 1px solid var(--ti-border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ti-text-primary);
    background: var(--ti-bg-dark);
    transition: border-color 0.2s ease;
}
.ti-itb-qty-input:focus {
    outline: none;
    border-color: var(--ti-accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}
.ti-itb-qty-input.qty-invalid {
    border-color: var(--ti-accent-red);
    color: var(--ti-accent-red);
}

/* Section titles - same weight as ti-label */
.ti-itb-section-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 24px;
    color: var(--ti-text-secondary);
}
.ti-itb-section-title:first-child { margin-top: 0; }

/* Price section - divider like other form groups */
.ti-itb-price-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--ti-border-color);
}

/* Validation banner - matches ti-field-error style */
.ti-itb-validation-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--ti-accent-red);
    border-radius: var(--ti-border-radius);
    color: var(--ti-accent-red);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
}

/* QR Code Upload Modal - BaseCamp Style */
.ti-qr-upload-modal .modal-dialog {
    max-width: 500px;
    margin: 1rem auto;
}

.ti-qr-upload-content {
    background: var(--ti-bg-card);
    border: none;
    border-radius: var(--ti-border-radius-lg);
    box-shadow: var(--ti-shadow-hover);
    overflow: hidden;
}

.ti-qr-upload-header {
    border-bottom: 1px solid var(--ti-border-color);
    padding: 20px 24px;
    background: var(--ti-bg-card);
}

.ti-qr-upload-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ti-text-primary);
    font-family: 'Figtree', 'Inter', sans-serif;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    margin: 0;
}

.ti-qr-upload-title i {
    color: var(--ti-accent-blue);
    font-size: 1.125rem;
}

.ti-qr-upload-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--ti-border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--ti-text-secondary);
    font-size: 1rem;
}

.ti-qr-upload-close:hover {
    background: var(--ti-bg-card-hover);
    border-color: var(--ti-accent-blue);
    opacity: 1;
    transform: scale(1.05);
    color: var(--ti-text-primary);
}

.ti-qr-upload-close:active {
    transform: scale(0.95);
}

.ti-qr-upload-body {
    padding: 24px;
    text-align: center;
}

.ti-qr-instruction {
    margin-bottom: 24px;
}

.ti-qr-instruction-text {
    font-size: 0.9375rem;
    color: var(--ti-text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--ti-border-radius);
    font-family: 'Inter', -apple-system, sans-serif;
}

.ti-qr-instruction-text i {
    color: var(--ti-accent-blue);
    font-size: 1rem;
}

.ti-qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: var(--ti-border-radius);
    margin-bottom: 20px;
    min-height: 280px;
    border: 2px solid var(--ti-border-color);
}

.ti-qr-code-container canvas {
    max-width: 100%;
    height: auto;
}

.ti-qr-status {
    margin-top: 16px;
}

.ti-qr-status-message {
    font-size: 0.875rem;
    color: var(--ti-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--ti-bg-card);
    border: 1px solid var(--ti-border-color);
    border-radius: var(--ti-border-radius);
    font-family: 'Inter', -apple-system, sans-serif;
}

.ti-qr-status-message i {
    color: var(--ti-accent-blue);
}

.ti-qr-status-message.success {
    color: var(--ti-accent-green);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--ti-accent-green);
}

.ti-qr-status-message.success i {
    color: var(--ti-accent-green);
}

.ti-qr-status-message.error {
    color: var(--ti-accent-red);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--ti-accent-red);
}

.ti-qr-status-message.error i {
    color: var(--ti-accent-red);
}

/* Submission Result Modal */
.ti-submission-modal .modal-dialog {
    max-width: 500px;
}

.ti-submission-content {
    border-radius: var(--ti-border-radius-lg);
    border: none;
    box-shadow: var(--ti-shadow-hover);
    background: var(--ti-bg-card);
    overflow: hidden;
}

.ti-submission-body {
    padding: 40px 32px;
    text-align: center;
}

.ti-submission-result {
    margin-bottom: 32px;
}

.ti-submission-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.ti-submission-spinner .ti-spinner {
    width: 48px;
    height: 48px;
    border-width: 3px;
    color: var(--ti-accent-blue);
}

.ti-submission-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
}

.ti-submission-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--ti-accent-green);
}

.ti-submission-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--ti-accent-red);
}

.ti-submission-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ti-text-primary);
    margin-bottom: 16px;
    font-family: 'Figtree', 'Inter', sans-serif;
}

.ti-submission-message {
    font-size: 1rem;
    color: var(--ti-text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.ti-submission-summary {
    margin-top: 20px;
    padding: 16px;
    background: var(--ti-bg-card-hover, rgba(0, 0, 0, 0.04));
    border-radius: var(--ti-border-radius);
}
.ti-submission-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 0.9rem;
}
.ti-submission-summary-row:not(:last-child) {
    border-bottom: 1px solid var(--ti-border-color);
}
.ti-submission-summary-label {
    color: var(--ti-text-muted);
    margin-right: 12px;
}
.ti-submission-summary-value {
    font-weight: 600;
    color: var(--ti-text-primary);
    text-align: right;
}

.ti-submission-actions {
    margin-top: 32px;
}

.ti-submission-actions .ti-btn {
    min-width: 120px;
    padding: 14px 28px;
}

@media (max-width: 768px) {
    .ti-qr-upload-modal .modal-dialog {
        max-width: 90vw;
        margin: 1rem auto;
    }
    
    .ti-qr-upload-header {
        padding: 16px 20px;
    }
    
    .ti-qr-upload-title {
        font-size: 1.125rem;
    }
    
    .ti-qr-upload-body {
        padding: 20px;
    }
    
    .ti-qr-code-container {
        padding: 16px;
        min-height: 240px;
    }
}