@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2D5A27;
    /* Deeper Green */
    --primary-hover: #1E3D1A;
    --accent-color: #4CAF50;
    --sidebar-bg: #1A3317;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--light-bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Base Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-soft {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

/* Glassmorphism Effects */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-md);
}

/* Navbar Enhancements */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
    padding: 0 1.5rem;
    height: 70px;
    z-index: 1050 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

.navbar-brand {
    font-size: 1.25rem;
    color: var(--primary-color) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Sidebar Styling */
.sidebar {
    min-width: 260px;
    width: 260px;
    background: var(--sidebar-bg);
    color: #fff;
    height: calc(100vh - 70px) !important;
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05) !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
    transition: var(--transition);
}

.sidebar-menu,
.navbar-nav {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0;
}

.sidebar-menu li,
.navbar-nav li {
    list-style: none !important;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 4px 12px;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    transition: var(--transition);
}

.sidebar .nav-link:hover i {
    transform: scale(1.2);
}

/* Main Content Wrapper */
.main-content {
    background: var(--light-bg);
    animation: fadeInUp 0.5s ease-out;
    margin-left: 260px;
    margin-top: 70px;
    min-height: calc(100vh - 70px) !important;
    width: calc(100% - 260px);
    transition: var(--transition);
}

.main-inner-container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .main-inner-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .main-inner-container {
        padding: 1rem;
    }
}

/* Professional Button Theme */
.btn {
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    box-shadow: 0 4px 14px rgba(45, 90, 39, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 39, 0.4);
}

.btn-outline-success {
    border-width: 2px;
}

.btn-outline-success:hover {
    transform: translateY(-2px);
}

/* Stat Cards Refinement */
.stat-card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    overflow: hidden;
}

.stat-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem !important;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border-radius: 12px;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: rotate(10deg) scale(1.1);
}

.stat-card-blue {
    border-bottom-color: #3b82f6;
}

.stat-card-blue .stat-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-card-blue .stat-title {
    color: #3b82f6;
}

.stat-card-green {
    border-bottom-color: #10b981;
}

.stat-card-green .stat-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-green .stat-title {
    color: #10b981;
}

.stat-card-yellow {
    border-bottom-color: #f59e0b;
}

.stat-card-yellow .stat-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-card-yellow .stat-title {
    color: #f59e0b;
}

.stat-card-red {
    border-bottom-color: #ef4444;
}

.stat-card-red .stat-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-card-red .stat-title {
    color: #ef4444;
}

.stat-card-teal {
    border-bottom-color: #14b8a6;
}

.stat-card-teal .stat-icon {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.stat-card-teal .stat-title {
    color: #14b8a6;
}

/* Form Styling */
.form-control,
.form-select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

/* Table Style */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent !important;
}

.table tr {
    transition: var(--transition);
}

.table tbody tr {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.table td,
.table th {
    padding: 16px;
    border: none;
}

.table tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table tr td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Table Responsiveness Fixes */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Custom Scrollbar for Laptop Tables */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #999;
}

@media (max-width: 768px) {
    .table thead {
        font-size: 0.75rem;
    }

    .table td,
    .table th {
        padding: 12px 8px;
    }
}

/* Login Box Enhancements */
.login-box {
    border-radius: 24px;
    padding: 48px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary-color);
    animation: pulse-soft 2s infinite ease-in-out;
}


/* Responsive Layout */
@media (max-width: 768px) {
    #wrapper {
        position: relative;
        overflow-x: hidden;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 70px;
        /* Below navbar */
        height: calc(100vh - 70px);
        transition: all 0.3s ease;
        z-index: 1040;
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.toggled {
        left: 0;
    }

    #page-content-wrapper {
        width: 100%;
        min-width: 100vw;
    }

    /* Mobile Backdrop */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1030;
    }

    .sidebar.toggled+.sidebar-backdrop,
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Adjust cards for mobile */
    .card-body {
        padding: 1.25rem !important;
    }

    /* Stack filter forms better */
    .row.g-3>.col-md-3,
    .row.g-3>.col-md-4,
    .row.g-3>.col-md-5 {
        width: 100% !important;
    }

    .btn-toolbar {
        width: 100%;
        margin-top: 1rem;
    }

    .btn-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Laptop Specific (Large screens) */
@media (min-width: 1400px) {
    .main-inner-container {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

/* Panel Cards */
.panel-card {
    background: #fff;
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 30px;
}

.panel-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.panel-card .card-body {
    padding: 1.75rem;
}

.progress {
    background-color: #f0f2f5 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0 25px 5px !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}


/* Global Pagination Styling */
.pagination .page-link {
    border: 1px solid #dee2e6;
    margin: 0 4px;
    border-radius: 4px !important;
    color: #0d6efd;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    color: #0056b3;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}


/* Soft Utility Backgrounds */
.bg-soft-blue {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-soft-green {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-soft-yellow {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.bg-soft-red {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.bg-soft-teal {
    background-color: rgba(20, 184, 166, 0.1) !important;
}

/* Premium Integrated Input Groups */
.input-group-custom {
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
}

.input-group-custom .input-group-text {
    background-color: #fff !important;
    border: none !important;
    color: #6c757d !important;
    padding-left: 1rem;
    padding-right: 0.5rem;
}

.input-group-custom .form-control,
.input-group-custom .form-select {
    border: none !important;
    padding-left: 0.5rem !important;
    box-shadow: none !important;
}

.input-group-custom:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1) !important;
}

/* Premium Consumable Badges [Icon | Count] */
.badge-consumable {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    font-weight: 600;
}

.badge-consumable i {
    padding: 4px 8px;
    background: #fff;
    border-right: 1px solid #e9ecef;
}

.badge-consumable span {
    padding: 4px 8px;
    min-width: 25px;
    text-align: center;
}

/* Color Variants */
.badge-consumable.water {
    color: #0d6efd;
}

.badge-consumable.tea {
    color: #0dcaf0;
}

.badge-consumable.food {
    color: #198754;
}

.badge-consumable.momento {
    color: #ffc107;
}

.badge-consumable.juice {
    color: #dc3545;
}

/* Refined Table Headers */
.table thead th {
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    color: #495057 !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

/* Soft Status Badges */
.badge-status {
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-status.pending {
    background-color: #fff9db;
    color: #f59e0b;
}

.badge-status.approved {
    background-color: #ebfbee;
    color: #2f9e44;
}


/* SweetAlert2 Custom Styling */
.swal2-popup {
    border-radius: 15px !important;
    font-family: inherit !important;
    padding: 2rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.swal2-title {
    font-size: 1.5rem !important;
    color: #1a4321 !important;
    font-weight: 700 !important;
}

.swal2-confirm {
    background-color: #1a4321 !important;
    border-radius: 50px !important;
    padding: 10px 30px !important;
    font-size: 0.9rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
}

.swal2-timer-progress-bar {
    background: rgba(187, 166, 86, 0.5) !important;
    /* GSBT Gold */
}