/* ============================================
   Data Cleaner - Excel Add-in Styles
   Modern, clean UI with action-focused design
   ============================================ */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --primary-glow: rgba(16, 185, 129, 0.3);

    /* Accent */
    --accent: #3b82f6;
    --accent-light: #dbeafe;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --error: #ef4444;
    --error-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Neutrals */
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --surface: rgba(255, 255, 255, 0.98);
    --surface-glass: rgba(255, 255, 255, 0.9);
    --border: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Radius */
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ==================== ONBOARDING ==================== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: var(--background);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.onboarding-overlay.hidden {
    display: none;
}

.onboarding-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

.onboarding-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: pulse 2s infinite;
}

.onboarding-card h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.onboarding-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.onboarding-steps {
    text-align: left;
    margin-bottom: 24px;
}

.onboarding-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.onboarding-step:last-child {
    border-bottom: none;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.step-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-get-started {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-get-started:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* ==================== HEADER ==================== */
.app-header {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.logo-text .subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== SELECTION INFO ==================== */
.selection-info {
    background: var(--info-light);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

.selection-info i {
    font-size: 14px;
}

/* ==================== MAIN CONTENT ==================== */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
}

/* ==================== CARDS ==================== */
.section-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.section-card h2 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-card h2 i {
    color: var(--primary);
}

.card-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ==================== ACTION GRID ==================== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn i {
    font-size: 20px;
    color: var(--text-secondary);
}

.action-btn:hover i {
    color: var(--primary);
}

.action-btn .text-example {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    height: 24px;
    display: flex;
    align-items: center;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    background: white;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px -2px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px -2px var(--primary-glow);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

/* ==================== STATS CARD ==================== */
.stats-card .stats-content {
    padding: 12px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    text-align: center;
}

.stats-content .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-dark);
}

.stats-content .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* ==================== ABOUT ==================== */
.about-card {
    text-align: center;
}

.about-card .text-muted {
    color: var(--text-muted);
    font-size: 11px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ==================== LOADING ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loadingText {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    z-index: 1001;
}

.toast {
    background: var(--text);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.toast.error {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
}

.toast.warning {
    background: var(--warning);
    color: var(--text);
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}