/**
 * SmartChef Admin Dashboard Styles
 */

/* ============================================
   Base Styles
   ============================================ */

:root {
    --admin-dark: #1a1a2e;
    --admin-primary: #0d6efd;
    --admin-accent: #6610f2;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ============================================
   Loading Screen
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-dark) 0%, #16213e 100%);
    z-index: 9999;
}

.loading-screen .spinner-border {
    color: white !important;
}

.loading-screen p {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Access Denied Screen
   ============================================ */

.access-denied {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc3545 0%, #6c1f1f 100%);
    color: white;
}

/* ============================================
   Login Screen
   ============================================ */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-dark) 0%, #16213e 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

.nav-link {
    transition: background-color 0.2s;
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

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

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

/* ============================================
   Cards
   ============================================ */

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Stat Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

.card.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
}

.card.bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

/* ============================================
   Tables
   ============================================ */

.table {
    margin-bottom: 0;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    background-color: #f8f9fa;
}

.table tbody tr {
    transition: background-color 0.15s;
}

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

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: #e9ecef !important;
}

.sortable i {
    font-size: 0.7rem;
    opacity: 0.5;
}

/* ============================================
   Badges
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ============================================
   Buttons
   ============================================ */

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

/* ============================================
   Forms
   ============================================ */

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

/* ============================================
   Utilities
   ============================================ */

.text-dark-50 {
    color: rgba(0, 0, 0, 0.5) !important;
}

.opacity-50 {
    opacity: 0.5;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
    }
}

/* ============================================
   Animations
   ============================================ */

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

.card {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================
   Toast Customization
   ============================================ */

.toast {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Modal Customization
   ============================================ */

.modal-content {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
