/**
 * Kafe Sipariş Sistemi - Ana Stil Dosyası
 */

/* ============================================
   CSS Variables & Root
============================================ */
:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    
    /* Secondary Colors */
    --secondary: #64748b;
    --secondary-dark: #475569;
    
    /* Status Colors */
    --success: #22c55e;
    --success-light: #86efac;
    --danger: #ef4444;
    --danger-light: #fca5a5;
    --warning: #f59e0b;
    --warning-light: #fcd34d;
    --info: #06b6d4;
    --info-light: #67e8f9;
    
    /* Neutral Colors */
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    --gradient-danger: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   Base Styles
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--gray-100);
    min-height: 100vh;
}

/* ============================================
   Typography
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

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

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   Layout
============================================ */
.main-content {
    padding-top: 70px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* ============================================
   Navbar
============================================ */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: background var(--transition-fast);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gray-100);
}

/* ============================================
   Cards
============================================ */
.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: var(--white);
}

.stat-card.primary { background: var(--gradient-primary); }
.stat-card.success { background: var(--gradient-success); }
.stat-card.danger { background: var(--gradient-danger); }
.stat-card.dark { background: var(--gradient-dark); }

.stat-card .stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   Buttons
============================================ */
.btn {
    font-weight: 500;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    border: none;
    transition: all var(--transition-fast);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

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

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

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* ============================================
   Forms
============================================ */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-right: none;
}

/* ============================================
   Tables
============================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--gray-50);
}

/* ============================================
   Badges
============================================ */
.badge {
    font-weight: 500;
    padding: 0.375em 0.75em;
    border-radius: var(--radius-full);
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.25em 0.625em;
}

/* ============================================
   Alerts
============================================ */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

/* ============================================
   Login Page
============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    top: -100px;
    right: -100px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--info);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.1;
    bottom: -100px;
    left: -100px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo h1 {
    font-size: 1.5rem;
    margin-top: 0.75rem;
    color: var(--gray-800);
}

.login-form .form-control {
    background: var(--gray-50);
    border: 2px solid transparent;
}

.login-form .form-control:focus {
    background: var(--white);
    border-color: var(--primary);
}

.login-form .btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* ============================================
   Tables Grid (Masa Görünümü)
============================================ */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.table-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

.table-card.bos {
    border-left: 4px solid var(--success);
}

.table-card.dolu {
    border-left: 4px solid var(--danger);
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

.table-card.rezerve {
    border-left: 4px solid var(--warning);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.table-card .table-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.table-card .table-info {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.table-card .table-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.table-card .table-status.bos { background: var(--success); }
.table-card .table-status.dolu { background: var(--danger); }
.table-card .table-status.rezerve { background: var(--warning); }

.table-card .table-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--danger);
    margin-top: 0.5rem;
}

/* ============================================
   Order Items
============================================ */
.order-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.order-item-info {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
    color: var(--gray-800);
}

.order-item-note {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-style: italic;
}

.order-item-qty {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--gray-700);
    margin-right: 1rem;
}

.order-item-price {
    font-weight: 600;
    color: var(--gray-800);
    min-width: 80px;
    text-align: right;
}

/* ============================================
   Product Grid (Sipariş Alma)
============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.product-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.product-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.product-card .product-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9375rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.category-tab {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

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

/* ============================================
   Kitchen Display
============================================ */
.kitchen-order {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.kitchen-order-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kitchen-order-header.waiting {
    background: var(--warning-light);
}

.kitchen-order-header.preparing {
    background: var(--info-light);
}

.kitchen-order-header.ready {
    background: var(--success-light);
}

.kitchen-order-body {
    padding: 1rem;
}

.kitchen-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--gray-200);
}

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

.kitchen-item-qty {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-800);
    margin-right: 0.75rem;
    min-width: 30px;
}

.kitchen-item-name {
    font-weight: 500;
    flex: 1;
}

.kitchen-timer {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: monospace;
}

.kitchen-timer.warning {
    color: var(--warning);
}

.kitchen-timer.danger {
    color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

/* ============================================
   Receipt / Bill
============================================ */
.receipt {
    background: var(--white);
    max-width: 320px;
    margin: 0 auto;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed var(--gray-400);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-company {
    font-weight: 700;
    font-size: 1.125rem;
}

.receipt-items {
    border-bottom: 1px dashed var(--gray-400);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.receipt-totals {
    border-bottom: 1px dashed var(--gray-400);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.receipt-total-row.grand {
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.receipt-footer {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

/* ============================================
   Utilities
============================================ */
.text-primary { color: var(--primary) !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; }
.text-muted { color: var(--gray-500) !important; }

.bg-primary-soft { background: rgba(99, 102, 241, 0.1) !important; }
.bg-success-soft { background: rgba(34, 197, 94, 0.1) !important; }
.bg-danger-soft { background: rgba(239, 68, 68, 0.1) !important; }
.bg-warning-soft { background: rgba(245, 158, 11, 0.1) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

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

.hover-lift {
    transition: transform var(--transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 768px) {
    .main-content {
        padding-top: 60px;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ============================================
   Print Styles
============================================ */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .receipt {
        box-shadow: none;
        max-width: 100%;
    }
}

/* ============================================
   Animations
============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
