/* ============================================================
   KozMES - Kozmetik Üretim Yönetim Sistemi
   Ana CSS - Endüstriyel Koyu Tema
   ============================================================ */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --bg-hover: #334155;
    --bg-sidebar: #0f172a;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: #334155;
    --border-light: #475569;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);

    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 56px;

    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* ==================== LOGIN ==================== */
.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group label i {
    margin-right: 6px;
    width: 16px;
}

input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="date"], input[type="time"],
input[type="datetime-local"], input[type="search"],
select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: #1e293b; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==================== ALERTS ==================== */
.alert {
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.alert-warning { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.alert-info { background: rgba(6,182,212,0.15); color: #67e8f9; border: 1px solid rgba(6,182,212,0.3); }

/* ==================== APP LAYOUT ==================== */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
    position: fixed;
    left: 0;
    top: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-details,
.sidebar.collapsed .btn-logout span,
.sidebar.collapsed .badge {
    display: none;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    min-height: var(--topbar-height);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-logo i { font-size: 22px; }

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 2px;
    transition: var(--transition);
    position: relative;
    font-size: 13px;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: rgba(59,130,246,0.15); color: var(--primary); font-weight: 500; }
.nav-item i { width: 20px; text-align: center; font-size: 15px; }

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 14px;
}

.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    margin-left: auto;
    font-weight: 600;
}

.badge-warning { background: var(--warning); color: #1e293b; }
.badge-danger { background: var(--danger); }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
}

.user-avatar { font-size: 28px; color: var(--text-secondary); }
.user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); display: block; }
.user-role { font-size: 11px; color: var(--text-muted); }

.btn-logout {
    width: 100%;
    padding: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    transition: var(--transition);
}

.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ==================== TOPBAR ==================== */
.topbar {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left h2 { font-size: 16px; font-weight: 600; }

.sidebar-toggle-mobile {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.notification-bell {
    cursor: pointer;
    position: relative;
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ==================== PAGE CONTENT ==================== */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-dark);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
}

/* ==================== GRID ==================== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==================== STAT CARDS ==================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--primary); }
.stat-icon.green { background: rgba(34,197,94,0.15); color: var(--success); }
.stat-icon.amber { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.red { background: rgba(239,68,68,0.15); color: var(--danger); }
.stat-icon.cyan { background: rgba(6,182,212,0.15); color: var(--info); }

.stat-info h3 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-info p { font-size: 12px; color: var(--text-secondary); }

/* ==================== TABLE ==================== */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-input);
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

tr:hover td { background: var(--bg-hover); }
tr:last-child td { border-bottom: none; }

