/* Restaurant Management System - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Enhanced Restaurant Management Navbar */
.rms-navbar {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
}

/* Brand Section */
.navbar-brand-section {
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white !important;
    padding: 0;
    margin: 0;
}

.brand-logo {
    width: 32%;
    height: 48px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.brand-tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Custom Mobile Toggle */
.rms-toggler {
    border: none;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.toggler-line {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.rms-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Main Navigation */
.rms-nav-main {
    flex: 1;
    margin: 0 2rem;
    display: flex;
    gap: 0.5rem;
}

.rms-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rms-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.rms-nav-link:hover::before {
    left: 100%;
}

.rms-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rms-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-text {
    font-weight: 500;
    white-space: nowrap;
}

.nav-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 4px;
    animation: pulse 2s ease-in-out infinite;
}

.nav-badge.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Dropdown Menus */
.rms-dropdown-menu {
    background: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    margin-top: 8px;
    min-width: 280px;
}

/* Right-aligned dropdowns */
.rms-nav-right .dropdown-menu {
    right: 0;
    left: auto;
    transform: none !important;
}

/* Prevent dropdown overflow */
.rms-nav-right .dropdown {
    position: relative;
}

.rms-nav-right .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    margin-top: 8px;
    max-width: 320px;
    width: max-content;
}

/* Bootstrap dropdown-menu-end override */
.dropdown-menu-end {
    --bs-position: end;
    right: 0 !important;
    left: auto !important;
}

/* Ensure navbar container doesn't overflow */
.rms-navbar .container-fluid {
    overflow: visible;
    position: relative;
}

/* User dropdown specific positioning */
.rms-user-dropdown .dropdown-menu {
    min-width: 280px;
    max-width: 320px;
    right: 0;
    left: auto;
    transform: none !important;
    margin-top: 12px;
}

.rms-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.rms-dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
    transform: translateX(4px);
}

.rms-dropdown-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(4px);
}

.rms-dropdown-item.active i {
    color: white;
}

.rms-dropdown-item.active small {
    color: rgba(255, 255, 255, 0.8) !important;
}

.rms-dropdown-item i {
    width: 16px;
    text-align: center;
}

.rms-dropdown-item span {
    flex: 1;
}

.rms-dropdown-item small {
    font-size: 0.75rem;
    color: #9ca3af;
}

.dropdown-header {
    font-weight: 600;
    color: #374151;
    padding: 8px 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

/* Right Side Navigation */
.rms-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Notifications */
.rms-notifications .nav-icon {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #2563eb;
    animation: pulse 2s ease-in-out infinite;
}

.notification-menu {
    min-width: 320px;
}

.notification-menu .rms-dropdown-item {
    align-items: flex-start;
    padding: 12px 16px;
}

.notification-menu .rms-dropdown-item div {
    flex: 1;
}

/* User Profile */
.rms-user-link {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 180px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.user-menu {
    min-width: 280px;
    right: 0;
    left: auto;
    transform: none !important;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.logout-item {
    color: #dc2626 !important;
}

.logout-item:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* CTA Button */
.rms-cta-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.rms-cta-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .rms-nav-main {
        margin: 1rem 0;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .rms-nav-right {
        margin-left: 0;
        flex-direction: column;
        gap: 0.25rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .rms-user-link {
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
    }
    
    .brand-text {
        display: none;
    }
    
    .nav-text {
        display: block;
    }
    
    .rms-dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        margin: 8px 0;
        border-radius: 12px;
    }
    
    .rms-dropdown-item {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .rms-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    .rms-dropdown-item.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        transform: translateX(4px);
    }
    
    .rms-dropdown-item.active i {
        color: white;
    }
    
    .rms-dropdown-item.active small {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .dropdown-header {
        color: rgba(255, 255, 255, 0.8);
    }
}

@media (max-width: 576px) {
    .navbar-brand-section {
        flex: 1;
    }
    
    .brand-logo {
        width: 32%;
        height: 40px;
        font-size: 18px;
    }
    
    .rms-nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
}

/* Animation Keyframes */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b02a37);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    border: none;
    color: var(--dark-color);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0aa2c0);
    border: none;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: #f1f3f4;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Dashboard Stats Cards */
.stats-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-left-color: var(--success-color);
    transform: translateX(5px);
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Menu Item Cards */
.menu-item-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-item-card:hover {
    transform: scale(1.02);
}

.menu-item-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.menu-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Order Status Badges */
.order-status {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
}

.order-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.order-status.confirmed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.order-status.preparing {
    background-color: #f8d7da;
    color: #721c24;
}

.order-status.ready {
    background-color: #d4edda;
    color: #155724;
}

.order-status.delivered {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Category Cards */
.category-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Flash Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    box-shadow: var(--box-shadow);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--border-radius);
    margin: 0 0.25rem;
    border: 2px solid #e9ecef;
    color: var(--primary-color);
    font-weight: 500;
}

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

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

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #495057) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
}

.page-header h1 {
    margin: 0;
    font-weight: 700;
}

.page-header .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.page-header .breadcrumb-item.active {
    color: white;
}
