/**
 * School Management System - Main Styles
 * Child-Friendly Design
 * Created by Arthur Jimmy Garrett with z.ai
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3B82F6; /* Blue - Calming */
    --secondary: #10B981; /* Green - Growth */
    --accent: #F97316; /* Orange - Engaging */
    --background: #E0F2FE; /* Light blue-gray */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border: #CBD5E1;
    --white: #FFFFFF;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #1E293B 0%, #334155 100%);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
    padding: 20px 10px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.logo p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(5px);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

.top-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header-left h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

#page-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

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

.search-box {
    position: relative;
}

.search-box input {
    width: 300px;
    padding: 10px 15px 10px 40px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-btn:hover {
    background: var(--background);
    border-color: var(--primary);
}

.notification-btn::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh;
    overflow: hidden;
    background-image: url('https://images.unsplash.com/photo-1523051174847-8f6f?w=1600&q=80');
    background-size: cover;
    background-position: center;
    display: none;
}

.hero-section.show {
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0.5) 50%, rgba(255, 255, 255, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 15px 0;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 25px 0;
}

.hero-btn {
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hero-btn:hover {
    background: #2563EB;
    transform: translateY(-2px);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    display: none;
}

.dashboard-content.show {
    display: block;
}

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

.stat-card {
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.blue {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.stat-card.green {
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
}

.stat-card.purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.stat-card.orange {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0 0 5px 0;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.stat-trend {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.panel {
    background: white;
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    padding: 15px;
    background: var(--background);
    border-radius: 10px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.activity-item:hover {
    background: #E5E7EB;
    border-color: var(--primary);
}

.activity-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.activity-icon.student { background: var(--primary); }
.activity-icon.attendance { background: var(--secondary); }
.activity-icon.grade { background: #8B5CF6; }
.activity-icon.teacher { background: var(--accent); }

.activity-details {
    flex: 1;
}

.activity-message {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Quick Actions */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    padding: 15px 20px;
    border: 2px solid;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateX(5px);
}

.action-btn.blue {
    background: #EFF6FF;
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.green {
    background: #D1FAE5;
    border-color: var(--secondary);
    color: var(--secondary);
}

.action-btn.purple {
    background: #E9D5FF;
    border-color: #8B5CF6;
    color: #6D28D9;
}

.action-btn.orange {
    background: #FFEDD5;
    border-color: var(--accent);
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }
    
    .sidebar.collapsed {
        width: 250px;
        padding: 20px;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .main-content.expanded {
        margin-left: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
}
