/* assets/css/style.css */

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

:root {
    --primary: #1A73E8;
    --success: #00C853;
    --gold: #F9A825;
    --turquoise: #1DE9B6;
    --bg-gray: #F4F6F9;
    --text-dark: #333333;
    --text-light: #777777;
    --sidebar-bg: #1A1A1A;
    --white: #FFFFFF;
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-dark);
}

/* Utils */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Login Page Styles */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1A1A1A 0%, #333333 100%);
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h2 { margin-bottom: 20px; color: var(--primary); }

.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; color: var(--text-light); }
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
}
.form-group input:focus { border-color: var(--primary); }


/* --- LAYOUT GRID --- */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    flex-shrink: 0;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 1px solid #333;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #b3b3b3;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    background: var(--bg-gray);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.user-info {
    font-weight: 500;
}

/* Dashboard cards */
.content-body {
    padding: 30px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 4px solid var(--primary); /* Default color */
}

.kpi-info h3 { font-size: 28px; font-weight: 600; color: var(--text-dark); margin: 5px 0; }
.kpi-info p { color: var(--text-light); font-size: 14px; }

/* Chart Section */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Low Stock Alert Box */
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.alert-warning i {
    font-size: 24px;
    margin-right: 15px;
    color: #856404;
}

.alert-warning strong {
    font-weight: 600;
}

/* --- REPORTS & ANALYTICS STYLES --- */
.filter-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-group label { font-size: 12px; font-weight: 600; color: #555; margin-bottom: 5px; display: block; }
.filter-input { padding: 10px; border: 1px solid #ddd; border-radius: 8px; outline: none; min-width: 150px; }

/* Report Tables */
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table th { background: #f1f3f5; color: #333; font-weight: 600; padding: 12px; text-align: left; border-bottom: 2px solid #ddd; }
.report-table td { padding: 12px; border-bottom: 1px solid #eee; color: #555; }
.report-table tr:last-child td { border-bottom: none; }
.report-table tr:hover { background-color: #f9f9f9; }

/* Tabs for Data Views */
.tab-container { margin-top: 30px; }
.tab-buttons { display: flex; gap: 10px; margin-bottom: 15px; }
.tab-btn { background: #e0e0e0; color: #555; border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; font-weight: 500; transition: 0.3s; }
.tab-btn.active { background: var(--primary); color: white; }

/* PRINT SETTINGS (Makes PDF cute & clean) */
@media print {
    .sidebar, .topbar, .filter-bar, .tab-buttons, .no-print { display: none !important; }
    .main-wrapper { display: block; background: white; }
    .main-content { margin: 0; padding: 0; background: white; }
    .kpi-card, .chart-card { box-shadow: none; border: 1px solid #eee; break-inside: avoid; }
    body { background: white; color: black; }
    h2, h3, h4 { color: black !important; }
    /* Force charts to fit one page width */
    .charts-grid { display: block; } 
    .chart-card { margin-bottom: 20px; page-break-inside: avoid; }
    
    /* Better Table Borders for Print */
    table { border: 1px solid #333; width: 100%; }
    th, td { border: 1px solid #999 !important; color: black !important; }
}