/* ═══════════════════════════════════════════════════════════
   049 Masraf Takip — UI v3.00
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --info: #0891b2;
    --info-light: #ecfeff;
    --sidebar-bg: #1e1b4b;
    --sidebar-hover: #312e81;
    --body-bg: #f8fafc;
    --card-bg: #fff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius: 10px;
    --sidebar-w: 240px;
}

/* Dark Mode */
[data-theme="dark"] {
    --body-bg: #0f172a;
    --card-bg: #1e293b;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --primary-light: #1e1b4b;
    --success-light: #052e16;
    --warning-light: #422006;
    --danger-light: #450a0a;
    --info-light: #083344;
}
[data-theme="dark"] .page-header { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .data-table th { background: #0f172a; }
[data-theme="dark"] .data-table tr:hover { background: #334155; }
[data-theme="dark"] .filter-bar select,
[data-theme="dark"] .filter-bar input,
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #0f172a; color: #e2e8f0; border-color: #334155; color-scheme: dark; }
[data-theme="dark"] select option { background: #1e293b !important; color: #e2e8f0 !important; }
[data-theme="dark"] select option:checked { background: #4f46e5 !important; color: #fff !important; }
[data-theme="dark"] select option:hover { background: #334155 !important; }
[data-theme="dark"] select:focus { outline-color: #6366f1; }
[data-theme="dark"] label { color: #cbd5e1; }
[data-theme="dark"] .card-title { color: #e2e8f0; }
[data-theme="dark"] .table-footer { color: #94a3b8; }
[data-theme="dark"] .form-actions .btn-ghost { color: #94a3b8; }
[data-theme="dark"] .modal { background: #1e293b; }
[data-theme="dark"] .modal-header { border-color: #334155; }
[data-theme="dark"] .upload-area { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .ocr-status.success { background: #052e16; border-color: #166534; }
[data-theme="dark"] .ocr-status.error { background: #450a0a; border-color: #991b1b; }
[data-theme="dark"] .ocr-status.loading { background: #1e1b4b; border-color: #3730a3; }
[data-theme="dark"] .login-card { background: #1e293b; }
[data-theme="dark"] .login-body { background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); }
[data-theme="dark"] .step-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .edit-details { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .data-cell { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .readonly-field { background: #0f172a !important; }
[data-theme="dark"] .notif-panel { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .fis-viewer { border-color: #334155; }
[data-theme="dark"] .fis-viewer-toolbar { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .vbtn, [data-theme="dark"] .img-btn { background: #1e293b; border-color: #475569; color: #e2e8f0; }

/* Theme Toggle */
.theme-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.7); }
.theme-switch { width: 36px; height: 20px; border-radius: 10px; background: #475569; position: relative; transition: .3s; flex-shrink: 0; }
.theme-switch::after { content: ''; width: 16px; height: 16px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: .3s; }
.theme-toggle.dark .theme-switch { background: #6366f1; }
.theme-toggle.dark .theme-switch::after { left: 18px; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--body-bg);
}
a { text-decoration: none; color: inherit; }

/* ─── LOGIN ─────────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    text-align: center;
}
.login-logo { font-size: 48px; margin-bottom: 8px; }
.login-card h1 { font-size: 24px; color: var(--text); margin-bottom: 4px; }
.login-sub { color: var(--text-light); margin-bottom: 4px; font-size: 13px; }
.login-bc { color: var(--primary); font-size: 11px; margin-bottom: 24px; font-weight: 500; }
.login-error { background: var(--danger-light); color: var(--danger); padding: 10px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }

/* ─── FORM ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-light); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
    color: var(--text);
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.readonly-field { background: #f1f5f9 !important; font-weight: 700; color: var(--primary) !important; }
.form-row { display: flex; gap: 12px; }
.form-row > .form-group { flex: 1; }
.form-row.trio > .form-group:last-child { flex: 0.8; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.kdv-detail {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-light);
    padding: 8px 0; flex-wrap: wrap;
}
.total-highlight { font-weight: 700; color: var(--primary); font-size: 13px; }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; }
.btn-xs.btn-success { background: var(--success-light); color: var(--success); }
.btn-xs.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-xs.btn-info { background: var(--info-light); color: var(--info); }
.btn-xs.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-xs:hover { opacity: 0.8; }

/* ─── MOBILE HEADER ────────────────────────────────────── */
.mobile-header {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 300;
    background: var(--sidebar-bg); color: #fff;
    padding: 12px 16px;
    align-items: center; justify-content: space-between;
}
.hamburger {
    background: none; border: none; color: #fff;
    font-size: 24px; cursor: pointer; padding: 4px 8px;
}
.mobile-title { font-size: 16px; font-weight: 700; }
.mobile-actions { display: flex; gap: 8px; }
.notif-btn-mobile {
    background: none; border: none; font-size: 20px; cursor: pointer; position: relative;
}
.notif-dot {
    position: absolute; top: -2px; right: -2px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger);
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.5);
}
.sidebar-overlay.open { display: block; }

/* ─── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.3s ease;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 16px;
    color: #fff; font-size: 18px; font-weight: 700;
}
.logo-icon { font-size: 28px; }
.logo-text { font-size: 16px; }
.sidebar-menu { flex: 1; padding: 8px 12px; }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.6);
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
    font-size: 14px;
}
.menu-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.menu-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.mi { font-size: 16px; width: 20px; text-align: center; }
.menu-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 12px 16px; }

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.user-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.uname { color: #fff; font-size: 13px; font-weight: 600; }
.urole { color: rgba(255,255,255,0.4); font-size: 11px; text-transform: uppercase; }
.logout-btn {
    display: block; text-align: center;
    padding: 8px; border-radius: 6px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    transition: all 0.2s;
}
.logout-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ─── MAIN ──────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    flex-wrap: wrap; gap: 8px;
}
.page-header h1 { font-size: 20px; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bc-badge {
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
    background: var(--success-light); color: var(--success);
}
.bc-badge.offline { background: var(--warning-light); color: var(--warning); }

.page-body { padding: 24px 28px; }

/* ─── NOTIFICATION BUTTON ──────────────────────────────── */
.notif-btn {
    position: relative; background: none; border: none;
    font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.notif-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
}

/* ─── NOTIFICATION PANEL ───────────────────────────────── */
.notif-panel {
    position: fixed; top: 0; right: -400px; bottom: 0;
    width: 380px; max-width: 90vw;
    background: #fff; z-index: 600;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    display: flex; flex-direction: column;
}
.notif-panel.open { right: 0; }
.notif-overlay {
    display: none; position: fixed; inset: 0; z-index: 599;
    background: rgba(0,0,0,0.3);
}
.notif-overlay.open { display: block; }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.notif-header h3 { font-size: 16px; font-weight: 700; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item {
    display: flex; gap: 12px; padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s; cursor: pointer;
}
.notif-item:hover { background: #fafbfc; }
.notif-item.unread { background: var(--primary-light); }
.notif-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-detail { font-size: 12px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── STAT CARDS ────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}
.stat-card.accent { border-left-color: var(--success); }
.stat-card.warn { border-left-color: var(--warning); }
.stat-card.info { border-left-color: var(--info); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); }
.stat-sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ─── CARDS ─────────────────────────────────────────────── */
.card-row { display: flex; gap: 16px; margin-bottom: 24px; }
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
}
.flex1 { flex: 1; }
.flex2 { flex: 2; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.card-sub { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }

/* ─── TABLE ─────────────────────────────────────────────── */
.table-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: #f8fafc;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.data-table tr:hover { background: #fafbfc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.bold { font-weight: 700; }
.green { color: var(--success); }
.desc-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions-cell { white-space: nowrap; display: flex; gap: 4px; }
.table-footer {
    display: flex; justify-content: space-between;
    padding: 12px 16px;
    font-size: 12px; color: var(--text-light);
    border-top: 1px solid var(--border);
}
.row-alacak { background: var(--success-light) !important; }

/* ─── BULK ACTION BAR ──────────────────────────────────── */
.bulk-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; margin-bottom: 12px;
    background: var(--primary-light); border-radius: var(--radius);
    border: 1px solid #c7d2fe;
    font-size: 13px; font-weight: 600;
    color: var(--primary-dark);
}

/* ─── BADGES ────────────────────────────────────────────── */
.dept-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 700;
}
.dept-720 { background: #fce7f3; color: #9d174d; }
.dept-730 { background: #fef3c7; color: #92400e; }
.dept-740 { background: #dbeafe; color: #1d4ed8; }
.dept-750 { background: #d1fae5; color: #065f46; }
.dept-760 { background: #fef3c7; color: #92400e; }
.dept-770 { background: #ede9fe; color: #6d28d9; }
.dept-780 { background: #fee2e2; color: #991b1b; }

.status-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.status-badge.success { background: var(--success-light); color: var(--success); }
.status-badge.warn { background: var(--warning-light); color: var(--warning); }
.status-badge.danger { background: var(--danger-light); color: var(--danger); }
.status-badge.info { background: var(--info-light); color: var(--info); }

.bc-ok { color: var(--success); font-weight: 700; }
.bc-no { color: var(--text-muted); }
.fis-link { font-size: 18px; cursor: pointer; }

/* ─── FILTER BAR ────────────────────────────────────────── */
.filter-bar {
    display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
    padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13px; background: #fff;
}
.filter-bar input[type="text"] { min-width: 180px; flex: 1; }
.inline-select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

/* ─── UPLOAD ────────────────────────────────────────────── */
.upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #fafbfc;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-light); }
.upload-icon { font-size: 32px; }
/* Fis Viewer — dikey goruntuleme alani */
.fis-viewer { margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #1e293b; }
.fis-viewer-toolbar { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px; background: #f1f5f9; border-bottom: 1px solid var(--border); }
.vbtn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.vbtn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.vdiv { color: var(--border); font-size: 14px; }
#vZoomLvl { font-size: 11px; color: var(--text-muted); min-width: 36px; text-align: center; }
.fis-viewer-port { overflow: auto; min-height: 420px; max-height: 560px; display: flex; align-items: center; justify-content: center; padding: 12px; }
.fis-viewer-img { max-width: 100%; max-height: 540px; object-fit: contain; transition: transform .2s ease; user-select: none; }

/* ─── OCR STATUS ────────────────────────────────────────── */
.ocr-status {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.ocr-status.loading { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ocr-status.success { background: var(--success-light); color: var(--success); border: 1px solid #bbf7d0; }
.ocr-status.error { background: var(--danger-light); color: var(--danger); border: 1px solid #fecaca; }
.ocr-status b { font-weight: 700; }

/* ─── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    width: 560px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-sm { width: 420px; }
.modal-lg { width: 700px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px; border-radius: 8px;
    border: none; background: #f1f5f9; cursor: pointer;
    font-size: 18px; display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
}
.modal-close:hover { background: #e2e8f0; }
.modal form, .modal-body-img { padding: 24px; }

/* ─── MINI LIST ─────────────────────────────────────────── */
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fafbfc;
}
.mini-left { display: flex; align-items: center; gap: 8px; flex: 1; overflow: hidden; }
.mini-desc { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-right { text-align: right; flex-shrink: 0; }
.mini-amount { font-size: 13px; font-weight: 700; display: block; }
.mini-date { font-size: 11px; color: var(--text-muted); }
.empty-state { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

/* ─── AYARLAR ───────────────────────────────────────────── */
.config-list { margin: 16px 0; }
.config-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.config-item label { font-size: 12px; font-weight: 700; color: var(--text-light); min-width: 160px; }
.config-item code { font-size: 13px; color: var(--text); background: #f1f5f9; padding: 4px 10px; border-radius: 4px; }
.info-box {
    background: var(--primary-light); border-radius: 8px; padding: 16px;
    font-size: 13px; color: var(--primary-dark); line-height: 1.7;
}
.info-box.mt { margin-top: 16px; }
.simple-table { width: 100%; margin-top: 8px; }
.simple-table td { padding: 4px 8px; font-family: monospace; font-size: 13px; }

/* ─── YENI MASRAF PAGE — Step-based ─────────────────────── */
.step-card {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 28px;
    max-width: 900px; margin: 0 auto;
}
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 800;
}
.step-title { display: inline; font-size: 18px; font-weight: 700; margin-left: 8px; }
.step-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* Upload XL */
.upload-area-xl {
    border: 2.5px dashed var(--border); border-radius: 16px;
    padding: 60px 24px; text-align: center; cursor: pointer;
    position: relative; margin-top: 20px;
    transition: all 0.2s; background: #fafbfc;
}
.upload-area-xl:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area-xl input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon-xl { font-size: 56px; display: block; margin-bottom: 12px; }
.upload-title { font-size: 17px; font-weight: 700; color: var(--text); display: block; }
.upload-hint { font-size: 13px; color: var(--text-muted); display: block; margin-top: 4px; }

/* Loading */
.step-loading { text-align: center; padding: 60px; }
.loading-spinner {
    width: 48px; height: 48px; border: 4px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 18px; font-weight: 700; color: var(--text); }
.loading-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Analysis layout */
.analysis-layout { display: flex; gap: 24px; margin-bottom: 20px; }
.analysis-image { flex: 0 0 380px; display: flex; flex-direction: column; gap: 8px; }
.img-toolbar { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 0; }
.img-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border); background: #f8fafc; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.img-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
#zoomLevel { font-size: 12px; color: var(--text-muted); min-width: 40px; text-align: center; }
.img-viewport { overflow: auto; border-radius: 10px; border: 1px solid var(--border); background: #1e293b; min-height: 500px; max-height: 700px; display: flex; align-items: center; justify-content: center; }
.fis-img { max-width: 100%; max-height: 680px; object-fit: contain; transition: transform .2s ease; cursor: grab; user-select: none; }
.analysis-data { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.data-row { display: flex; gap: 8px; }
.data-cell { flex: 1; padding: 12px 14px; background: #f8fafc; border-radius: 8px; border: 1px solid var(--border); }
.data-cell.full { flex: 1 1 100%; }
.data-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.data-value { font-size: 15px; font-weight: 600; color: var(--text); }
.data-big { font-size: 22px; font-weight: 800; }
.data-primary { color: var(--primary); }
.data-highlight { background: var(--primary-light); border-radius: 8px; padding: 2px; }
.data-highlight .data-cell { background: transparent; border: none; }
.data-hint { font-size: 11px; color: var(--info); margin-top: 4px; display: none; }
.data-hint b { font-weight: 700; }

/* Edit details */
.edit-details { margin-bottom: 16px; }
.edit-toggle { font-size: 13px; color: var(--primary); cursor: pointer; font-weight: 600; padding: 10px 0; }
.edit-toggle:hover { color: var(--primary-dark); }
.edit-fields { padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

/* Step actions */
.step-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* Success */
.step-success { text-align: center; padding: 48px; }
.success-icon { font-size: 56px; margin-bottom: 12px; }
.success-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.success-detail { font-size: 15px; color: var(--text-light); margin-bottom: 28px; }

.auto-badge {
    font-size: 11px; background: var(--success-light); color: var(--success);
    padding: 3px 10px; border-radius: 20px; font-weight: 600;
}
.field-hint {
    font-size: 11px; color: var(--info); margin-top: 4px; display: none;
    padding: 4px 8px; background: var(--info-light); border-radius: 4px;
}
.field-hint b { font-weight: 700; }

.ocr-raw { margin-top: 8px; }
.ocr-raw details { font-size: 12px; color: var(--text-light); cursor: pointer; }
.ocr-raw summary { padding: 4px 0; }
.ocr-raw pre { background: #f1f5f9; padding: 10px; border-radius: 6px; font-size: 11px; max-height: 200px; overflow-y: auto; white-space: pre-wrap; margin-top: 6px; }

/* Menu accent item */
.menu-item-accent {
    background: rgba(79,70,229,0.15) !important;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 600;
}
.menu-item-accent:hover { background: var(--primary) !important; color: #fff !important; }

/* Keyword badge */
.keyword-badge {
    display: inline-block; padding: 3px 10px; border-radius: 4px;
    background: #f1f5f9; font-family: monospace; font-size: 12px; font-weight: 700;
    color: var(--text); letter-spacing: 0.5px;
}

/* ─── TOAST ────────────────────────────────────────────── */
#toastContainer {
    position: fixed; bottom: 24px; right: 24px; z-index: 700;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--success); color: #fff;
    padding: 14px 24px; border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    font-size: 14px; font-weight: 600;
    animation: slideUp 0.3s ease;
    max-width: 400px;
}
.toast-warn { background: var(--warning); }
.toast-error { background: var(--danger); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.text-muted { color: var(--text-muted); }

/* ─── REPORT ───────────────────────────────────────────── */
.report-list { display: flex; flex-direction: column; gap: 6px; }
.report-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-radius: 6px; background: #fafbfc;
    font-size: 13px;
}
.report-val { font-weight: 700; text-align: right; }
.report-val small { font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.color-dot {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; margin-right: 8px; vertical-align: middle;
}

/* ─── CHECKBOX ─────────────────────────────────────────── */
input[type="checkbox"] {
    width: 16px; height: 16px; cursor: pointer;
    accent-color: var(--primary);
}

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding-top: 56px; }
    .page-header { padding: 14px 16px; }
    .page-header h1 { font-size: 16px; }
    .page-body { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 18px; }
    .card-row { flex-direction: column; }
    .form-row { flex-direction: column; }
    .form-row.trio { flex-direction: row; }
    .filter-bar { flex-direction: column; }
    .filter-bar input[type="text"] { min-width: auto; }
    .modal { width: 95vw; border-radius: 12px; }
    .modal form { padding: 16px; }
    .analysis-layout { flex-direction: column; }
    .analysis-image { flex: none; }
    .img-viewport { min-height: 300px; max-height: 450px; }
    .fis-img { max-height: 430px; }
    .step-card { padding: 16px; }
    .upload-area-xl { padding: 40px 16px; }
    .upload-icon-xl { font-size: 40px; }
    .btn-lg { padding: 12px 24px; font-size: 14px; }
    .bulk-bar { flex-wrap: wrap; gap: 8px; }
    .notif-panel { width: 100%; right: -100%; }
    .data-table th, .data-table td { padding: 8px 10px; font-size: 12px; }
    .desc-cell { max-width: 120px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .form-row.trio { flex-direction: column; }
    .header-right { gap: 8px; }
    .step-actions { flex-direction: column; }
    .step-actions .btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   v3.00 — Portal Layout Eklentileri
   ═══════════════════════════════════════════════════════════ */

/* App layout */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar yeni nav */
.sidebar-header { padding: 20px 20px 12px; }
.sidebar-logo { color: #fff; font-size: 18px; font-weight: 700; }
.sidebar-nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; color: rgba(255,255,255,0.6);
    border-radius: 8px; font-size: 14px; transition: all 0.2s;
}
.nav-item:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-icon { font-size: 16px; width: 22px; text-align: center; }

/* Page title + hamburger */
.page-title { font-size: 20px; font-weight: 700; }
.content-area { padding: 24px 28px; }
.page-header .hamburger { display: none; }
@media (max-width: 768px) {
    .page-header .hamburger { display: block; }
    .content-area { padding: 16px; }
}

/* Badge */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-info { background: var(--info-light); color: var(--info); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* Alert */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-success { background: var(--success-light); color: var(--success); }
.alert-warning { background: var(--warning-light); color: var(--warning); }

/* Toast v3 — fixed bottom center */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    z-index: 900; opacity: 0; transition: all 0.3s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--danger); }

/* Login v3 */
.login-header { text-align: center; margin-bottom: 24px; }
.login-header h2 { font-size: 24px; color: var(--text); }
.login-form { padding: 0 24px 24px; }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.detail-grid > div { padding: 6px 0; }

/* Modal v3 overlay — flex display */
.modal-overlay { display: none; }
.modal-overlay[style*="display:flex"],
.modal-overlay[style*="display: flex"] { display: flex !important; }
