/* IntraDocs - Intelligent Document Processing */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10B981;
    --background: #ffffff;
    --background-light: #f8faff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --success: #059669;
    --spacing: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Navigation */
.navbar-brand {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

/* Professional Card Styles */
.card {
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.card.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Upload Card */
.upload-card {
    border: 2px dashed var(--border-light);
    border-radius: 16px;
    transition: all 0.3s ease;
    background: var(--background-light);
}

.upload-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Upload Zone */
.upload-zone {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing) * 2);
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--background-light);
    border: 2px dashed var(--primary-light) !important;
}

.upload-zone:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary) !important;
    transform: scale(1.02);
}

.upload-zone.drag-over {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: var(--primary) !important;
    transform: scale(1.05);
}

.upload-zone-content {
    width: 100%;
}

.upload-cloud-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    opacity: 0.7;
}

/* Selected File Display */
.selected-file {
    background-color: rgba(59, 130, 246, 0.05);
    padding: var(--spacing);
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

/* Feature Icons */
.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feature-icon i {
    width: 24px;
    height: 24px;
}

/* Results Page */
.extracted-text-container {
    max-height: 600px;
    overflow-y: auto;
    background-color: #ffffff;
}

.extracted-text {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
    border: none;
    background: none;
}

/* Custom Scrollbar */
.extracted-text-container::-webkit-scrollbar {
    width: 8px;
}

.extracted-text-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.extracted-text-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.extracted-text-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #2563EB;
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Cards */
.card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.card-header {
    background-color: rgba(249, 250, 251, 0.5);
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
}

/* Statistics Cards */
.card.bg-light {
    background-color: rgba(249, 250, 251, 0.8) !important;
}

/* Alerts */
.alert {
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.alert-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.2);
    color: var(--success);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #D97706;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #DC2626;
}

/* Footer */
.footer {
    background-color: var(--background);
    border-top: 1px solid var(--border-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding-top: 1rem;
    }
    
    .upload-zone {
        min-height: 250px;
        padding: calc(var(--spacing) / 2);
    }
    
    .upload-cloud-icon {
        width: 48px;
        height: 48px;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .d-flex.justify-content-between .d-flex.gap-2 {
        justify-content: stretch;
    }
    
    .d-flex.justify-content-between .d-flex.gap-2 > * {
        flex: 1;
    }
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Toast Positioning */
.toast-container {
    z-index: 1055;
}

/* Utility Classes */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Focus States */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Smooth Transitions */
* {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
