/* School ERP System - Main Stylesheet */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --sidebar-bg: #0f172a;
    --sidebar-width: 260px;
    --header-height: 64px;
    --body-bg: #f1f5f9;
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --card-shadow-lg: 0 10px 25px rgba(0,0,0,.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--body-bg);
    color: #334155;
    line-height: 1.6;
}

/* ===== LANDING PAGE ===== */
.landing-page { overflow-x: hidden; }

.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s;
}

.landing-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-nav .logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-nav .logo i { color: var(--primary-light); }

.landing-nav .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.landing-nav .nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-nav .nav-links a:hover { color: #fff; }

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    display: flex;
    align-items: center;
    padding: 120px 2rem 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content h1 span { color: #60a5fa; }

.hero-content p {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.hero-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.hero-stat h3 { font-size: 2rem; color: #60a5fa; font-weight: 700; }
.hero-stat p { color: #94a3b8; font-size: 0.85rem; margin-top: 0.25rem; }

/* Features Section */
.features {
    padding: 100px 2rem;
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-icon.blue { background: #dbeafe; color: var(--primary); }
.feature-icon.green { background: #d1fae5; color: var(--success); }
.feature-icon.orange { background: #fef3c7; color: var(--warning); }
.feature-icon.purple { background: #ede9fe; color: #7c3aed; }
.feature-icon.red { background: #fee2e2; color: var(--danger); }
.feature-icon.cyan { background: #cffafe; color: var(--info); }

.feature-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.feature-card p { color: var(--secondary); font-size: 0.95rem; }

/* Modules Section */
.modules-section {
    padding: 100px 2rem;
    background: var(--body-bg);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
}

.module-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-lg); }
.module-card i { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.module-card h4 { color: var(--dark); margin-bottom: 0.5rem; }
.module-card p { color: var(--secondary); font-size: 0.85rem; }

/* CTA Section */
.cta-section {
    padding: 80px 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.cta-section h2 { color: #fff; font-size: 2.5rem; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 2rem; }

.landing-footer {
    background: var(--sidebar-bg);
    color: #94a3b8;
    padding: 3rem 2rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-grid h4 { color: #fff; margin-bottom: 1rem; }
.footer-grid a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: 0.5rem; }
.footer-grid a:hover { color: #fff; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: #fff;
}

.login-left h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.login-left p { color: #94a3b8; font-size: 1.1rem; max-width: 400px; }

.login-right {
    width: 480px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 1.75rem; color: var(--dark); margin-bottom: 0.5rem; }
.login-form .subtitle { color: var(--secondary); margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.role-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.role-option input { display: none; }
.role-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary);
}

.role-option input:checked + label {
    border-color: var(--primary);
    background: #eff6ff;
    color: var(--primary);
}

.role-option label i { font-size: 1.25rem; margin-bottom: 0.25rem; }

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .logo-icon {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.sidebar-header h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-header small { color: #64748b; font-size: 0.75rem; }

.sidebar-menu { padding: 1rem 0; }

.menu-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-top: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary);
}

.sidebar-menu a i { width: 20px; text-align: center; font-size: 0.95rem; }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.top-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h1 {
    font-size: 1.25rem;
    color: var(--dark);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.header-user .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.header-user .user-info { line-height: 1.3; }
.header-user .user-info strong { display: block; font-size: 0.85rem; color: var(--dark); }
.header-user .user-info small { color: var(--secondary); font-size: 0.75rem; }

.page-content { padding: 2rem; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon.blue { background: #dbeafe; color: var(--primary); }
.stat-icon.green { background: #d1fae5; color: var(--success); }
.stat-icon.orange { background: #fef3c7; color: var(--warning); }
.stat-icon.red { background: #fee2e2; color: var(--danger); }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.cyan { background: #cffafe; color: var(--info); }

.stat-info h3 { font-size: 1.75rem; font-weight: 700; color: var(--dark); }
.stat-info p { color: var(--secondary); font-size: 0.85rem; }

/* Cards & Tables */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.05rem;
    color: var(--dark);
    font-weight: 600;
}

.card-body { padding: 1.5rem; }

.table-responsive { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
}

table.data-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--secondary);
    border-bottom: 2px solid #e2e8f0;
}

table.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

table.data-table tr:hover td { background: #f8fafc; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #f1f5f9; color: #475569; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-buttons { display: flex; gap: 0.5rem; }

.pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--secondary);
    border: 1px solid #e2e8f0;
}

.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

.profile-photo {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
}

.profile-photo-sm {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: end;
}

.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

@media (max-width: 992px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-content p { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-visual { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .login-left { display: none; }
    .login-right { width: 100%; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: block; }
    .grid-2, .form-row { grid-template-columns: 1fr; }
    .role-selector { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-content { padding: 1rem; }
    .landing-nav .nav-links { display: none; }
}
