/* ===================================
   BELGE TARAMA SİSTEMİ - STYLE.CSS
   Brother MFC L8690CDW
   =================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --border-color: #334155;
    --border-light: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 12px rgba(99, 102, 241, 0.2);
    --sidebar-width: 240px;
    --transition-fast: 0.12s ease;
    --transition-normal: 0.2s ease;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.logo i {
    font-size: 1.25rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.scanner-status i {
    font-size: 0.6rem;
    color: var(--text-muted);
    animation: pulse 2s infinite;
}

.scanner-status.connected i {
    color: var(--success);
}

.scanner-status.error i {
    color: var(--danger);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px;
    min-height: 100vh;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.section-header h1 i {
    color: var(--primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Scanner Panel */
.scanner-panel {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.scanner-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.scanner-action {
    text-align: center;
    padding: 20px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.scan-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Scan Progress */
.scan-progress {
    padding: 16px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 16px;
}

.scan-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scan-status-row i {
    color: var(--primary);
}

#scan-status-text {
    flex: 1;
    font-weight: 500;
}

#scan-percentage {
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Recent Scans & Documents */
.recent-scans {
    margin-top: 24px;
}

.recent-scans h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.recent-scans h3 i {
    color: var(--text-muted);
}

.scans-grid,
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 200px));
    gap: 16px;
    justify-content: start;
}

.documents-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.view-options {
    display: flex;
    gap: 4px;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.85rem;
}

.view-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 12px;
}