:root {
    --primary-color: #2b9348;
    --primary-dark: #1f6f35;
    --secondary-color: #f4f8f1;
    --accent-color: #f7c948;
    --text-color: #1f2933;
    --muted-text: #5f6c72;
    --light-gray: #f8f9fa;
    --border-radius: 0.75rem;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body {
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    transition: background-color 1s ease, color 1s ease;
}

.auth-bg {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.421), rgba(0,0,0,0.421)),
        url('../images/background.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
}
.auth-overlay {
    width: 100%;
    background: transparent;
}
.auth-overlay h1 { color: #ffffff !important; }
.auth-overlay p { color: #ffffff !important; }
/* .auth-overlay .form-label { color: #1f2933; } */
.auth-overlay h2 { color: #1f2933;}
.auth-hero .auth-logo { height: 56px; }
/* .auth-card input.form-control-lg { box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); } */
/* .auth-card .input-group-text { border-radius: 12px 0 0 12px; } */
/* .auth-card .form-control { border-radius: 0 12px 12px 0; } */
/* .auth-card .form-control:focus { border-color: var(--accent-color); box-shadow: 0 0 0 0.15rem rgba(247, 201, 72, 0.35); } */

/* Adjust main container for logged-in users to have a backdrop effect */
.container, .container-fluid {
    margin-top: 0;
    margin-bottom: 1.5rem;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}


.navbar-glass {
    background: linear-gradient(90deg, rgba(43,147,72,0.9), rgba(47,154,133,0.9));
    border-radius: var(--border-radius);
    margin-top: 1rem;
    padding: 0.4rem 1rem;
}
.navbar-glass .navbar-brand { color: #fff; }
.navbar-glass .nav-link { color: rgba(255,255,255,0.85); font-weight: 600; }
.navbar-glass .nav-link:hover, .navbar-glass .nav-link.active { color: #fff; }
.navbar-glass .navbar-toggler-icon { filter: invert(1); }
.navbar-glass .btn-outline-light { border-color: rgba(255,255,255,0.7); color: #fff; }
.navbar-glass .btn-outline-light:hover { background: #fff; color: var(--primary-color); }
.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}
.brand-logo {
    height: 32px;
    width: auto;
}
.sidebar .brand-logo { height: 46px; }
.avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
}

/* Sidebar layout */
.app-shell { min-height: 100vh; }
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2b9348 0%, #227c3a 60%, #195f2c 100%);
    color: #fff;
    padding: 1.5rem 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}
.sidebar .sidebar-header .brand-mark {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.sidebar-menu ul { margin: 0; padding: 0; }
.sidebar-menu li { margin-bottom: 0.65rem; list-style: none; }
.sidebar-menu a {
    display: block;
    color: rgba(255,255,255,0.9);
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}
.sidebar-menu a i { margin-right: 0.6rem; }
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.16);
    color: #fff;
    transform: translateX(4px);
}
.sidebar-menu a.cta {
    background: #f7c948;
    color: #1f2933;
}
.sidebar-menu a.cta:hover { color: #1f2933; }
.sidebar-menu a.muted { color: rgba(255,255,255,0.75); font-weight: 500; }
.content-area { padding-left: 0; }

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        z-index: 1040;
        transform: translateX(-110%);
        transition: transform 0.25s ease-in-out;
        height: 100vh;
    }
    .sidebar.open { transform: translateX(0); }
    .content-area { padding-left: 0; }
    .container, .container-fluid { margin-top: 1rem; }
}

/* Invoice page tweaks */
#product_invoice_table th, #product_invoice_table td { vertical-align: middle; }
#product_invoice_table thead { position: sticky; top: 0; z-index: 2; }
.card-header h2 { font-weight: 700; }
.card-header .btn-light { border: 1px solid #e5e7eb; }
.alert-light { background: #fdfaf4; }

.auth-card {
    background-color: transparent;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: none;
    padding: 0;
    margin-top: 0;
}

.auth-card h2 {
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(76, 175, 80, 0.25);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary-custom:hover {
    background-color: #388E3C; /* Darker green */
    border-color: #388E3C;
    color: #fff;
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: #ced4da;
    color: var(--text-color);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-secondary-custom:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.invalid-feedback {
    font-size: 0.9rem;
}

.card-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--accent-color);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

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

@media print {
    .no-print, .no-print * {
        display: none !important;
    }
    .invoice-container {
        width: 100%;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    body {
        background-image: none;
        background-color: #fff;
    }
    .container {
        background-color: transparent;
        backdrop-filter: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
}

/* Dark mode removed */

/* Dashboard refreshed UI */
.hero-card {
    background: linear-gradient(135deg, rgba(43,147,72,0.12), rgba(31,111,53,0.08));
    border: none;
    box-shadow: var(--shadow);
}
.pill-soft {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.pill-green { background: rgba(43,147,72,0.15); color: #1f6f35; }
.pill-muted { background: rgba(0,0,0,0.05); color: #4b5563; }
.kpi-card {
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.kpi-card .kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; margin-bottom: 4px; }
.kpi-card .kpi-value { font-size: 20px; font-weight: 700; color: #111827; }
.kpi-card .kpi-subtext { font-size: 12px; margin-top: 2px; }
.alert-card { background: #fff7ed; }
.alert-card .kpi-value { color: #d97706; }

/* Reports styling */
.report-hero {
    background: linear-gradient(120deg, rgba(43,147,72,0.15), rgba(31,111,53,0.1));
    border: none;
    box-shadow: var(--shadow);
}
.summary-chip {
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
}
.summary-chip .chip-label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #6b7280; }
.summary-chip .chip-value { font-size: 22px; font-weight: 700; color: #111827; }
.summary-chip .chip-sub { font-size: 12px; color: #6b7280; }

.chart-card {
    border: none;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
    border-radius: 18px;
}
.table-card {
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.compact-table th, .compact-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}
.table-card .badge { border-radius: 10px; }
.pill-soft.pill-muted { background: rgba(0,0,0,0.05); color: #374151; }
.table-hover tbody tr:hover { background-color: rgba(0,0,0,0.025); }
