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

:root {
    --primary-green: #11361b;
    --accent-green: #2e7d32;
    --light-accent: #a3e635;
    --mint-soft: #e8f5e9;
    --bg-cream: #f6f8f5;
    --card-shadow: 0 10px 30px rgba(16, 54, 27, 0.05);
    --hover-shadow: 0 15px 35px rgba(16, 54, 27, 0.1);
    --border-color: #e2e8f0;
}

html,
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-cream);
    color: #334155;
    overflow-x: visible;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--primary-green);
    min-height: 100vh;
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand span {
    color: var(--light-accent);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-item {
    margin: 0.2rem 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-item.active .sidebar-link {
    background-color: var(--light-accent);
    color: var(--primary-green);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(163, 230, 53, 0.2);
}

.sidebar-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Submenu Styling */
.submenu {
    list-style: none;
    padding-left: 2.2rem;
    margin: 0.2rem 0;
}
.submenu-item {
    margin: 0.2rem 0;
}
.submenu-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.submenu-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}
.submenu-item.active .submenu-link {
    color: var(--light-accent);
    font-weight: 600;
    background-color: rgba(163, 230, 53, 0.12);
}
.sidebar-link .sub-arrow {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
}
.sidebar-link[aria-expanded="true"] .sub-arrow {
    transform: rotate(180deg);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Navbar */
.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 1010;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-accent);
}

/* Premium Card Design */
.premium-card {
    background: #ffffff;
    border: 1px solid rgba(16, 54, 27, 0.05);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

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

.premium-header {
    border-bottom: 1px solid rgba(16, 54, 27, 0.05);
    padding: 1.5rem;
    background: transparent;
}

.card-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-mint-soft {
    background-color: var(--mint-soft);
    color: var(--accent-green);
}

/* Stats Cards */
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* Buttons */
.btn-primary-green {
    background-color: var(--primary-green);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary-green:hover, .btn-primary-green:focus {
    background-color: var(--accent-green);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.2);
}

.btn-light-accent {
    background-color: var(--light-accent);
    color: var(--primary-green);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-light-accent:hover {
    background-color: #8ed024;
    color: var(--primary-green);
}

/* POS Cash Register Styles */
.pos-menu-card {
    cursor: pointer;
    border-radius: 16px;
    border: 1px solid rgba(16, 54, 27, 0.05);
    transition: all 0.2s ease;
}

.pos-menu-card:hover {
    box-shadow: var(--hover-shadow);
    border-color: var(--light-accent);
    transform: scale(1.02);
}

.pos-cart-list {
    max-height: 400px;
    overflow-y: auto;
}

.pos-cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

/* Responsive Table */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table-responsive table {
    min-width: 680px;
    margin-bottom: 0;
}

.table-responsive th,
.table-responsive td {
    white-space: nowrap;
}

.table thead {
    background-color: var(--primary-green);
    color: #ffffff;
}

.table th {
    font-weight: 600;
    padding: 0.9rem 1rem;
}

.table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

/* Glassmorphism Login */
.login-bg {
    background: linear-gradient(135deg, var(--primary-green) 0%, #081d0f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--light-accent);
    border-radius: 50%;
    top: -50px;
    left: -50px;
    opacity: 0.15;
    filter: blur(80px);
}

.login-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-green);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
    opacity: 0.2;
    filter: blur(100px);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    z-index: 10;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

/* Responsive adjustments & Mobile Offcanvas Drawer */
.offcanvas-sidebar {
    background-color: var(--primary-green) !important;
    width: 290px !important;
    max-width: 85vw !important;
    z-index: 1045 !important;
    color: #ffffff;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.35);
    border: none !important;
}

.offcanvas-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
}

.offcanvas-sidebar .offcanvas-body {
    padding: 1rem 0 2rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1020;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 10px;
    transition: all 0.15s ease;
    flex: 1;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.mobile-nav-item:hover, .mobile-nav-item.active {
    color: var(--primary-green);
    font-weight: 700;
}

.mobile-nav-pos {
    position: relative;
    top: -12px;
}

.mobile-nav-pos .pos-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(17, 54, 27, 0.35);
    margin: 0 auto 2px;
    border: 3px solid #ffffff;
    transition: transform 0.2s ease;
}

.mobile-nav-pos:active .pos-icon-circle {
    transform: scale(0.92);
}

.mobile-nav-pos .pos-icon-circle i {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.mobile-nav-pos span {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 0.72rem;
}

@media (max-width: 991px) {
    .main-wrapper {
        margin-left: 0;
        padding-bottom: 84px;
    }
    .top-navbar {
        padding: 0.75rem 1rem;
    }
    .top-navbar h4 {
        font-size: 1.1rem;
        max-width: 250px;
    }
}

@media (max-width: 767px) {
    .top-navbar h4 {
        font-size: 0.98rem;
        max-width: 170px;
    }
    .premium-header {
        padding: 1rem;
    }
    .card-body {
        padding: 1rem !important;
    }
    .stat-value {
        font-size: 1.4rem;
    }
}

/* Animations & Micro-interactions */
@keyframes popIn {
    0% { transform: scale(0.92); opacity: 0; }
    70% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

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

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(46, 125, 50, 0); }
}

.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-slide-up {
    animation: slideUpFade 0.3s ease-out forwards;
}

.modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.badge-bounce {
    animation: badgeBounce 0.3s ease-in-out;
}

