/* css/style.css - Final Smart UI Fix */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #006400;       /* সজন গ্রিন */
    --primary-dark: #004d00;
    --accent: #FFD700;        /* সোনালী হলুদ */
    --text-head: #2d3436;
    --text-body: #636e72;
    --bg-body: #f1f5f9;       /* স্মার্ট গ্রে ব্যাকগ্রাউন্ড */
    --white: #ffffff;
    --sidebar-width: 260px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Hind Siliguri', sans-serif; }

/* === GLOBAL BODY FIX (সব পেজের জন্য) === */
body {
    background-color: var(--bg-body);
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.5;
    
    /* এই অংশটি ওপরের ফাঁকা জায়গা দূর করবে */
    display: block !important; 
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a { text-decoration: none; transition: 0.3s; }

/* ================= SIDEBAR (ফিক্সড) ================= */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, #003300 100%);
    height: 100vh;
    position: fixed; top: 0; left: 0;
    z-index: 1000;
    color: white;
    overflow-y: auto;
    box-shadow: 4px 0 25px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px; text-align: center;
    background: var(--primary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky; top: 0; z-index: 10;
}
.sidebar-brand img { height: 50px; width: auto; display: block; margin: 0 auto 10px; }
.brand-text { font-size: 20px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

.nav-links { list-style: none; padding: 15px 10px; }
.nav-links li { margin-bottom: 5px; }
.nav-links li a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    font-size: 14px; font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.nav-links li a:hover, .nav-links li a.active {
    background: rgba(255,255,255,0.15);
    color: var(--accent);
    transform: translateX(5px);
    font-weight: 700;
}
.nav-links li a i { width: 20px; text-align: center; }

/* ================= MAIN CONTENT (মার্জিন ফিক্স) ================= */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
}

/* Page Header (Smart Look) */
.page-header {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent);
}
.header-title h1 { font-size: 24px; color: var(--primary); margin: 0; font-weight: 700; }
.header-title p { margin: 5px 0 0; font-size: 13px; color: var(--text-body); opacity: 0.8; }

/* ================= CARDS & STATS ================= */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 25px; margin-bottom: 30px; 
}
.stat-card {
    background: var(--white); padding: 25px; border-radius: 16px;
    box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 20px;
    transition: 0.3s; position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.stat-card::after {
    content: ''; position: absolute; right: -10px; bottom: -10px;
    width: 80px; height: 80px; background: currentColor; opacity: 0.05; border-radius: 50%;
}

.stat-icon {
    width: 60px; height: 60px; background: #e8f5e9; color: var(--primary);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.stat-info h2 { font-size: 28px; font-weight: 700; margin: 0; color: var(--text-head); }
.stat-info h3 { font-size: 14px; color: var(--text-body); margin: 0; font-weight: 600; }

/* ================= FORMS & TABLES ================= */
.modal-card, .table-card, .card-section {
    background: var(--white); padding: 30px; border-radius: 16px;
    box-shadow: var(--shadow); margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

/* টেবিল */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { 
    text-align: left; padding: 15px; 
    background: #f8fafc; color: var(--text-head); 
    font-size: 13px; font-weight: 700; text-transform: uppercase; 
    border-bottom: 2px solid #e2e8f0;
}
td { padding: 15px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: var(--text-head); }
tr:hover td { background: #f8fafc; }

/* ফর্ম ইনপুট (স্মার্ট লুক) */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-head); font-size: 13px; }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 12px 15px;
    border: 1px solid #cbd5e0; border-radius: 8px;
    font-size: 14px; outline: none; transition: 0.3s;
    background: #fff;
}
.input-group input:focus, .input-group select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0, 100, 0, 0.1);
}

.btn-submit {
    background: var(--primary); color: white; border: none; padding: 12px 30px;
    border-radius: 50px; cursor: pointer; font-size: 14px; font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,100,0,0.2); transition: 0.3s;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,100,0,0.3); }

.btn-cancel {
    background: transparent; border: 1px solid #cbd5e0; color: #64748b;
    padding: 12px 25px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 14px;
}
.btn-cancel:hover { background: #f1f5f9; border-color: #94a3b8; }

/* ================= LOGIN PAGE (শুধুমাত্র এটিই সেন্টার হবে) ================= */
.login-page-body {
    display: flex !important; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    background: linear-gradient(135deg, var(--primary) 0%, #002200 100%);
    margin: 0; padding: 0;
}
.login-card {
    background: var(--white); padding: 40px; border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); width: 100%; max-width: 400px;
    text-align: center; border-top: 5px solid var(--accent);
}

/* ================= MOBILE ================= */
.mobile-top { background:var(--primary); padding:15px; color:white; display:none; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:999; }
@media (max-width: 900px) {
    .sidebar { left: -270px; transition: 0.3s; }
    .sidebar.active { left: 0; }
    .main-content { margin-left: 0; padding: 15px; width: 100%; }
    .mobile-top { display: flex; }
    .stats-grid, .form-grid { grid-template-columns: 1fr; }
}