/* ==========================================================================
   Kalcom Academy — shared "ZSHT-style" interface theme
   One file, included by every portal (tenant app, super admin, parent
   portal) instead of each page redefining its own <style> block. Mirrors
   the ZSHT school system's visual language:
     - dark gradient navbar with Font Awesome icons + dropdown nav groups
     - gradient hero/page header banner
     - white rounded "stat card" tiles with icon + big number + label
     - lift-on-hover dashboard cards
     - a "quick actions" panel
   ========================================================================== */

:root {
    --primary-color: #8DB600;
    --secondary-color: #0056B3;
    --accent-color: #FFC107;
    --dark-color: #343A40;
    --light-color: #F8F9FA;
    --gray-color: #6c757d;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
}

/* ---------- Navbar (dark gradient, same look across all logged-in areas) ---------- */
.custom-navbar {
    background: linear-gradient(90deg, #1a1a1a, #343a40);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

.custom-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff !important;
    font-weight: 700;
}

.custom-navbar .navbar-brand .logo-img,
.custom-navbar .brand-crest {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.custom-navbar .brand-crest {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.custom-navbar .navbar-brand:hover .logo-img,
.custom-navbar .navbar-brand:hover .brand-crest {
    transform: scale(1.1);
}

.custom-navbar .nav-link {
    padding: 10px 15px;
    color: #fff !important;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease, background 0.3s ease;
    border-radius: 5px;
}

.custom-navbar .nav-link:hover {
    color: #0dcaf0 !important;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.custom-navbar .nav-link.active {
    background: #0d6efd;
    color: #fff !important;
}

.custom-navbar .navbar-toggler {
    border-color: #fff;
}

.custom-navbar .dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    padding: 0.4rem;
}

.custom-navbar .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
}

.custom-navbar .dropdown-item:hover {
    background: var(--light-color);
}

.custom-navbar .dropdown-item.active {
    background: var(--secondary-color);
    color: #fff;
}

.custom-navbar .user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.7rem 0.3rem 0.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.custom-navbar .user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.custom-navbar .user-chip .name { font-size: 0.85rem; font-weight: 600; color: #fff; line-height: 1.1; }
.custom-navbar .user-chip .role { font-size: 0.72rem; color: rgba(255,255,255,0.65); line-height: 1.1; }

.custom-navbar .logout-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff !important;
    background: transparent;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

.custom-navbar .logout-btn:hover {
    border-color: #dc3545;
    color: #ff8a8a !important;
    background: rgba(220, 53, 69, 0.15);
}

@media (max-width: 991px) {
    .custom-navbar .nav-link { padding: 8px 10px; }
    .custom-navbar .navbar-nav { text-align: right; }
}

/* ---------- Page hero header ---------- */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 1rem 0;
    text-align: center;
}

.dashboard-header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.dashboard-header h3 { font-size: 1.2rem; opacity: 0.9; margin-bottom: 0; }
.dashboard-header p { opacity: 0.9; margin: 0.25rem 0 0; }

/* Slim variant for interior pages (students.php, fees.php, etc.) */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h1 { font-size: 1.4rem; margin: 0; }
.page-header .subtitle { opacity: 0.9; font-size: 0.9rem; margin: 0; }

/* ---------- Stat tiles ---------- */
.stats-container { padding: 0; margin-top: 1rem; }

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--dark-color); }
.stat-label { color: var(--gray-color); font-size: 0.9rem; margin-top: 0.5rem; }

/* ---------- Dashboard / section cards ---------- */
.dashboard-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dashboard-card .card-body { padding: 1.5rem; }
.dashboard-card i { font-size: 2.5rem; color: var(--primary-color); transition: all 0.3s ease; }
.dashboard-card:hover i { transform: scale(1.1); }
.dashboard-card .card-title { margin-top: 0.75rem; font-weight: 600; color: var(--dark-color); }

/* A plain content card used on CRUD/list pages (tables, forms) */
.content-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card .section-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card .section-title i { color: var(--secondary-color); }

/* ---------- Quick actions ---------- */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-actions h4 { color: var(--primary-color); margin-bottom: 1rem; font-weight: 600; font-size: 1.05rem; }

.action-btn { padding: 0.75rem 1.5rem; border-radius: 8px; margin: 0.25rem; transition: all 0.3s ease; }
.action-btn:hover { transform: translateY(-2px); }

/* ---------- Tables ---------- */
.table-modern thead { background: var(--dark-color); color: #fff; }
.table-modern thead th { border: none; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-modern tbody tr:hover { background: rgba(0, 86, 179, 0.04); }

/* ---------- Badges reused for subscription/tenant status ---------- */
.badge-status { font-size: 0.75rem; padding: 0.4em 0.7em; border-radius: 999px; }

@media (max-width: 768px) {
    .dashboard-header h1 { font-size: 1.3rem; }
    .dashboard-header h3 { font-size: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
}
