/* Custom styles for Bank Statement Converter Web App - Premium Edition */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #0ea5e9;
    --secondary-dark: #0284c7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

/* Premium Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary) !important;
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand i {
    margin-right: 0.75rem;
    font-size: 1.8rem;
}

/* Premium Mobile Navigation */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: var(--primary-light);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 0.75rem 1rem !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0.25rem 0;
}

.navbar-nav .nav-link:hover {
    background: var(--primary-light);
    color: var(--primary) !important;
    transform: translateX(5px);
}

.nav-links .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.nav-links .nav-link.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary) !important;
}

.nav-links .nav-link.nav-link-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff !important;
    padding: 0.65rem 1.15rem !important;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.nav-links .nav-link.nav-link-btn:hover {
    transform: translateY(-1px);
    color: #fff !important;
}

.nav-links .nav-link.nav-link-static {
    cursor: default;
    background: transparent;
    color: rgba(15, 23, 42, 0.7) !important;
}

/* Premium Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-outline-primary:hover {
    background: var(--gradient-secondary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Premium Cards */
.card {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

/* Premium Upload Area */
.upload-area {
    border: 3px dashed var(--primary);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(219, 234, 254, 0.5) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, #e0e7ff 0%, rgba(224, 231, 255, 0.8) 100%);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.upload-area.dragover {
    border-color: var(--success);
    background: linear-gradient(135deg, #d1fae5 0%, rgba(209, 250, 229, 0.8) 100%);
    transform: scale(1.02);
}

/* Premium Tables */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

.table thead th {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    font-weight: 700;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: var(--primary-light);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Premium Alerts */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(29, 78, 216, 0.1) 100%);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

/* Premium Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    background: rgba(255, 255, 255, 0.95);
}

.form-floating label {
    color: var(--gray);
    font-weight: 600;
}

.form-floating .form-control:focus ~ label {
    color: var(--primary);
}

/* Premium Amount Display */
.amount-positive {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
}

.amount-negative {
    color: var(--danger);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Premium Progress Bars */
.progress {
    height: 35px;
    border-radius: 20px;
    background: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    background: var(--gradient-secondary);
    transition: width 0.3s ease;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* Premium Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mobile Responsive Design - CLEAN & PROFESSIONAL */
@media (max-width: 1024px) {
    /* COMPLETELY DISABLE ALL 3D AND HOVER EFFECTS ON MOBILE/TABLET */
    * {
        transform: none !important;
        transition: none !important;
    }
    
    .feature-card, .hero-section, .upload-section, .login-card, .register-card, .card, .btn, .upload-area {
        transform: none !important;
        transition: none !important;
        perspective: none !important;
        transform-style: flat !important;
    }
    
    /* Disable all hover effects on mobile */
    .feature-card:hover, .hero-section:hover, .upload-section:hover, .login-card:hover, .register-card:hover, .card:hover, .btn:hover, .upload-area:hover {
        transform: none !important;
        box-shadow: var(--shadow-2xl) !important;
        transition: none !important;
    }
    
    /* Fix touch scrolling - remove any interfering styles */
    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding-bottom: 0 !important; /* Remove bottom padding */
    }
    
    .login-container, .register-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }
    
    /* Clean, professional navbar for mobile */
    .navbar {
        padding: 0.5rem 0;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
    }
    
    .navbar-brand {
        font-size: 1rem;
        margin: 0 auto;
        display: block;
        text-align: center;
        width: 100%;
        justify-content: center;
        font-weight: 700;
    }
    
    .navbar-brand i {
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }
    
    /* Show traditional mobile menu - professional */
    .navbar-toggler {
        display: flex !important;
        border: none;
        padding: 0.5rem;
        background: var(--primary);
        border-radius: 8px;
        color: white;
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
    }

    /* Optimize buttons for tiny screens */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        font-weight: 600;
        transform: none !important;
        transition: none !important;
        border-radius: 10px;
    }
    
    /* Optimize forms for tiny screens */
    .form-control {
        min-height: 44px;
        padding: 0.75rem;
        font-size: 0.9rem;
        transform: none !important;
        transition: none !important;
        border-radius: 10px;
    }
    
    .form-floating label {
        font-size: 0.8rem;
    }
    
    /* Optimize upload area for tiny screens */
    .upload-area {
        padding: 1.5rem 1rem;
        min-height: 150px;
        transform: none !important;
        transition: none !important;
        border-radius: 15px;
    }
    
    .upload-area:hover {
        transform: none !important;
        border-color: var(--primary);
    }
    
    /* Optimize cards for tiny screens */
    .card {
        margin-bottom: 1rem;
        transform: none !important;
        transition: none !important;
        border-radius: 15px;
        padding: 1rem;
    }
    
    /* Optimize typography for tiny screens */
    h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Remove chat widget overlap issues */
    .chat-widget, 
    .crisp-client,
    .intercom-messenger,
    .fc-widget,
    [class*="chat"],
    [class*="support"],
    [class*="help"] {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 1000 !important;
    }
    
    /* Ensure content doesn't overlap with chat widget */
    .main-container {
        padding-bottom: 80px;
    }
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Enhanced Focus States for Accessibility */
.btn:focus, .nav-link:focus, .form-control:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-tap-highlight-color: transparent;
}

.btn, .nav-link, .form-control, .card {
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
