/* 
   EfkoCRM Modern Dark Theme CSS
   EspoCRM Tarzı Sade ve Koyu Arayüz Tasarımı
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #111214;
    --bg-panel: #1d1f22;
    --bg-sidebar: #18191c;
    --bg-header: #18191c;
    --border-color: #2b2e33;
    
    --text-primary: #e3e5e8;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    
    --accent: #f3b004;
    --accent-hover: #d19702;
    --accent-light: rgba(243, 176, 4, 0.1);
    
    --success: #2ec4b6;
    --danger: #e71d36;
    --warning: #ff9f1c;
    --info: #011627;
    
    --sidebar-width: 240px;
    --header-height: 56px;
    --border-radius: 6px;
    --transition: all 0.25s ease-in-out;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #2d3035;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3e434a;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

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

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.sidebar-logo span {
    color: var(--accent);
}

.sidebar-menu {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.menu-section {
    padding: 0 15px;
    margin-bottom: 20px;
}

.menu-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
    padding-left: 5px;
    letter-spacing: 1px;
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-link i {
    width: 20px;
    margin-right: 10px;
    font-size: 1rem;
    text-align: center;
}

.menu-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active .menu-link {
    color: var(--bg-main);
    background-color: var(--accent);
    font-weight: 600;
}

.menu-item.active .menu-link i {
    color: var(--bg-main);
}

.sidebar-badge {
    margin-left: auto;
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 18px;
    text-align: center;
    box-shadow: none;
    transition: all 0.2s ease;
}

.sidebar-badge.has-notification {
    background-color: var(--danger) !important;
    color: white !important;
    animation: pulse-red 2s infinite !important;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 29, 54, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(231, 29, 54, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 29, 54, 0); }
}

/* Aktif menüde de kırmızı kalmasını ve animasyonun devam etmesini istiyoruz */
.menu-item.active .sidebar-badge.has-notification {
    background-color: var(--danger) !important;
    color: white !important;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Header */
.main-header {
    height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 20px;
    display: none; /* Desktop'ta gizli */
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search-btn {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
}
.header-search-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    color: var(--text-primary);
}
.search-btn-shortcut {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}
@media (max-width: 768px) {
    .search-btn-text, .search-btn-shortcut {
        display: none;
    }
    .header-search-btn {
        margin-left: 0;
        padding: 8px 10px;
    }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent);
    color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info {
    font-size: 0.85rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.logout-btn {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

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

/* Page Body */
.page-body {
    padding: 30px;
    flex: 1;
}

/* Cards / Panels */
.panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
}

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

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grid & Dashboard layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.stat-info h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* EspoCRM Style Double Column Dashboard */
.dashboard-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.stream-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.stream-item:last-child {
    border-bottom: none;
}

.stream-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.stream-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stream-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-main);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--bg-main);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

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

.btn-danger:hover {
    background-color: #bd1326;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.table th {
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

/* Status Badges - Aramalar */
.badge-bekliyor { background-color: rgba(255, 159, 28, 0.15); color: var(--warning); }
.badge-arandı { background-color: rgba(46, 196, 182, 0.15); color: var(--success); }
.badge-cevapsız { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); }
.badge-tekrar-aranacak { background-color: rgba(243, 176, 4, 0.15); color: var(--accent); }
.badge-kapandı { background-color: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border-color); }

/* Status Badges - İadeler */
.badge-beklemede { background-color: rgba(255, 159, 28, 0.15); color: var(--warning); }
.badge-onaylandı { background-color: rgba(46, 196, 182, 0.15); color: var(--success); }
.badge-reddedildi { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); }
.badge-tamamlandı { background-color: rgba(54, 162, 235, 0.15); color: #36a2eb; }

/* Status Badges - Sorunlar */
.badge-açık { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); }
.badge-işlemde { background-color: rgba(255, 159, 28, 0.15); color: var(--warning); }
.badge-çözüldü { background-color: rgba(46, 196, 182, 0.15); color: var(--success); }

/* Priority Badges */
.badge-düşük { background-color: rgba(46, 196, 182, 0.1); color: var(--success); border: 1px solid rgba(46, 196, 182, 0.3); }
.badge-orta { background-color: rgba(255, 159, 28, 0.1); color: var(--warning); border: 1px solid rgba(255, 159, 28, 0.3); }
.badge-yüksek { background-color: rgba(231, 29, 54, 0.1); color: var(--danger); border: 1px solid rgba(231, 29, 54, 0.3); }

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background-color: #16181b;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

