:root {
    --primary: #6366f1;
    --primary-bg: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --danger: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.glow-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 1000px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

/* Global Form Styling */
input,
select,
textarea {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

select option {
    background-color: #1e293b;
    color: white;
    padding: 10px;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.highlight {
    color: var(--primary);
}

.tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form .input-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 12px 12px 45px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.message {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85rem;
    min-height: 20px;
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--accent);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

aside {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.nav-links {
    margin-top: 40px;
    list-style: none;
}

.nav-links li {
    margin-bottom: 10px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(99, 102, 241, 0.1);
    color: white;
}

.nav-links a.active i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

main {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

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

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Table */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-container {
    padding: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 15px;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-view {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

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

/* School Detail Specific */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.detail-card {
    padding: 30px;
}

.school-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.school-logo-large {
    width: 80px;
    height: 80px;
    background: var(--primary-glow);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
}

.hidden {
    display: none;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    aside {
        width: 80px;
    }

    aside .logo-text,
    aside .tagline,
    aside a span {
        display: none;
    }

    main {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}