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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2d3748;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 80px;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

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

/* Progress */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #4a5568;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    text-transform: uppercase;
}

/* Completion Message */
.completion-message {
    text-align: center;
    padding: 30px;
}

.success-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #48bb78;
}

.completion-message h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.completion-message .btn {
    margin: 5px;
}

/* Error Message */
.error-message {
    background: #fed7d7;
    color: #742a2a;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #f56565;
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.9;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.results-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.results-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.results-table tbody tr:hover {
    background-color: #f7fafc;
}

.results-table td {
    padding: 12px 15px;
    font-size: 0.95rem;
}

.filters-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

/* ============================================================ */
/* STATEMENT DROPZONE                                           */
/* ============================================================ */

.dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: #f7fafc;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.dropzone.dragover {
    border-color: #48bb78;
    background: #e6fffa;
}

.file-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #718096;
}

.statement-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.statement-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #4a5568;
}

.btn-xs {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* ============================================================ */
/* AUTH MODAL STYLES */
/* ============================================================ */

.cache-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(102, 126, 234, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.logout-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(calc(50% - 10px));
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    pointer-events: none;
    z-index: 1000;
}

.logout-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 50%;
    transform: translateX(calc(50% - 20px));
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    pointer-events: none;
    z-index: 1000;
}

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.auth-step {
    min-height: 200px;
}

.captcha-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-refresh {
    padding: 12px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: #edf2f7;
}

.loader-container {
    text-align: center;
    padding: 60px 20px;
}

.auth-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loader-container p {
    color: #718096;
    font-size: 15px;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h4 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 10px;
}

.success-message p {
    color: #718096;
    margin-bottom: 30px;
}

.auth-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}