/* Login Page Styling */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-main);
    padding: 20px;
}

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

.login-logo {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.login-logo span {
    color: var(--accent);
}

/* Actions panel and search in headers */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .form-control {
    padding-left: 35px;
}

/* Notification banner */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: rgba(46, 196, 182, 0.1);
    border: 1px solid rgba(46, 196, 182, 0.2);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(231, 29, 54, 0.1);
    border: 1px solid rgba(231, 29, 54, 0.2);
    color: var(--danger);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Global Notification System styles */
.notification-bell-container {
    position: relative;
    display: inline-block;
}

.notification-bell-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-bell-btn:hover {
    color: var(--accent);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 1px solid var(--bg-header);
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    width: 320px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 200;
    overflow: hidden;
}

.notification-dropdown.open {
    display: block;
}

.notification-dropdown-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: rgba(255,255,255,0.02);
}

.clear-notifications-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
}

.clear-notifications-btn:hover {
    text-decoration: underline;
}

.notification-dropdown-body {
    max-height: 280px;
    overflow-y: auto;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.notification-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item-type {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.notification-type-call { background-color: rgba(255, 159, 28, 0.15); color: var(--warning); }
.notification-type-return { background-color: rgba(54, 162, 235, 0.15); color: #36a2eb; }
.notification-type-return_warning { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); font-weight: bold; border: 1px solid rgba(231, 29, 54, 0.3); }
.notification-type-issue { background-color: rgba(231, 29, 54, 0.15); color: var(--danger); }
.notification-type-dropshipping { background-color: rgba(46, 196, 182, 0.15); color: var(--success); }

/* Native calendar picker style for dark mode */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notification-item-title {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.3;
}

/* Toast Notifications styling */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    max-width: 450px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.55);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}
.toast-success i {
    color: var(--success);
    font-size: 1.2rem;
}

.toast-danger {
    border-left: 4px solid var(--danger);
}
.toast-danger i {
    color: var(--danger);
    font-size: 1.2rem;
}

.toast-warning {
    border-left: 4px solid var(--warning);
}
.toast-warning i {
    color: var(--warning);
    font-size: 1.2rem;
}

.toast-info {
    border-left: 4px solid var(--accent);
}
.toast-info i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Customer Drawer Trigger */
.customer-history-trigger {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px dashed var(--text-muted);
    transition: var(--transition);
    display: inline-block;
}

.customer-history-trigger:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
/* Müşteri Geçmişi Çekmecesi (Drawer) */
.customer-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.customer-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.customer-drawer {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    max-width: 100%;
    height: 100%;
    background: rgba(22, 23, 26, 0.85); /* Glassmorphism base */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.customer-drawer.open {
    right: 0;
    opacity: 1;
    pointer-events: auto;
}

.customer-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.customer-drawer-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.customer-drawer-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin: 0;
}

.customer-phone-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.customer-drawer-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.customer-drawer-close:hover {
    color: #fff;
    background-color: var(--danger);
    border-color: var(--danger);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 29, 54, 0.4);
}

/* Action Buttons (Call / Whatsapp inside header) */
.drawer-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drawer-action-btn.call-btn {
    background: linear-gradient(135deg, rgba(243, 176, 4, 0.15), rgba(243, 176, 4, 0.05));
    color: var(--accent);
    border: 1px solid rgba(243, 176, 4, 0.3);
}

.drawer-action-btn.call-btn:hover {
    background: linear-gradient(135deg, var(--accent), #ffca28);
    color: #111;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 176, 4, 0.3);
}

.drawer-action-btn.whatsapp-btn {
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.15), rgba(46, 196, 182, 0.05));
    color: var(--success);
    border: 1px solid rgba(46, 196, 182, 0.3);
}

.drawer-action-btn.whatsapp-btn:hover {
    background: linear-gradient(135deg, var(--success), #4cd137);
    color: #fff;
    border-color: var(--success);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 196, 182, 0.3);
}

/* Tabs */
/* Drawer Panels Container */
.drawer-panels-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 10px 0;
}

@media (max-width: 900px) {
    .drawer-panels-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Drawer Panel */
.drawer-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drawer-panel:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.drawer-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.03), transparent);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.drawer-panel-header:hover {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

.drawer-panel:not(.collapsed) .drawer-panel-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.panel-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-panel-header .badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.panel-caret {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.drawer-panel-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    max-height: 1500px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease, opacity 0.35s ease;
}

.drawer-panel.collapsed .drawer-panel-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    border-top-color: transparent;
}

