:root {
    --primary: #1e293b;
    --sidebar-bg: #0f172a;
    --accent: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --purple: #8b5cf6;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --sidebar-width: 270px;
    --excel-border: #cbd5e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--background); color: var(--text-main); }
.hidden { display: none !important; }

/* Splash Screen */
.splash-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg), #312e81);
    color: white; display: flex; justify-content: center; align-items: center;
    z-index: 10000; text-align: center;
}
.splash-logo { font-size: 4.5rem; color: #818cf8; margin-bottom: 15px; }

/* Login Box */
.login-container { height: 100vh; display: flex; justify-content: center; align-items: center; background: #cbd5e1; }
.login-box { background: white; padding: 35px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); width: 100%; max-width: 400px; text-align: center; }
.login-header i { font-size: 2.5rem; color: var(--accent); margin-bottom: 10px; }
.login-header h2 { margin-bottom: 15px; }

/* Layout Structure */
.main-layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); color: white; display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 99; }
.sidebar-brand { padding: 20px; background: #020617; border-bottom: 1px solid #1e293b; }
.brand-logo-container { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 2rem; color: #f59e0b; }
.brand-logo-container h3 { font-size: 16px; color: #fff; letter-spacing: 1px; }
.brand-logo-container span { font-size: 10px; color: #94a3b8; }

.nav-links { list-style: none; padding: 15px 10px; flex-grow: 1; overflow-y: auto; }
.nav-links li a { display: flex; align-items: center; padding: 11px 14px; color: #cbd5e1; text-decoration: none; font-size: 13.5px; gap: 12px; border-radius: 6px; transition: 0.2s; }
.nav-links li:hover a, .nav-links li.active a { background: var(--accent); color: white; font-weight: bold; }
.sidebar-footer { padding: 15px; background: #020617; }
.user-info { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.user-info i { font-size: 1.8rem; color: #94a3b8; }
.btn-logout { width: 100%; padding: 8px; background: #334155; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }

.content-area { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); padding: 25px; }
.top-navbar { background: white; padding: 15px 25px; border-radius: 8px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* HERO BANNER */
.hero-banner {
    width: 100%; height: 200px;
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.85)), url('https://images.unsplash.com/photo-1541888946425-d0fbb186a5b7?auto=format&fit=crop&w=1200&q=80');
    background-size: cover; background-position: center; border-radius: 12px;
    display: flex; align-items: center; padding: 30px; color: white; margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.company-badge { background: #f59e0b; color: #000; font-weight: bold; font-size: 11px; padding: 4px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px; }
.hero-banner h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; letter-spacing: 0.5px; }
.hero-banner p { font-size: 13px; opacity: 0.9; max-width: 650px; }

/* Dashboard Stats Cards Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 25px; }
.stat-card { padding: 18px 15px; border-radius: 10px; display: flex; align-items: center; gap: 12px; color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.card-gradient-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.card-gradient-orange { background: linear-gradient(135deg, #d97706, #b45309); }
.card-gradient-green { background: linear-gradient(135deg, #059669, #047857); }
.card-gradient-teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.card-gradient-red { background: linear-gradient(135deg, #dc2626, #991b1b); }
.card-gradient-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-icon { font-size: 1.8rem; background: rgba(255,255,255,0.2); padding: 10px; border-radius: 8px; }
.stat-data h3 { font-size: 20px; font-weight: bold; }
.stat-data p { font-size: 12px; font-weight: 600; opacity: 0.9; }

/* CHARTS CONTAINER FIXED HEIGHT */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.chart-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.chart-wrapper { position: relative; height: 260px; width: 100%; }

/* Activity Log */
.activity-list { list-style: none; margin-top: 10px; }
.activity-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.activity-list i { margin-right: 10px; font-size: 14px; }
.icon-add { color: #2563eb; } .icon-pay { color: #059669; } .icon-update { color: #d97706; } .icon-att { color: #7c3aed; }

/* Gallery System */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; margin-top: 15px; }
.gallery-item { border-radius: 8px; overflow: hidden; background: #000; position: relative; height: 180px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: 0.3s; }
.gallery-item:hover img { transform: scale(1.05); opacity: 1; }
.gallery-caption { position: absolute; bottom: 0; left: 0; width: 100%; padding: 8px 12px; background: rgba(0,0,0,0.75); color: white; font-size: 12px; font-weight: bold; }
.btn-del-img { position: absolute; top: 6px; right: 6px; background: var(--danger); color: white; border: none; border-radius: 4px; width: 24px; height: 24px; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center; }

/* About Us Layout */
.about-header { text-align: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #f1f5f9; }
.about-logo { font-size: 3rem; color: #f59e0b; margin-bottom: 8px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.about-box { background: #f8fafc; padding: 18px; border-radius: 8px; border-left: 4px solid var(--accent); }
.about-box h3 { font-size: 15px; margin-bottom: 8px; color: var(--primary); }
.about-box p { font-size: 13px; color: #64748b; line-height: 1.5; }
.feature-card { display: flex; gap: 15px; background: #f8fafc; padding: 15px; border-radius: 8px; margin-bottom: 10px; align-items: center; }
.feature-card i { font-size: 2rem; color: var(--accent); }

/* Contact Us & WhatsApp Button */
.contact-details { margin-top: 15px; display: flex; flex-direction: column; gap: 15px; }
.c-item { display: flex; gap: 12px; align-items: center; }
.c-item i { font-size: 1.2rem; color: var(--accent); background: #e0e7ff; padding: 10px; border-radius: 50%; }
.whatsapp-btn { display: inline-flex; align-items: center; gap: 8px; background: #25d366; color: white; padding: 12px 20px; text-decoration: none; border-radius: 8px; font-weight: bold; margin-top: 20px; font-size: 14px; box-shadow: 0 4px 10px rgba(37,211,102,0.3); }

/* Form Elements & Custom Cards */
.custom-card { background: white; padding: 25px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.input-group { display: flex; flex-direction: column; gap: 5px; text-align: left; margin-bottom: 10px; }
.input-group label { font-size: 13px; font-weight: 600; }
input, select { padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; font-size: 14px; }
.form-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; }

/* Tables Spec */
.table-wrapper { width: 100%; overflow-x: auto; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px; border-bottom: 1px solid #edf2f7; font-size: 14px; }
th { background: #f8fafc; font-weight: bold; }

/* Excel Table Specifics */
.excel-grid-wrapper { border: 1px solid var(--excel-border); max-width: 100%; }
.excel-table { min-width: 1200px; border-collapse: collapse; }
.excel-table th, .excel-table td { border: 1px solid var(--excel-border); padding: 6px; text-align: center; }
.excel-table .sticky-col { position: sticky; left: 0; background: #f8fafc; font-weight: bold; text-align: left; min-width: 130px; }
.excel-select { width: 50px; padding: 3px; font-weight: bold; text-align: center; }
.excel-ot-input { width: 45px; padding: 3px; text-align: center; font-weight: bold; }
.gross-th { background-color: #e0e7ff; color: #3730a3; }

/* Buttons */
.btn { padding: 9px 16px; border-radius: 6px; border: none; font-weight: bold; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.btn-primary { background: var(--accent); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 4px 8px; font-size: 11px; }

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-brand span, .brand-logo-container div, .nav-links li a span, .user-info { display: none; }
    .content-area { margin-left: 60px; width: calc(100% - 60px); }
    .hero-banner { height: auto; padding: 20px; }
}