/*
=== HOTEL ERP RESTAURANT THEME ===
Custom CSS for Restaurant Management System
*/

/* Restaurant Primary Colors */
:root {
    --restaurant-primary: #d4691a;
    --restaurant-secondary: #8b4513;
    --restaurant-accent: #ff6b35;
    --restaurant-success: #28a745;
    --restaurant-warning: #ffc107;
    --restaurant-danger: #dc3545;
    --restaurant-dark: #2c3e50;
    --restaurant-light: #f8f9fa;
    --kitchen-bg: #2c3e50;
    --pos-bg: #34495e;
}

/* Header & Navigation */
.iq-navbar {
    background: linear-gradient(135deg, var(--restaurant-primary), var(--restaurant-secondary)) !important;
    box-shadow: 0 2px 10px rgba(212, 105, 26, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-navbar .navbar-brand,
.iq-navbar .nav-link {
    color: white !important;
}

.iq-navbar .dropdown-menu {
    background: white;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.iq-sidebar {
    background: var(--restaurant-dark) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-sidebar .iq-sidebar-logo {
    background: var(--restaurant-primary) !important;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-sidebar .iq-sidebar-logo span {
    color: white !important;
    font-weight: bold;
    font-size: 18px;
}

.iq-sidebar .iq-menu {
    padding: 10px 0;
}

.iq-sidebar .iq-menu li {
    margin: 2px 10px;
}

.iq-sidebar .iq-menu li a {
    color: #ecf0f1 !important;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.iq-sidebar .iq-menu li a i {
    width: 20px;
    margin-right: 10px;
    font-size: 16px;
}

.iq-sidebar .iq-menu li a:hover,
.iq-sidebar .iq-menu li.active > a {
    background: var(--restaurant-primary) !important;
    color: white !important;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(212, 105, 26, 0.3);
}

.iq-sidebar .iq-menu .iq-menu-title {
    color: var(--restaurant-accent) !important;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 20px 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-sidebar .iq-submenu {
    background: rgba(0, 0, 0, 0.2) !important;
    margin: 5px 10px;
    border-radius: 8px;
    padding: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-sidebar .iq-submenu li a {
    padding: 8px 20px 8px 50px;
    font-size: 14px;
    color: #bdc3c7 !important;
    background: transparent !important;
    border-radius: 6px;
    margin: 2px 10px;
    transition: all 0.3s ease;
}

.iq-sidebar .iq-submenu li a:hover {
    background: var(--restaurant-accent) !important;
    color: white !important;
    transform: translateX(5px);
}

.iq-sidebar .iq-submenu li.active > a {
    background: var(--restaurant-primary) !important;
    color: white !important;
}

/* Fix for sidebar menu dropdown styles */
.iq-sidebar-menu .iq-menu li ul {
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 8px;
    margin: 5px 0;
    padding: 5px 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.iq-sidebar-menu .iq-menu li ul li a {
    color: #bdc3c7 !important;
    background: transparent !important;
    padding: 10px 20px 10px 60px !important;
    border-radius: 6px;
    margin: 2px 10px;
    transition: all 0.3s ease;
}

.iq-sidebar-menu .iq-menu li ul li a:hover {
    background: var(--restaurant-accent) !important;
    color: white !important;
    transform: translateX(5px);
}

.iq-sidebar-menu .iq-menu li ul li.active > a {
    background: var(--restaurant-primary) !important;
    color: white !important;
}

/* Restaurant-themed Loading Animation - Main Styles */

#loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading animation elements */

.resto-loader {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resto-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 10px;
}

.resto-logo img {
    width: 60px;
    height: 60px;
    animation: pulse 1.5s infinite;
}

.resto-logo::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--restaurant-primary), var(--restaurant-accent));
    opacity: 0.1;
    animation: pulse 2s infinite;
}

.loading-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 4px solid transparent;
    border-top: 4px solid white;
    border-right: 4px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-ring:nth-child(2) {
    width: 100px;
    height: 100px;
    border-top: 3px solid var(--restaurant-accent);
    border-right: 3px solid rgba(255, 107, 53, 0.5);
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.loading-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 2s infinite;
}

.loading-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 2s infinite 0.5s;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.loading-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: translateY(0);
        opacity: 0.7;
    }
    40% { 
        transform: translateY(-20px);
        opacity: 1;
    }
}

/* Hide default cube loader */
.loader .cube {
    display: none !important;
}

/* Progress bar animation - Hidden */
.loading-progress {
    display: none !important;
}

.loading-progress::before {
    display: none !important;
}

@keyframes progress {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Simple loading screen styles */
#loading {
    background: linear-gradient(135deg, var(--restaurant-primary), var(--restaurant-secondary)) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    pointer-events: auto !important;
}

#loading-center {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    pointer-events: none !important;
}

/* Hide any other loaders completely */
#loading .loader,
#load,
.loader {
    display: none !important;
}

/* Ensure our loading takes precedence over any other loading systems */
body.loading #loading,
html.loading-active #loading {
    display: flex !important;
}

/* Restaurant Loading Screen JavaScript Enhancement - Hidden */
.loading-percentage {
    display: none !important;
}

.loading-message {
    display: none !important;
}
.dropdown-menu {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
}

.dropdown-menu .dropdown-item {
    color: var(--restaurant-dark) !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background: var(--restaurant-light) !important;
    color: var(--restaurant-primary) !important;
}

/* Bootstrap dropdown fixes */
.nav-item .dropdown-menu {
    background: white !important;
    color: var(--restaurant-dark) !important;
}

.nav-item .dropdown-menu .dropdown-item {
    color: var(--restaurant-dark) !important;
}

.nav-item .dropdown-menu .dropdown-item:hover {
    background: var(--restaurant-light) !important;
    color: var(--restaurant-primary) !important;
}

/* Dashboard Cards */
.iq-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.iq-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.iq-card-header {
    padding: 1.25rem 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background: transparent;
}

.iq-card-body {
    padding: 1.25rem;
}

.iq-card-body.pb-0 {
    padding-bottom: 0;
}

.iq-card-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: #fff;
    font-size: 20px;
    margin-bottom: 15px;
    display: inline-block;
}

