/* ========================================
   EPOS Modern F&B Theme
   Purple Gradient & Professional Styling
   ======================================== */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-gold: #FFD700;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    --warning-color: #ffa94d;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-light: #e8e8e8;
}

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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--dark-text);
}

/* ========================================
   MAIN LAYOUT & NAVIGATION
   ======================================== */

.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand::before {
    content: '🍽️';
    font-size: 28px;
}

.nav-link, .navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.15);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px;
    font-weight: 600;
    font-size: 16px;
}

.card-body {
    padding: 25px;
}

.card-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--border-light);
    padding: 15px 25px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

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

.btn-secondary {
    background: #f0f0f0;
    color: var(--dark-text);
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    color: var(--dark-text);
}

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

.btn-success:hover {
    background: #3fa36b;
    transform: translateY(-3px);
    color: white;
}

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

.btn-danger:hover {
    background: #ff5252;
    transform: translateY(-3px);
    color: white;
}

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

.btn-warning:hover {
    background: #ff9933;
    transform: translateY(-3px);
    color: white;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.form-control, .form-select {
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-control::placeholder {
    color: #999;
}

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

.input-group .form-control {
    border-right: none;
}

.input-group.focus .form-control {
    border-color: var(--primary-color);
}

/* ========================================
   TABLES
   ======================================== */

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.table thead {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    border-color: var(--border-light);
    font-weight: 600;
    padding: 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    font-size: 14px;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */

.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--primary-color);
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-gradient);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

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

.badge-warning {
    background: var(--warning-color);
    color: white;
}

/* ========================================
   DASHBOARD STATS
   ======================================== */

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* ========================================
   SIDEBAR/MENU ITEMS
   ======================================== */

.list-group-item {
    border: 1px solid var(--border-light);
    padding: 12px 20px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    color: var(--dark-text);
    background: white;
}

.list-group-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.list-group-item.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
}

/* ========================================
   MODALS
   ======================================== */

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 20px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-header h5 {
    font-weight: 700;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 15px 25px;
    background: #f8f9fa;
}

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

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-slideDown {
    animation: slideDown 0.5s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.5s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item {
    color: var(--dark-text);
    font-size: 14px;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    margin-top: 30px;
}

.page-link {
    color: var(--primary-color);
    border-color: var(--border-light);
    border-radius: 8px;
    margin: 0 4px;
    font-weight: 500;
}

.page-link:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--primary-gradient);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    font-size: 14px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 20px;
    }
    
    .card-body, .card-header, .card-footer {
        padding: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table thead th {
        padding: 12px;
    }
    
    .table tbody td {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .list-group-item {
        padding: 10px 15px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.bg-light-purple {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
}

.shadow-lg {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
}

.rounded-lg {
    border-radius: 15px !important;
}

.text-muted {
    color: #999 !important;
}

.divider {
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

/* ========================================
   RESPONSIVE TABLE SCROLL (MOBILE FIX)
   ======================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
    min-width: 600px;
}

/* ========================================
   SORTABLE TABLE HEADERS
   ======================================== */

th.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    padding-right: 26px !important;
    position: relative;
    transition: background 0.2s;
}

th.sortable-th:hover {
    background: rgba(255, 255, 255, 0.18) !important;
}

th.sortable-th::after {
    content: '⇅';
    position: absolute;
    right: 7px;
    opacity: 0.45;
    font-size: 11px;
    top: 50%;
    transform: translateY(-50%);
}

th.sortable-th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

th.sortable-th.sort-desc::after {
    content: '↓';
    opacity: 1;
}