.drawer-panel.collapsed .panel-caret {
    transform: rotate(-90deg);
}

/* Panel Item Cards */
.panel-item-card {
    background-color: rgba(255, 255, 255, 0.005);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    border-left: 3px solid var(--border-color);
    transition: var(--transition);
}

.panel-item-card:hover {
    border-color: rgba(255, 255, 255, 0.06);
    background-color: rgba(255, 255, 255, 0.02);
}

.panel-item-card.type-call { border-left-color: var(--warning); }
.panel-item-card.type-return { border-left-color: #36a2eb; }
.panel-item-card.type-issue { border-left-color: var(--danger); }
.panel-item-card.type-dropshipping { border-left-color: var(--success); }

.panel-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.panel-item-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panel-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.panel-item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
}

.panel-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
}

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

.panel-item-link {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.panel-item-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Panel Empty State */
.panel-empty-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 16px 0;
    font-style: italic;
}

/* Drawer Loading/Empty updates */
.timeline-loading,
.timeline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    gap: 12px;
    text-align: center;
}

.timeline-loading i {
    font-size: 1.5rem;
    color: var(--accent);
}

/* ==========================================================================
   Utility Classes (Added for Refactoring Inline CSS)
   ========================================================================== */

/* Grid / Flex Layouts */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.flex-row { display: flex; gap: 8px; align-items: center; }
.flex-row-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.flex-end { justify-content: flex-end; }
.flex-between { justify-content: space-between; }
.flex-center { justify-content: center; align-items: center; }
.action-bar-left { justify-content: flex-start; }
.action-cell-flex { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin: 0; }
.inline-flex-m0 { margin: 0; display: inline-flex; }

/* Text Utilities */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }

.text-right { text-align: right; }
.text-center { text-align: center; }

.fs-xs { font-size: 0.7rem; }
.fs-sm { font-size: 0.75rem; }
.fs-md { font-size: 0.85rem; }
.fs-lg { font-size: 1rem; }
.fw-500 { font-weight: 500; }

/* Margins / Paddings / Sizing */
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mr-1 { margin-right: 5px; }
.w-100 { width: 100%; }
.max-w-150 { max-width: 150px; }
.max-w-180 { max-width: 180px; }
.max-w-800 { max-width: 800px; }

/* Table specific utilities */
.action-cell { text-align: right; vertical-align: middle; }
.empty-cell { text-align: center; padding: 30px; color: var(--text-muted); }

/* Common repeated elements */
.meta-info-row {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2.5px;
    display: flex;
    gap: 8px;
    align-items: center;
}
.meta-info-row a {
    color: var(--text-secondary);
    text-decoration: none;
}
.meta-icon {
    font-size: 0.7rem;
    color: var(--accent);
    margin-right: 3px;
}
.thumbnail-img {
    max-height: 35px;
    max-width: 50px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    object-fit: cover;
}

/* Badge specific utilities */
.badge-success {
    background-color: rgba(46, 196, 182, 0.15);
    color: var(--success);
}
.badge-danger {
    background-color: rgba(231, 29, 54, 0.15);
    color: var(--danger);
}
.badge-warning {
    background-color: rgba(243, 176, 4, 0.15);
    color: var(--accent);
}
.badge-info {
    background-color: rgba(54, 162, 235, 0.15);
    color: #36a2eb;
}

/* Notification Read/Unread Status */
.notification-item {
    transition: background-color 0.2s;
}
.notification-item.unread {
    background-color: rgba(243, 176, 4, 0.05);
    border-left: 3px solid var(--accent);
}
.notification-item.unread .notification-item-title {
    font-weight: 600;
    color: #fff;
}
.notification-item.read {
    opacity: 0.7;
    border-left: 3px solid transparent;
}
.notification-item.read .notification-item-title {
    font-weight: 400;
}

/* =========================================
   CUSTOMER HISTORY DRAWER CARD STYLES
   ========================================= */