.iq-bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.iq-bg-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.iq-bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.iq-bg-danger {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.iq-bg-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Restaurant-specific card colors */
.iq-card.restaurant-orders {
    border-left: 4px solid var(--restaurant-primary);
}

.iq-card.kitchen-display {
    border-left: 4px solid var(--kitchen-bg);
}

.iq-card.pos-system {
    border-left: 4px solid var(--pos-bg);
}

.iq-card.inventory {
    border-left: 4px solid var(--restaurant-success);
}

/* Dashboard Utility Classes */
.line-height-6 {
    line-height: 1.6;
}

.line-height {
    line-height: 1.5;
}

.font-size-18 {
    font-size: 18px;
}

.counter {
    font-weight: 700;
}

.overflow-hidden {
    overflow: hidden;
}

.price-week-box {
    text-align: center;
}

.price-week-box span {
    font-size: 14px;
    color: #777;
    display: block;
    margin-bottom: 5px;
}

.price-week-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* Button Styling */
.btn-primary {
    background: var(--restaurant-primary);
    border-color: var(--restaurant-primary);
}

.btn-primary:hover {
    background: var(--restaurant-secondary);
    border-color: var(--restaurant-secondary);
}

.btn-restaurant {
    background: linear-gradient(135deg, var(--restaurant-primary), var(--restaurant-accent));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-restaurant:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 105, 26, 0.4);
    color: white;
}

/* POS System Styling */
.pos-container {
    background: var(--pos-bg);
    color: white;
    border-radius: 15px;
    padding: 20px;
}

.pos-item-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.pos-item-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Kitchen Display Styling */
.kitchen-display {
    background: var(--kitchen-bg);
    color: white;
    border-radius: 15px;
    padding: 20px;
}

.order-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid var(--restaurant-accent);
}

.order-card.preparing {
    border-left-color: var(--restaurant-warning);
    animation: pulse 2s infinite;
}

.order-card.ready {
    border-left-color: var(--restaurant-success);
}

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

/* Table Management */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.table-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.table-card.available {
    border-color: var(--restaurant-success);
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
}

.table-card.occupied {
    border-color: var(--restaurant-danger);
    background: linear-gradient(135deg, #f8d7da, #f1aeb5);
}

.table-card.reserved {
    border-color: var(--restaurant-warning);
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
}

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

/* Menu Items */
.menu-category {
    background: var(--restaurant-light);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.menu-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    border-left: 3px solid var(--restaurant-primary);
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: #f8f9fa;
    border-left-color: var(--restaurant-accent);
    transform: translateX(5px);
}

/* Order Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: var(--restaurant-warning);
    color: var(--restaurant-dark);
}

.status-preparing {
    background: var(--restaurant-primary);
    color: white;
}

.status-ready {
    background: var(--restaurant-success);
    color: white;
}

.status-served {
    background: var(--restaurant-dark);
    color: white;
}

/* Printer Settings */
.printer-card {
    border: 2px solid var(--restaurant-light);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.printer-card.active {
    border-color: var(--restaurant-success);
    background: rgba(40, 167, 69, 0.05);
}

.printer-card.inactive {
    border-color: #dee2e6;
    background: rgba(108, 117, 125, 0.05);
}

/* Stock & Inventory */
.stock-low {
    background: linear-gradient(135deg, #f8d7da, #f1aeb5);
    border-left: 4px solid var(--restaurant-danger);
}

.stock-medium {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left: 4px solid var(--restaurant-warning);
}

.stock-good {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left: 4px solid var(--restaurant-success);
}

/* Reports & Analytics */
.analytics-card {
    background: linear-gradient(135deg, white, #f8f9fa);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--restaurant-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .pos-container,
    .kitchen-display {
        margin: 10px;
        padding: 15px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--restaurant-light);
}

::-webkit-scrollbar-thumb {
    background: var(--restaurant-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--restaurant-secondary);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .receipt {
        font-family: 'Courier New', monospace;
        font-size: 12px;
        line-height: 1.2;
    }
}
