/* Divine Reports - Global Styles */
/* Super Admin Dashboard Layout with Fixed Header & Sidebar */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f3f4f6;
    color: #333;
    overflow: hidden; /* Prevent body scroll */
}

/* Main Dashboard Container */
.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Sidebar Styles - FIXED */
.sidebar {
    width: 260px;
    background: #1d1b44;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Sidebar Logo */
.sidebar .logo {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar .logo img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.sidebar .logo h8 {
    font-size: 1.2em;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
}

/* Sidebar Navigation */
.sidebar nav {
    padding: 20px 0;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 5px 15px;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.sidebar nav ul li a i {
    margin-right: 12px;
    font-size: 1.1em;
    width: 20px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li.active a {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.sidebar nav ul li a.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.sidebar nav ul li a.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo h8,
.sidebar.collapsed nav ul li a span {
    display: none;
}

.sidebar.collapsed nav ul li a {
    justify-content: center;
}

.sidebar.collapsed nav ul li a i {
    margin-right: 0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px; /* Match sidebar width */
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

.dashboard-container.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* Header Styles - FIXED */
.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 998;
    min-height: 70px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #4f46e5;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #f3f4f6;
}

.school-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-info img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.school-info h1 {
    font-size: 1.3em;
    color: #4f46e5;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 12px;
    color: #999;
}

.search-bar input {
    padding: 10px 10px 10px 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 250px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.notifications {
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.notifications i {
    font-size: 1.3em;
    color: #666;
}

.notifications .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: #f3f4f6;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4f46e5;
}

.user-profile .user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.user-profile .user-email {
    font-size: 0.8em;
    color: #999;
}

.user-profile i {
    color: #999;
    font-size: 0.8em;
}

/* Dashboard Content - SCROLLABLE */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    background: #f3f4f6;
}

/* Scrollbar Styling */
.dashboard-content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.dashboard-content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.welcome-banner .user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.welcome-text h3 {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.welcome-text p {
    opacity: 0.9;
    font-size: 1em;
}

.action-button {
    background: white;
    color: #4f46e5;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-card .icon {
    font-size: 2.5em;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 20px;
}

.stat-card .count {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card .label {
    font-size: 0.95em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-card .arrow {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.stat-card .arrow:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 15px;
    }
    
    .school-info h1 {
        font-size: 1.1em;
    }
    
    .search-bar {
        display: none;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 10px;
    }
    
    .user-profile div {
        display: none;
    }
}