.panel-item-card {
    background: rgba(255, 255, 255, 0.02); 
    border-radius: 8px; 
    padding: 16px;
    border-left: 4px solid var(--text-muted); 
    border-top: 1px solid rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.02);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.panel-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    border-right-color: rgba(255,255,255,0.06);
}
.panel-item-card.type-call { border-left-color: var(--warning); }
.panel-item-card.type-return { border-left-color: #36a2eb; }
.panel-item-card.type-issue { border-left-color: var(--danger); }
.panel-item-card.type-dropshipping { border-left-color: var(--success); }

.panel-item-header {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
}
.panel-item-title-wrap {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.panel-item-title {
    margin: 0; font-size: 0.95rem; font-weight: 600; color: #fff; line-height: 1.4;
    letter-spacing: -0.3px;
}
.panel-item-date {
    font-size: 0.75rem; color: var(--text-muted); font-weight: 500;
}
.panel-item-desc {
    font-size: 0.85rem; color: #b0b3b8; line-height: 1.5; margin-bottom: 12px;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05);
}

.panel-item-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
}
.panel-item-meta {
    font-size: 0.8rem; color: var(--text-muted); font-weight: 500;
}
.panel-item-link {
    font-size: 0.8rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; padding: 4px 8px; border-radius: 4px; transition: all 0.2s;
}
.panel-item-link:hover {
    color: #111; background-color: var(--accent);
}

.timeline-loading {
    display: flex; align-items: center; justify-content: center; padding: 50px;
    color: var(--accent); gap: 10px; font-size: 1.1rem;
}
.timeline-empty {
    text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.95rem;
}
.panel-empty-text {
    text-align: center; color: var(--text-muted); font-size: 0.8rem; padding: 15px 0;
}

/* =========================================
   Form Doğrulama (Validation) Stilleri
   ========================================= */

.is-invalid {
    border-color: var(--danger) !important;
    background-color: rgba(231, 29, 54, 0.05) !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.invalid-feedback {
    display: none;
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
}

.is-invalid + .invalid-feedback {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* =========================================
   Spotlight Global Search Modalı
   ========================================= */

.spotlight-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.spotlight-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.spotlight-modal {
    width: 100%;
    max-width: 600px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.spotlight-overlay.open .spotlight-modal {
    transform: scale(1) translateY(0);
}

.spotlight-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.spotlight-icon {
    font-size: 1.2rem;
    color: var(--accent);
    margin-right: 15px;
}

.spotlight-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
}
.spotlight-input::placeholder {
    color: var(--text-muted);
}

.spotlight-shortcut {
    font-size: 0.7rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 3px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.spotlight-body {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-surface);
}

.spotlight-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.spotlight-loading i {
    margin-right: 8px;
    color: var(--accent);
}

.spotlight-empty-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spotlight-results {
    display: flex;
    flex-direction: column;
}

.spotlight-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: var(--text-primary);
}
.spotlight-item:last-child {
    border-bottom: none;
}
.spotlight-item:hover, .spotlight-item.active {
    background: rgba(243, 176, 4, 0.08); /* accent with opacity */
}

.spotlight-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.spotlight-item-content {
    flex: 1;
    overflow: hidden;
}

.spotlight-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-item-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.spotlight-footer {
    padding: 10px 20px;
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.spotlight-footer kbd {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    padding: 2px 5px;
    font-family: inherit;
    font-size: 0.7rem;
    margin: 0 2px;
}

/* --- MÜŞTERİ 360° YENİ ÇEKMECE EKLENTİSİ --- */
.drawer-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.2s ease, background 0.2s ease;
}
.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.drawer-section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.drawer-section-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-timeline {
    position: relative;
    padding-left: 50px;
}
.drawer-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-card {
    position: relative;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}
.timeline-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.1);
}
.timeline-node {
    position: absolute;
    left: -29px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transform: translateX(-50%);
    font-size: 0.8rem;
}

.timeline-card.type-call .timeline-node { border-color: var(--warning); color: var(--warning); box-shadow: 0 0 10px rgba(243, 176, 4, 0.3); }
.timeline-card.type-return .timeline-node { border-color: #36a2eb; color: #36a2eb; box-shadow: 0 0 10px rgba(54, 162, 235, 0.3); }
.timeline-card.type-issue .timeline-node { border-color: var(--danger); color: var(--danger); box-shadow: 0 0 10px rgba(231, 29, 54, 0.3); }
.timeline-card.type-dropshipping .timeline-node { border-color: var(--success); color: var(--success); box-shadow: 0 0 10px rgba(46, 196, 182, 0.3); }

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.timeline-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
.timeline-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.timeline-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
}
.timeline-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-sub-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.05);
}
.timeline-sub-note-item {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-left: 2px solid var(--text-muted);
}

.timeline-card-link {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    margin-top: 10px;
    font-weight: 600;
}
.timeline-card-link:hover { text-decoration: underline; color: #ffca28; }
