@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --smoods-primary: #0284c7;            /* Premium Royal Blue */
    --smoods-primary-hover: #0369a1;
    --smoods-primary-light: #f0f9ff;
    
    --smoods-sidebar-bg: #0b1329;        /* Deep Space Blue */
    --smoods-sidebar-active: #0284c7;
    --smoods-sidebar-text: #94a3b8;
    
    --smoods-body-bg: #f8fafc;
    --smoods-card-bg: #ffffff;
    --smoods-text-primary: #0f172a;
    --smoods-text-secondary: #475569;
    --smoods-border-color: #e2e8f0;
    
    --smoods-radius-sm: 8px;
    --smoods-radius-md: 12px;
    --smoods-radius-lg: 16px;
    
    --smoods-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --smoods-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --smoods-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--smoods-body-bg);
    color: var(--smoods-text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ----------------------------------------------------
 * Layout Core Elements
 * ---------------------------------------------------- */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-wrapper {
    flex-grow: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----------------------------------------------------
 * Desktop Sidebar
 * ---------------------------------------------------- */
.sidebar-desktop {
    width: 260px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background-color: var(--smoods-sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1000;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    height: 70px;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
}

.sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.brand-icon-box {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--smoods-primary) 0%, #38bdf8 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.sidebar-menu-wrapper {
    overflow-y: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

/* Custom modern scrollbar for Sidebar wrapper */
.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ----------------------------------------------------
 * Mobile Offcanvas Sidebar
 * ---------------------------------------------------- */
.sidebar-mobile {
    background-color: var(--smoods-sidebar-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    width: 280px !important;
}

/* ----------------------------------------------------
 * Sidebar Navigation Lists & Styling
 * ---------------------------------------------------- */
.sidebar-menu {
    padding: 0 0.75rem;
    gap: 2px;
}

.sidebar-menu .sidebar-header-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    padding: 1.25rem 0.75rem 0.35rem 0.75rem;
    list-style: none;
}

.sidebar-menu .nav-item {
    list-style: none;
    width: 100%;
}

.sidebar-menu .nav-link {
    color: var(--smoods-sidebar-text) !important;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--smoods-radius-sm);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.sidebar-menu .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-menu .nav-link.active {
    background-color: var(--smoods-sidebar-active) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.sidebar-menu .nav-icon {
    width: 1.5rem;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu .nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.sidebar-menu .nav-link[aria-expanded="true"] .nav-arrow {
    transform: rotate(-90deg);
}

/* Submenu layout */
.sidebar-menu .collapse ul {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 1.45rem;
}

.sidebar-menu .collapse .nav-link {
    padding: 0.45rem 0.75rem;
    font-size: 0.84rem;
}

.sidebar-menu .collapse .nav-link.active {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    border-left: 2px solid var(--smoods-primary);
    border-radius: 0 var(--smoods-radius-sm) var(--smoods-radius-sm) 0;
}

/* ----------------------------------------------------
 * Desktop Collapse State
 * ---------------------------------------------------- */
@media (min-width: 992px) {
    .sidebar-collapsed .sidebar-desktop {
        width: 70px;
    }
    
    .sidebar-collapsed .main-wrapper {
        margin-left: 70px;
    }
    
    .sidebar-collapsed .brand-text,
    .sidebar-collapsed .sidebar-header-title,
    .sidebar-collapsed .sidebar-menu span,
    .sidebar-collapsed .sidebar-menu .nav-arrow,
    .sidebar-collapsed .sidebar-menu .collapse {
        display: none !important;
    }
    
    .sidebar-collapsed .sidebar-menu .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }
    
    .sidebar-collapsed .sidebar-menu .nav-icon {
        margin-right: 0;
    }
}

/* ----------------------------------------------------
 * Mobile State Adjustments
 * ---------------------------------------------------- */
@media (max-width: 991.98px) {
    .main-wrapper {
        margin-left: 0 !important;
    }
}

/* ----------------------------------------------------
 * Top Header Navbar
 * ---------------------------------------------------- */
.app-header {
    height: 70px;
    z-index: 900;
}

.btn-quick-pos {
    background-color: #10b981;
    color: #ffffff !important;
    border-radius: 20px;
    padding: 0.4rem 1.1rem;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}

.btn-quick-pos:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}

.user-avatar-badge {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--smoods-primary) 0%, #38bdf8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25);
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.6rem !important;
    text-decoration: none;
}

/* ----------------------------------------------------
 * Main Content Styles
 * ---------------------------------------------------- */
.app-main-content {
    flex-grow: 1;
    background-color: var(--smoods-body-bg);
}

.app-content-header h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Cards elevation & style */
.card {
    background-color: var(--smoods-card-bg);
    border: 1px solid var(--smoods-border-color);
    border-radius: var(--smoods-radius-md);
    box-shadow: var(--smoods-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--smoods-border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
}

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

.table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--smoods-text-secondary);
    background-color: #f8fafc !important;
    border-bottom: 2px solid var(--smoods-border-color);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    color: var(--smoods-text-primary);
    font-size: 0.88rem;
}

/* Breadcrumbs styling */
.breadcrumb-item a {
    color: var(--smoods-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--smoods-text-secondary);
    font-weight: 500;
}

/* Modern Pill Badges */
.badge {
    padding: 0.45em 0.85em;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}

/* Custom Status Styles */
.bg-success-subtle {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.bg-warning-subtle {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.bg-info-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
}

/* ----------------------------------------------------
 * Alert banners
 * ---------------------------------------------------- */
.alert {
    border-radius: var(--smoods-radius-md);
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Footer layout */
.app-footer {
    font-size: 0.85rem;
}