/* ==================== STATUS BADGES ==================== */
.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-running { background: rgba(34,197,94,0.15); color: #86efac; }
.status-idle { background: rgba(100,116,139,0.2); color: #94a3b8; }
.status-setup { background: rgba(245,158,11,0.15); color: #fcd34d; }
.status-maintenance { background: rgba(6,182,212,0.15); color: #67e8f9; }
.status-breakdown { background: rgba(239,68,68,0.15); color: #fca5a5; }
.status-offline { background: rgba(100,116,139,0.15); color: #64748b; }

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 16px; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info { border-left: 3px solid var(--info); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ==================== NOTIFICATION PANEL ==================== */
.notification-panel {
    position: absolute;
    top: var(--topbar-height);
    right: 20px;
    width: 360px;
    max-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    overflow: hidden;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.notif-header h3 { font-size: 14px; }
.notif-header button { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; }
.notif-list { overflow-y: auto; max-height: 340px; }
.notif-list .empty { padding: 24px; text-align: center; color: var(--text-muted); }

/* ==================== LOADING ==================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary);
    gap: 16px;
}

/* ==================== RESPONSIVE ==================== */
/* Tablet (768-1200px) */
@media (max-width: 1200px) {
    .sidebar { width: 200px; }
    .main-content { margin-left: 200px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet Portrait (768-1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
        overflow: hidden;
    }
    .sidebar:hover { width: 250px; }
    .sidebar .nav-item span { display: none; }
    .sidebar:hover .nav-item span { display: inline; }
    .sidebar .sidebar-header h2 { display: none; }
    .sidebar:hover .sidebar-header h2 { display: block; }
    .main-content { margin-left: 60px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    .topbar { padding: 0 12px; }
    .card { padding: 14px; }
}

/* Telefon (768px altı) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 200;
        width: 250px;
    }
    .sidebar:hover { width: 250px; }
    .sidebar .nav-item span { display: inline; }
    .sidebar.mobile-open { transform: translateX(0); }

    .main-content { margin-left: 0 !important; }
    .sidebar-toggle-mobile { display: block; }
    .topbar-right .topbar-item:not(.notification-bell) { display: none; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    .stat-card { padding: 14px; }
    .stat-info h3 { font-size: 20px; }

    .flex-between { flex-wrap: wrap; gap: 8px; }
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 500px; font-size: 12px; }
    th, td { padding: 8px 6px; }

    /* Modal tam ekran */
    .modal { width: 95vw !important; max-height: 90vh; margin: 5vh auto; }
    .modal-body { max-height: 60vh; }

    /* Form inputları daha büyük */
    input, select, textarea { font-size: 16px !important; padding: 10px !important; }
    .btn { padding: 10px 16px; font-size: 14px; }
    .btn-sm { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 480px) {
    .page-content { padding: 12px; }
    .card { padding: 14px; }
    .login-card { padding: 24px; }
}

/* ==================== UTILITIES ==================== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-md { margin-top: 16px; }
.mb-md { margin-bottom: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ═══ V4: Print CSS ═══ */
@media print {
    .sidebar, .header, .nav-toggle, .page-actions, .btn, .modal-footer,
    .stats-row, [onclick], button { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 10px !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
    table { font-size: 11px !important; }
    body { background: #fff !important; color: #000 !important; }
    * { color: #000 !important; }
}

/* ═══ V4: Responsive tablo ═══ */
@media (max-width: 768px) {
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .stats-row { flex-wrap: wrap; }
    .stat-card { min-width: 120px; }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .page-actions { flex-wrap: wrap; }
}

/* ═══ V4: Badge stilleri ═══ */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(34,197,94,.15); color: #16a34a; }
.badge-danger { background: rgba(239,68,68,.15); color: #dc2626; }
.badge-warning { background: rgba(245,158,11,.15); color: #d97706; }
.badge-info { background: rgba(59,130,246,.15); color: #2563eb; }
.badge-secondary { background: rgba(100,116,139,.15); color: #64748b; }

/* ═══ V4: Form iyileştirmeleri ═══ */
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text-secondary); }
.form-control { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-input); color: var(--text); font-size: 14px; }
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
select.form-control { appearance: auto; }

/* ═══ V4: Tooltip/stat card ═══ */
.stat-card { flex: 1; }
.stat-danger .stat-value { color: var(--danger); }
.stat-warning .stat-value { color: var(--warning); }
.stat-success .stat-value { color: var(--success); }
.stat-info .stat-value { color: var(--info, #3b82f6); }

/* ═══ V4: btn-outline ═══ */
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-input); }

/* ═══ V4: Sidebar nav badge ═══ */
.nav-badge {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    min-width: 18px; height: 18px; border-radius: 9px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-item { position: relative; }

/* ═══ V4: TEMA SİSTEMİ — 4 tema ═══ */

/* Tema 1: Gece (mevcut varsayılan) — :root'ta tanımlı */

/* Tema 2: Açık (Light) */
[data-theme="light"] {
    --primary: #2563eb; --primary-dark: #1d4ed8; --primary-light: #3b82f6;
    --sidebar-bg: #f8fafc; --sidebar-text: #1e293b; --sidebar-border: #e2e8f0;
    --sidebar-hover: #f1f5f9; --sidebar-active: #dbeafe;
    --secondary: #64748b; --success: #16a34a; --warning: #d97706; --danger: #dc2626; --info: #0891b2;
    --bg-dark: #f1f5f9; --bg-card: #ffffff; --bg-input: #f8fafc; --bg-hover: #e2e8f0; --bg-sidebar: #1e293b;
    --text-primary: #0f172a; --text-secondary: #475569; --text-muted: #94a3b8;
    --border: #e2e8f0; --border-light: #cbd5e1;
    --shadow: 0 1px 3px rgba(0,0,0,0.08); --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="light"] .sidebar { background: var(--sidebar-bg, #f8fafc); color: var(--sidebar-text, #1e293b); border-right: 1px solid var(--sidebar-border, #e2e8f0); }
[data-theme="light"] .sidebar .nav-item { color: #475569; }
[data-theme="light"] .sidebar .nav-item:hover { background: var(--sidebar-hover, #f1f5f9); color: #1e293b; }
[data-theme="light"] .sidebar .nav-item.active { background: var(--sidebar-active, #dbeafe); color: var(--primary); }
[data-theme="light"] .sidebar .nav-section-title { color: #94a3b8; }
[data-theme="light"] .sidebar .sidebar-header { background: #fff; border-bottom: 1px solid #e2e8f0; }
[data-theme="light"] .sidebar .sidebar-footer { border-top: 1px solid #e2e8f0; }
[data-theme="light"] .card { border: 1px solid var(--border); }

/* Tema 3: Endüstriyel Mavi */
[data-theme="industrial"] {
    --primary: #0ea5e9; --primary-dark: #0284c7; --primary-light: #38bdf8;
    --secondary: #6b7280; --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --info: #06b6d4;
    --bg-dark: #111827; --bg-card: #1f2937; --bg-input: #374151; --bg-hover: #374151; --bg-sidebar: #030712;
    --text-primary: #e5e7eb; --text-secondary: #9ca3af; --text-muted: #6b7280;
    --border: #374151; --border-light: #4b5563;
    --shadow: 0 4px 6px rgba(0,0,0,0.3); --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
}

/* Tema 4: Yüksek Kontrast (fabrika ortamı, parlak ekran) */
[data-theme="contrast"] {
    --primary: #facc15; --primary-dark: #eab308; --primary-light: #fde047;
    --secondary: #a1a1aa; --success: #4ade80; --warning: #fbbf24; --danger: #f87171; --info: #22d3ee;
    --bg-dark: #000000; --bg-card: #18181b; --bg-input: #27272a; --bg-hover: #3f3f46; --bg-sidebar: #000000;
    --text-primary: #ffffff; --text-secondary: #d4d4d8; --text-muted: #a1a1aa;
    --border: #3f3f46; --border-light: #52525b;
    --shadow: 0 0 0 1px rgba(255,255,255,0.1); --shadow-lg: 0 0 0 2px rgba(255,255,255,0.15);
}
[data-theme="contrast"] .sidebar { border-right: 2px solid var(--primary); }
[data-theme="contrast"] .btn-primary { color: #000; }
[data-theme="contrast"] .card { border: 1px solid var(--border); }

/* Tema seçici widget */
.theme-selector {
    display: flex; gap: 6px; align-items: center; padding: 8px 16px;
}
.theme-dot {
    width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; transition: all 0.2s;
}
.theme-dot:hover, .theme-dot.active { border-color: var(--primary); transform: scale(1.15); }

/* ═══ V4: Sidebar menü grupları ═══ */
.nav-group-label {
    padding: 8px 20px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 8px;
}
.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 16px;
    opacity: 0.3;
}

/* V4: Güncelleme banner pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
#update-banner { transition: all 0.3s; }
#update-banner:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(59,130,246,0.5); }

/* Film-Strip Background Animation (Admin Preview + Portal) */
@keyframes filmstrip-left { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }
@keyframes filmstrip-right { 0% { transform:translateX(-50%); } 100% { transform:translateX(0); } }
.filmstrip-row.scroll-left { animation:filmstrip-left var(--fs-speed, 30s) linear infinite; }
.filmstrip-row.scroll-right { animation:filmstrip-right var(--fs-speed, 30s) linear infinite; }
