/* ==========================================================================
   CGDS Sipariş Yönetim Sistemi - Ana CSS Dosyası
   Modern, responsive ve kullanıcı dostu tasarım
   ========================================================================== */

:root {
    /* Ana Renkler */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --info: #4299e1;
    
    /* Boyutlar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    
    /* Geçişler */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    
    /* Gölgeler */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --radius-xl: 20px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2d3748;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    position: fixed;
    top: 0;
    left: 0;
    transition: var(--transition);
    z-index: 1040;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
}

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

.sidebar-header {
    padding: 2rem 1.5rem;
    color: white;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar .logo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    object-fit: contain;
}

/* Menu Styles */
.menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.menu li {
    margin: 0.25rem 0;
}

.menu li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    position: relative;
    font-weight: 500;
}

.menu li a:hover,
.menu li.active a {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(5px);
}

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

/* Bildirim Badge */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 15px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    padding: 1.5rem;
    min-height: 100vh;
}

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

/* Top Bar */
.top-bar {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.toggle-sidebar {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    background: none;
}

.toggle-sidebar:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.user-info .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
}

/* ==========================================================================
   CONTENT CARDS
   ========================================================================== */
.content {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.content-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.content-header p {
    color: #718096;
    margin: 0;
    font-size: 1.1rem;
}

/* ==========================================================================
   STAT CARDS
   ========================================================================== */
.stat-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-left: 4px solid;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.primary { border-left-color: var(--primary); }
.stat-card.success { border-left-color: var(--success); }
.stat-card.info { border-left-color: var(--info); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }

.stat-card .stat-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    color: var(--primary);
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.form-section h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.form-section h3 i {
    margin-right: 0.5rem;
    color: var(--secondary);
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #38a169 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #e53e3e 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #dd6b20 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #3182ce 100%);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f7fafc;
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-beklemede { background: var(--warning); color: white; }
.badge-onaylandi { background: var(--info); color: white; }
.badge-uretimde { background: var(--info); color: white; }
.badge-tamamlandi { background: var(--success); color: white; }
.badge-teslim-edildi { background: var(--success); color: white; }
.badge-iptal { background: var(--danger); color: white; }

/* ==========================================================================
   TABS
   ========================================================================== */
.tabs {
    display: flex;
    border-bottom: 1px solid #e3e6f0;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    background: #f8f9fc;
}

.tab:hover {
    color: var(--primary);
    background: white;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-content {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(72, 187, 120, 0.1);
    border-left-color: var(--success);
    color: #2f855a;
}

.alert-danger {
    background: rgba(245, 101, 101, 0.1);
    border-left-color: var(--danger);
    color: #c53030;
}

.alert-warning {
    background: rgba(237, 137, 54, 0.1);
    border-left-color: var(--warning);
    color: #dd6b20;
}

.alert-info {
    background: rgba(66, 153, 225, 0.1);
    border-left-color: var(--info);
    color: #3182ce;
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */
.notification-card {
    background: linear-gradient(135deg, var(--info) 0%, #2b6cb0 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(66, 153, 225, 0.3);
}

.notification-item {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.notification-item.unread {
    border-left: 3px solid #ffd700;
    background: rgba(255,255,255,0.15);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 1.5rem;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .top-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-info {
        order: -1;
    }
}

@media (max-width: 576px) {
    .content {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    /* Sipariş kutuları mobilde daha kompakt */
    .siparis-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .siparis-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .siparis-durum {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Mobil tablolar */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table-responsive .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Mobil filtreler */
    .filter-panel {
        padding: 1rem;
    }
    
    .filter-panel .row .col-md-3 {
        margin-bottom: 1rem;
    }
    
    /* WhatsApp bilgi kutusu gizle */
    .whatsapp-info {
        display: none;
    }
}

/* ==========================================================================
   SIDEBAR OVERLAY (Mobile)
   ========================================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
}

.sidebar-overlay.active {
    display: block;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-info { background-color: var(--info) !important; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* ==========================================================================
   LOADING ANIMATIONS
   ========================================================================== */

/* Loading Spinner Overlay */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .sidebar,
    .top-bar,
    .btn,
    .notification-card {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .content {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
} 