/* ============================================
   TroiaPos — Ana Stil Dosyası
   Modern Dark Theme POS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   CSS DEĞİŞKENLERİ
   ============================================ */
:root {
    --primary:        #6366F1;
    --primary-dark:   #4F46E5;
    --primary-light:  #818CF8;
    --secondary:      #10B981;
    --danger:         #EF4444;
    --warning:        #F59E0B;
    --info:           #3B82F6;
    --purple:         #8B5CF6;

    --bg-primary:     #0F172A;
    --bg-secondary:   #131C2E;
    --bg-card:        #1E293B;
    --bg-sidebar:     #0F172A;
    --bg-hover:       #283550;
    --bg-input:       #0F172A;

    --border-color:   #2D3F5A;
    --border-light:   rgba(255,255,255,0.05);

    --text-primary:   #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted:     #64748B;

    --gradient-primary:   linear-gradient(135deg, #6366F1, #8B5CF6);
    --gradient-success:   linear-gradient(135deg, #10B981, #059669);
    --gradient-danger:    linear-gradient(135deg, #EF4444, #DC2626);
    --gradient-warning:   linear-gradient(135deg, #F59E0B, #D97706);
    --gradient-info:      linear-gradient(135deg, #3B82F6, #2563EB);
    --gradient-dark:      linear-gradient(135deg, #1E293B, #0F172A);

    --sidebar-width:  260px;
    --header-height:  64px;
    --radius:         12px;
    --radius-lg:      16px;
    --radius-xl:      20px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 8px 20px rgba(0,0,0,0.35);
    --shadow-lg:  0 20px 40px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.3);

    --transition: all 0.2s ease;
    --transition-slow: all 0.35s ease;
    --bg-surface: rgba(255,255,255,0.03);
}

 /* AYDINLIK TEMA KALDIRILDI */

/* ============================================
   SIFIRLA & TEMEL
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

/* ============================================
   SAYFA DÜZENI
   ============================================ */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: var(--transition-slow);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin 0.3s ease;
    margin-left: var(--sidebar-width);
    background: var(--bg);
}

/* Sidebar Daraltılmış (Mini) Mod */
.sidebar-collapsed .main-content {
    margin-left: 70px !important;
}

/* Mobil görünümde margin olmaz */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
    }
}

/* ============================================
   SİDEBAR DARALMA (COLLAPSED) MODU
   ============================================ */
.sidebar-collapsed .sidebar {
    width: 70px !important;
}

.sidebar-collapsed .main-content {
    margin-left: 70px !important;
}

.sidebar-collapsed .sidebar-header {
    padding: 1rem 0;
    justify-content: center;
}

.sidebar-collapsed .sidebar-header div, 
.sidebar-collapsed .nav-section,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .nav-badge,
.sidebar-collapsed .user-info,
.sidebar-collapsed .user-card i {
    display: none !important;
}

.sidebar-collapsed .sidebar-header img {
    max-height: 40px !important;
}

.sidebar-collapsed .nav-item {
    padding: 0.1rem 0.5rem;
}

.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar-collapsed .nav-link i {
    font-size: 1.3rem;
    width: auto;
    margin: 0;
}

.sidebar-collapsed .user-card {
    padding: 0.5rem;
    justify-content: center;
}

.sidebar-collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
}

/* ============================================
   SİDEBAR
   ============================================ */
.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo {
    width: 44px; height: 44px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.sidebar-brand { flex: 1; }
.sidebar-brand h2 { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.sidebar-brand span { font-size: 0.72rem; color: var(--text-muted); }

.sidebar-toggle {
    width: 32px; height: 32px;
    background: var(--bg-hover);
    border: none; cursor: pointer;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--primary); color: white; }

.sidebar-nav { flex: 1; padding: 1rem 0; }

.nav-section {
    padding: 0.375rem 1.25rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.nav-item { display: block; padding: 0.1rem 0.75rem; }

.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-link .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active {
    background: rgba(99,102,241,0.15);
    color: var(--primary-light);
    font-weight: 600;
}
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

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

.user-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-hover);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.user-card:hover { background: var(--primary); }
.user-avatar {
    width: 38px; height: 38px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .role { font-size: 0.72rem; color: var(--text-muted); }
.user-card:hover .user-info .role { color: rgba(255,255,255,0.7); }

/* ============================================
   HEADER
   ============================================ */
.page-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky; top: 0; z-index: 100;
}

.page-title { flex: 1; }
.page-title h1 { font-size: 1.2rem; font-weight: 700; }
.page-title .breadcrumb { font-size: 0.78rem; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-icon {
    width: 38px; height: 38px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-decoration: none;
    position: relative;
}
.btn-icon:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-icon .badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* ============================================
   İÇERİK ALANI
   ============================================ */
.page-content { flex: 1; padding: 1.5rem; overflow-y: auto; }

/* ============================================
   KARTLAR
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem;
}
.card-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.card-body { padding: 1.25rem; }

/* ============================================
   STAT KARTLARI
   ============================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(30%, -30%);
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.success::before { background: var(--secondary); }
.stat-card.danger::before  { background: var(--danger); }
.stat-card.warning::before { background: var(--warning); }

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.primary { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.stat-icon.success { background: rgba(16,185,129,0.15); color: var(--secondary); }
.stat-icon.danger  { background: rgba(239,68,68,0.15);  color: var(--danger); }
.stat-icon.warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.info    { background: rgba(59,130,246,0.15); color: var(--info); }

.stat-info { flex: 1; }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.stat-change { font-size: 0.75rem; font-weight: 600; margin-top: 0.3rem; }
.stat-change.up   { color: var(--secondary); }
.stat-change.down { color: var(--danger); }

/* ============================================
   BUTONLAR
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; border-radius: 8px; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; border-radius: 12px; }
.btn-xl { padding: 1.1rem 2rem; font-size: 1.1rem; border-radius: 14px; }

.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(99,102,241,0.4); transform: translateY(-1px); }

.btn-success { background: var(--gradient-success); color: white; }
.btn-success:hover { box-shadow: 0 8px 20px rgba(16,185,129,0.4); transform: translateY(-1px); }

.btn-danger { background: var(--gradient-danger); color: white; }
.btn-danger:hover { box-shadow: 0 8px 20px rgba(239,68,68,0.4); transform: translateY(-1px); }

.btn-warning { background: var(--gradient-warning); color: white; }
.btn-warning:hover { box-shadow: 0 8px 20px rgba(245,158,11,0.4); transform: translateY(-1px); }

.btn-info { background: var(--gradient-info); color: white; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(99,102,241,0.1); }

.btn-ghost { background: var(--bg-hover); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--primary); color: white; }

/* ============================================
   FORM ELEMENLERİ
   ============================================ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-label .required { color: var(--danger); margin-left: 0.2rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.form-control {
    width: 100%;
    padding: 0.65rem 0.875rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--danger); }
.form-control option { background: var(--bg-card); }

textarea.form-control { resize: vertical; min-height: 90px; }

.input-group { display: flex; gap: 0; }
.input-group .form-control { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; padding-left: 1rem; padding-right: 1rem; }

/* ============================================
   TABLOLAR
   ============================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

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

thead th {
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-primary);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); color: var(--text-primary); }
tbody tr:hover { transition: var(--transition); }

.td-primary { color: var(--text-primary) !important; font-weight: 600; }
.td-money { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================
   SİPARİŞ TABLOSU ÖZEL HİZALAMA (RECOVERY)
   ============================================ */
.orders-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.orders-table thead th, 
.orders-table tbody td {
    padding: 1rem 0.75rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sütun Bazlı Genişlik ve Hizalama */
.orders-table th:nth-child(1), .orders-table td:nth-child(1) { width: 18%; text-align: left; }  /* Sipariş No */
.orders-table th:nth-child(2), .orders-table td:nth-child(2) { width: 12%; text-align: center; } /* Masa */
.orders-table th:nth-child(3), .orders-table td:nth-child(3) { width: 18%; text-align: right; }  /* Tutar */
.orders-table th:nth-child(4), .orders-table td:nth-child(4) { width: 15%; text-align: center; } /* Durum */
.orders-table th:nth-child(5), .orders-table td:nth-child(5) { width: 22%; text-align: left; }   /* Kasiyer */
.orders-table th:nth-child(6), .orders-table td:nth-child(6) { width: 15%; text-align: right; }  /* Tarih */

/* Mobil için tablo taşmasını engelle */
@media (max-width: 768px) {
    .orders-table { table-layout: auto !important; }
}

/* ============================================
   ROZETLER (BADGE)
   ============================================ */
.badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-primary { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,0.15); color: #34D399; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #FCA5A5; }
.badge-warning { background: rgba(245,158,11,0.15); color: #FCD34D; }
.badge-info    { background: rgba(59,130,246,0.15); color: #93C5FD; }
.badge-muted   { background: rgba(100,116,139,0.2); color: var(--text-muted); }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal.modal-sm { max-width: 420px; }
.modal.modal-lg { max-width: 960px; }
.modal.modal-xl { max-width: 1100px; }
.modal.modal-full { max-width: 95vw; width: 95vw; }

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    width: 34px; height: 34px;
    background: var(--bg-hover);
    border: none; border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}
.modal-close:hover { background: var(--danger); color: white; }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ============================================
   TOAST BİLDİRİMLERİ
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem; right: 1rem;
    z-index: 99999;
    display: flex; flex-direction: column; gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    display: flex; align-items: center; gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 280px; max-width: 380px;
    pointer-events: all;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.success { border-left-color: var(--secondary); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast.success i { color: var(--secondary); }
.toast.error   i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast-text { flex: 1; }
.toast-out { animation: toastOut 0.3s ease forwards; }

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

/* ============================================
   YÜKLENİYOR
   ============================================ */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    position: absolute; inset: 0;
    background: rgba(15,23,42,0.8);
    backdrop-filter: blur(2px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 50; gap: 1rem; border-radius: inherit;
}
.loading-overlay p { color: var(--text-muted); font-size: 0.875rem; }

/* ============================================
   BOŞALAN DURUM
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.empty-state h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.85rem; }

/* ============================================
   ARAMA KUTUSU
   ============================================ */
.search-box input { padding-left: 2.5rem; }

/* ============================================
   OTOMATİK TAMAMLAMA (AUTOCOMPLETE)
   ============================================ */
.autocomplete-results {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--bg-hover); color: var(--primary-light); }

.autocomplete-item .title { font-weight: 600; color: var(--text-primary); }
.autocomplete-item .subtitle { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   ARAÇ ÇUBUĞU
   ============================================ */
.toolbar {
    display: flex; 
    align-items: center; 
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    width: 100%;
}
.toolbar-left  { flex: 1; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================
   GRID YARDIMCILARI
   ============================================ */
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* ============================================
   CHECKBOX & SWITCH
   ============================================ */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute; cursor: pointer;
    inset: 0;
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}
.switch-slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 2px; bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}
.switch input:checked + .switch-slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); background: white; }

/* ============================================
   TABS
   ============================================ */
.tabs { 
    display: flex; 
    width: 100%;
    border-bottom: 2px solid var(--border-color); 
    margin-bottom: 1.5rem; 
    gap: 0.5rem; 
    overflow-x: auto; 
    flex-wrap: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none; border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: var(--transition);
    font-family: inherit;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tab-btn:hover { color: var(--text-secondary); background: var(--bg-hover); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); background: rgba(99,102,241,0.05); }

.tab-pane { display: none; width: 100%; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.tab-pane .card { max-width: 1000px; margin-bottom: 2rem; }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar { height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.progress-fill.primary { background: var(--gradient-primary); }
.progress-fill.success { background: var(--gradient-success); }
.progress-fill.danger  { background: var(--gradient-danger); }

/* ============================================
   DROPDOWN MENU
   ============================================ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 500;
    overflow: hidden;
    display: none;
    animation: fadeIn 0.15s ease;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.1); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 0.25rem 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   METİN YARDIMCILARI
   ============================================ */
.text-primary-color { color: var(--primary-light); }
.text-success { color: var(--secondary); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.fw-bold       { font-weight: 700; }
.fw-semibold   { font-weight: 600; }
.fs-sm         { font-size: 0.8rem; }
.fs-xs         { font-size: 0.72rem; }
.fs-lg         { font-size: 1.1rem; }

/* ============================================
   BOŞLUK YARDIMCILARI
   ============================================ */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================
   PLATFORM ETİKETLERİ
   ============================================ */
.platform-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}
.platform-getir        { background: rgba(92,15,217,0.2);  color: #A78BFA; }
.platform-yemeksepeti  { background: rgba(255,96,0,0.2);   color: #FDBA74; }
.platform-trendyol     { background: rgba(242,122,26,0.2); color: #FCD34D; }

/* ============================================
   SAYFAYA ÖZGÜ — DASHBOARD
   ============================================ */
.chart-container { height: 240px; position: relative; }

.activity-list { display: flex; flex-direction: column; gap: 0.75rem; }
.activity-item {
    display: flex; align-items: flex-start; gap: 0.875rem;
    padding: 0.75rem;
    background: var(--bg-hover);
    border-radius: 10px;
}
.activity-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; flex-shrink: 0;
}
.activity-text { flex: 1; }
.activity-text p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.activity-text span { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================
   MOBİL & TABLET DUYARLI TASARIM
   ============================================ */
@media (max-width: 1024px) {
    :root { --sidebar-width: 220px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .grid-2  { grid-template-columns: 1fr; }
    .grid-3  { grid-template-columns: 1fr 1fr; }
    .grid-4  { grid-template-columns: 1fr 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { flex: none; }
    .page-content { padding: 1rem; }
    .modal { max-width: 100% !important; width: 100%; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .modal-overlay { align-items: flex-end; padding: 0; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.3rem; }
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.mobile-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-overlay.active { display: block; }

/* ============================================
   KAYDIRMA ÇUBUĞU
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   SEÇİM
   ============================================ */
::selection { background: rgba(99,102,241,0.3); color: white; }

/* ============================================
   BAĞLANTI DURUMU ANİMASYONU (PWA)
   ============================================ */
#statusInternet, #statusServer {
    animation: connectionBreathing 4s ease-in-out infinite;
}
@keyframes connectionBreathing {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.97); }
}

/* ============================================
   CALLER ID POPUP (Arayan Kimliği)
   ============================================ */
.caller-id-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), var(--shadow-glow);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.caller-id-popup.active {
    display: flex;
    transform: translateY(0) scale(1);
}
.cid-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cid-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    animation: cidPulse 1.5s infinite;
}
.cid-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px;
}
.cid-phone {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
}
.cid-body {
    padding: 1.25rem;
}
.cid-customer {
    font-size: 1.1rem;
    font-weight: 700;
    color: #F8FAFC;
    margin-bottom: 0.5rem;
}
.cid-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cid-footer {
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.2);
    display: flex;
    gap: 0.75rem;
}
.btn-close-cid {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-close-cid:hover { color: var(--danger); }

@keyframes cidPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
