/* ========== VARIABLES & RESET ========== */
:root {
    --primary: #2563EB;
    --primary-dark: #1E40AF;
    --primary-light: #DBEAFE;
    --secondary: #64748B;
    --danger: #DC2626;
    --warning: #EA580C;
    --info: #0EA5E9;
    --success: #16A34A;
    
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-hover: #EFF6FF;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
    
    --house-bride: #3B82F6;
    --house-ide: #06B6D4;
    --house-tola: #10B981;
    --house-seanan: #EA580C;
    --house-padraig: #6366F1;
    --house-conaire: #0EA5E9;
    
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ========== LOADING ANIMATION ========== */
.mispal-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mispal-loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.loading-content {
    text-align: center;
}

.logo-reveal-container {
    position: relative;
    display: inline-block;
    width: 400px;
    height: 100px;
    overflow: hidden;
}

.loading-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.logo-reveal-mask {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

#mispal-logo-svg {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.loading-text {
    margin-top: 2rem;
    font-size: 2rem;
    color: white;
    font-weight: 600;
}

.loading-dot {
    animation: loadingDots 1.4s infinite;
    opacity: 0;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {
    0%, 60%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* ========== SCHOOL SELECTION PAGE ========== */
#school-selection-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.school-selection-container {
    max-width: 1200px;
    width: 100%;
}

.school-selection-header {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.school-selection-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.school-selection-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

#schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.school-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
}

.school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.school-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.school-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.school-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.school-card .btn {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 600;
}

/* ========== LOGIN PAGE UPDATES ========== */
.login-school-info {
    text-align: center;
    margin-bottom: 2rem;
}

.login-school-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-school-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-back-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-back-btn:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== GLOBAL FORM ELEMENTS ========== */
button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

button {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    color: var(--text-primary);
}

button:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

button:active:not(:disabled) {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

button.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

button.btn-danger {
    color: var(--danger);
}

button.btn-danger:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.05);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========== LANDING PAGE ========== */
.landing-page {
    min-height: 100vh;
    background: white;
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.landing-page::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.landing-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-brand i { font-size: 1.5rem; }

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.school-selection-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: white;
    transform: translateY(-2px);
}

.btn-login-hero {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.animated-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, -50px); }
}

.hero-content {
    max-width: 1200px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-fade-in-delay { animation: fadeIn 0.8s ease-out 0.2s backwards; }
.animate-fade-in-delay-2 { animation: fadeIn 0.8s ease-out 0.4s backwards; }
.animate-fade-in-delay-3 { animation: fadeIn 0.8s ease-out 0.6s backwards; }

/* Features Section */
.features-showcase {
    background: white;
    padding: 6rem 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.feature-card::before {
    display: none;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: white;
}

.feature-icon.blue { background: #3B82F6; }
.feature-icon.green { background: #10B981; }
.feature-icon.purple { background: #8B5CF6; }
.feature-icon.orange { background: #F59E0B; }
.feature-icon.red { background: #EF4444; }
.feature-icon.cyan { background: #06B6D4; }
.feature-icon.pink { background: #EC4899; }
.feature-icon.yellow { background: #EAB308; }
.feature-icon.indigo { background: #6366F1; }
.feature-icon.teal { background: #14B8A6; }
.feature-icon.lime { background: #84CC16; }
.feature-icon.amber { background: #F59E0B; }

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card ul {
    list-style: none;
    color: var(--text-secondary);
}

.feature-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up { animation: slideUp 0.6s ease-out; }
.animate-slide-up.delay-1 { animation-delay: 0.1s; animation-fill-mode: backwards; }
.animate-slide-up.delay-2 { animation-delay: 0.2s; animation-fill-mode: backwards; }
.animate-slide-up.delay-3 { animation-delay: 0.3s; animation-fill-mode: backwards; }
.animate-slide-up.delay-4 { animation-delay: 0.4s; animation-fill-mode: backwards; }
.animate-slide-up.delay-5 { animation-delay: 0.5s; animation-fill-mode: backwards; }
.animate-slide-up.delay-6 { animation-delay: 0.6s; animation-fill-mode: backwards; }
.animate-slide-up.delay-7 { animation-delay: 0.7s; animation-fill-mode: backwards; }
.animate-slide-up.delay-8 { animation-delay: 0.8s; animation-fill-mode: backwards; }
.animate-slide-up.delay-9 { animation-delay: 0.9s; animation-fill-mode: backwards; }
.animate-slide-up.delay-10 { animation-delay: 1.0s; animation-fill-mode: backwards; }
.animate-slide-up.delay-11 { animation-delay: 1.1s; animation-fill-mode: backwards; }

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-primary);
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.login-particles {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    from { background-position: 0 0; }
    to { background-position: 50px 50px; }
}

.login-container {
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.btn-back-landing {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-back-landing:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-5px);
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group input {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-login-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-divider {
    text-align: center;
    color: var(--text-muted);
    margin: 1.5rem 0;
    position: relative;
}

.login-divider:before,
.login-divider:after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.login-divider:before { left: 0; }
.login-divider:after { right: 0; }

.quick-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quick-login-btn {
    padding: 1rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.quick-login-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.quick-login-btn:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

/* ========== DASHBOARD ========== */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 2rem;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 200px;
}

.navbar-brand i { font-size: 1.25rem; }

.school-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    position: relative;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(to right, rgba(255, 107, 107, 0.15), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item i { font-size: 1.125rem; }

.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notification-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 20px;
    text-align: center;
}


.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #DC2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-logout i {
    font-size: 1rem;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.notification-bell:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.notification-bell i {
    font-size: 1.25rem;
}

.notification-bell .notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 1rem;
    min-width: 18px;
    text-align: center;
    border: 2px solid white;
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px;
    max-height: 600px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-hover);
}

.notification-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-text:hover {
    background: white;
    color: var(--primary);
}

.notifications-list {
    max-height: min(500px, calc(100vh - 200px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notifications-list::-webkit-scrollbar {
    width: 8px;
}

.notifications-list::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.notification-item.unread {
    background: rgba(79, 70, 229, 0.05);
    border-left: 3px solid var(--primary);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.notification-icon.notif-success {
    background: #D1FAE5;
    color: #059669;
}

.notification-icon.notif-error {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-icon.notif-warning {
    background: #FEF3C7;
    color: #D97706;
}

.notification-icon.notif-info {
    background: #DBEAFE;
    color: #2563EB;
}

.notification-icon.notif-email {
    background: #E0E7FF;
    color: #4F46E5;
}

.notification-content {
    flex: 1;
    cursor: pointer;
}

.notification-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.notification-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notification-content small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition);
    opacity: 0;
}

.notification-item:hover .notification-close {
    opacity: 1;
}

.notification-close:hover {
    background: var(--danger);
    color: white;
}

.notification-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 1rem;
}

.user-info {
    text-align: right;
}

.user-info span {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 10000;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg-hover);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    padding: 2.5rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.content-section.active {
    display: block;
}

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: var(--primary);
    font-size: 1.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Stats Cards */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card.bg-blue { background: white; color: var(--text-primary); border-left: 4px solid #3B82F6; }
.stat-card.bg-green { background: white; color: var(--text-primary); border-left: 4px solid #10B981; }
.stat-card.bg-purple { background: white; color: var(--text-primary); border-left: 4px solid #8B5CF6; }
.stat-card.bg-orange { background: white; color: var(--text-primary); border-left: 4px solid #F59E0B; }

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-details h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

/* Houses Grid */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.house-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    color: white;
    transition: var(--transition);
    cursor: pointer;
}

.house-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.house-card.bride { background: #3B82F6; }
.house-card.ide { background: #06B6D4; }
.house-card.tola { background: #10B981; }
.house-card.seanan { background: #EA580C; }
.house-card.padraig { background: #6366F1; }
.house-card.conaire { background: #0EA5E9; }

.house-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.house-card p {
    font-size: 2rem;
    font-weight: 800;
}

/* Tabs */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* Content Card */
.content-card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.content-card::before {
    display: none;
}

.card-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
}

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

.toolbar-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.select-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Buttons */
.btn-primary, .btn-success, .btn-warning, .btn-danger {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-primary:hover, .btn-success:hover, .btn-warning:hover, .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Data Table */
.table-container {
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.badge.success { background: #D1FAE5; color: #065F46; }
.badge.warning { background: #FEF3C7; color: #92400E; }
.badge.danger { background: #FEE2E2; color: #991B1B; }
.badge.info { background: #DBEAFE; color: #1E40AF; }
.badge.primary { background: rgba(255, 107, 107, 0.2); color: #FF6B6B; }

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .notification-panel {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .notification-panel {
        width: calc(100vw - 40px);
        right: -100px;
    }
    
    .notification-bell {
        width: 40px;
        height: 40px;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* Confirm Dialog */
.confirm-dialog {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.confirm-dialog-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--danger);
}

.confirm-dialog h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.confirm-dialog p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 90px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

/* Pulse Animation for Notifications */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-bell.has-new {
    animation: pulse 0.5s ease-in-out 3;
}

/* Utility Classes */
.full-width { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.text-blue { color: var(--info); }
.text-yellow { color: var(--warning); }
.text-gray { color: var(--text-muted); }

/* ========== ADDITIONAL FORM STYLES ========== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.full-width {
    grid-column: 1 / -1;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-grid > div {
    padding: 0.75rem;
    background: var(--bg-hover);
    border-radius: 0.5rem;
}

/* ========== PROFILE VIEW STYLES ========== */
.profile-view {
    max-width: 800px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    color: white;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ========== CLASS DETAILS STYLES ========== */
.class-details-view {
    max-width: 800px;
}

.class-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--info) 0%, var(--primary) 100%);
    border-radius: 1rem;
    color: white;
    margin-bottom: 1.5rem;
}

.class-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.class-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.class-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.students-list, .teachers-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.student-item, .teacher-item {
    padding: 0.75rem;
    background: var(--bg-hover);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.class-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ========== ATTENDANCE MARKING INTERFACE ========== */
.attendance-marking-interface {
    max-width: 900px;
}

.attendance-info {
    background: var(--bg-hover);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 2rem;
}

.attendance-info p {
    margin: 0;
}

.attendance-status {
    min-width: 150px;
    padding: 0.5rem;
}

.attendance-notes {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ========== ROOM BOOKING STYLES ========== */
.room-booking-form {
    max-width: 600px;
}

.room-info {
    background: var(--bg-hover);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.room-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.room-info p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

/* ========== BEHAVIOR LOG STYLES ========== */
.behavior-log {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.behavior-entry {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    border-left: 4px solid var(--info);
}

.behavior-entry.positive {
    border-left-color: var(--success);
}

.behavior-entry.negative {
    border-left-color: var(--danger);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header, .class-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-actions, .class-actions {
        flex-direction: column;
    }
    
    .profile-actions button, .class-actions button {
        width: 100%;
    }
}

/* ========== SPINNER/LOADING ========== */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== TABLE ENHANCEMENTS ========== */
.data-table tbody tr:hover {
    background: var(--bg-hover);
    cursor: pointer;
}

.data-table .select-input {
    margin: 0;
}

/* ========== BUTTON GROUP ========== */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header-inline h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========== ROOM BOOKINGS - 4 COLUMN GRID LAYOUT ========== */
.floor-section {
    margin-bottom: 3rem;
}

.floor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.floor-header i {
    font-size: 1.5rem;
}

.floor-header .room-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.rooms-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .rooms-grid-4col {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 640px) {
    .rooms-grid-4col {
        grid-template-columns: 1fr;
    }
}

.room-card {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.room-card.available {
    border-left: 4px solid var(--success);
}

.room-card.occupied {
    border-left: 4px solid var(--danger);
    opacity: 0.85;
}

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border);
}

.room-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.room-status i {
    font-size: 1.25rem;
}

.room-card.available .room-status i {
    color: var(--success);
}

.room-card.occupied .room-status i {
    color: var(--danger);
}

.room-card-body {
    padding: 1.25rem;
    text-align: center;
}

.room-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
}

.room-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.room-category, .room-capacity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.room-category i, .room-capacity i {
    color: var(--primary);
}

/* Booking Indicator */
.booking-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.75rem;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #92400E;
}

.booking-indicator i {
    font-size: 1rem;
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.room-card-footer {
    padding: 1rem;
    background: var(--bg-main);
    border-top: 1px solid var(--border);
}

.book-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.book-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.room-card.occupied .book-btn {
    background: var(--text-muted);
    cursor: not-allowed;
}

.room-card.occupied .book-btn:hover {
    background: var(--text-muted);
    transform: none;
    box-shadow: none;
}

/* Current Bookings Display */
.current-bookings {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-main);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.current-bookings h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.booking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.booking-period {
    font-weight: 700;
    color: var(--primary);
    min-width: 100px;
}

.booking-purpose {
    flex: 1;
    color: var(--text-primary);
    padding: 0 1rem;
}

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

/* Report Styles */
.report-view {
    max-width: 100%;
}

.report-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.report-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.report-table th,
.report-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.report-table th {
    background: var(--bg-main);
    font-weight: 600;
    color: var(--text-primary);
}

.report-table tr:hover {
    background: var(--bg-hover);
}

.report-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Fees/Payroll Dashboard */
.fees-dashboard,
.payroll-dashboard {
    padding: 1rem;
}

.fees-summary,
.payroll-summary {
    margin-bottom: 2rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.summary-card {
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.summary-card.success {
    border-left-color: var(--success);
}

.summary-card.warning {
    border-left-color: var(--warning);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.payroll-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-paid {
    background: #D1FAE5;
    color: #065F46;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-not-due {
    background: #E0E7FF;
    color: #3730A3;
}

/* Report Actions */
.reports-dashboard {
    padding: 2rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.reports-dashboard h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-dashboard p.text-muted {
    margin-bottom: 2rem;
}

.report-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Timetable Modal Styles */
.timetable-modal-view {
    max-width: 100%;
    overflow-x: auto;
}

.timetable-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.timetable-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.timetable-grid-modal {
    display: grid;
    grid-template-columns: 120px repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.timetable-corner {
    background: var(--bg-main);
    padding: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.timetable-day-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timetable-period-label {
    background: var(--bg-main);
    padding: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.timetable-period-label.break-period,
.timetable-period-label.lunch-period {
    background: #FEF3C7;
    color: #92400E;
}

.timetable-period-label strong {
    font-size: 0.875rem;
}

.timetable-period-label small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timetable-cell {
    background: white;
    padding: 0.75rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.timetable-cell.empty-cell {
    background: #F9FAFB;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.timetable-cell.break-cell,
.timetable-cell.lunch-cell {
    background: #FEF3C7;
}

.timetable-cell.has-class {
    background: #EEF2FF;
    border-left: 3px solid var(--primary);
}

.class-subject {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.875rem;
    text-align: center;
}

.class-teacher,
.class-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
}

.class-room {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    background: white;
    border-radius: 0.25rem;
}

/* Activity Items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--bg-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.activity-content small {
    font-size: 0.8125rem;
}

/* Quick Stats Cards */
.quick-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quick-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.quick-stat-card .stat-content h4 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.quick-stat-card .stat-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ========== STUDENT DASHBOARD ========== */
.dashboard-grid-student {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dash-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.dash-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dash-card-header {
    padding: 1.25rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
}

.dash-card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.dash-card-body {
    padding: 1.5rem;
}

.profile-info p {
    margin: 0.75rem 0;
    color: var(--text-secondary);
}

.profile-info strong {
    color: var(--text-primary);
    display: inline-block;
    width: 100px;
}

.stat-large {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border-radius: 0.75rem;
    color: white;
    margin-bottom: 1.5rem;
}

.stat-large .stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-large .stat-label {
    font-size: 1.125rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.attendance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
}

.stat-item i {
    font-size: 1.5rem;
}

.text-success { color: #10b981; }
.text-danger { color: #ef4444; }
.text-warning { color: #f59e0b; }

.behavior-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.behavior-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.behavior-item.positive {
    border-left-color: #10b981;
}

.behavior-item.negative {
    border-left-color: #ef4444;
}

.behavior-item i {
    font-size: 1.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-positive {
    background: #d1fae5;
    color: #065f46;
}

.badge-negative {
    background: #fee2e2;
    color: #991b1b;
}

/* ========== PARENT DASHBOARD ========== */
.parent-dashboard {
    padding: 2rem 0;
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.child-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.child-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.child-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.child-avatar {
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.child-info h3 {
    margin: 0;
    font-size: 1.5rem;
}

.child-info p {
    margin: 0.25rem 0 0;
    opacity: 0.9;
}

.child-stats {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.stat-box {
    text-align: center;
}

.stat-box .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.child-actions {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.child-actions .btn-sm {
    flex: 1;
    min-width: 100px;
}

.parent-actions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.action-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.action-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.action-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.action-card h3 {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.action-card p {
    margin: 0;
    color: var(--text-secondary);
}

/* ========== PERSONAL TIMETABLE ========== */
.timetable-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-top: 2rem;
}

.timetable-header {
    text-align: center;
    margin-bottom: 2rem;
}

.timetable-header h2 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.timetable-scroll {
    overflow-x: auto;
    margin: 2rem 0;
}

.timetable-grid-personal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.timetable-grid-personal th,
.timetable-grid-personal td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.timetable-grid-personal thead th {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.timetable-grid-personal .period-col {
    width: 100px;
    font-weight: 600;
    background: var(--bg-secondary);
}

.timetable-grid-personal .time-col {
    width: 120px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.timetable-grid-personal .day-col {
    min-width: 150px;
}

.timetable-grid-personal .period-cell {
    background: white;
    vertical-align: top;
    transition: var(--transition);
}

.timetable-grid-personal .period-cell.filled {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary);
}

.timetable-grid-personal .period-cell.filled:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.02);
}

.timetable-grid-personal .period-cell.empty {
    background: #f9fafb;
    color: var(--text-muted);
}

.timetable-grid-personal .break-row {
    background: #fef3c7;
}

.timetable-grid-personal .break-cell {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-weight: 600;
    font-size: 1rem;
}

.timetable-grid-personal .break-cell i {
    margin-right: 0.5rem;
}

.period-subject {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.period-room,
.period-teacher {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.period-room i,
.period-teacher i {
    margin-right: 0.25rem;
    color: var(--primary);
}

.timetable-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.schedule-info {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.schedule-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.schedule-info p {
    margin: 0;
    opacity: 0.9;
}

/* ========== RESPONSIVE FIXES FOR ALL SCREEN SIZES ========== */

/* Large screens and down */
@media (max-width: 1600px) {
    .navbar-menu {
        gap: 0.5rem;
    }
    
    .nav-item span {
        font-size: 0.9rem;
    }
}

/* Medium-large screens (Inspect half screen) */
@media (max-width: 1280px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.125rem;
        gap: 0.5rem;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-menu {
        gap: 0.25rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .navbar-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-item span {
        font-size: 0.85rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
    
    .dropdown-content {
        min-width: 200px;
    }
    
    .navbar-user {
        gap: 0.5rem;
    }
    
    .user-info {
        display: none;
    }
    
    .notification-bell {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Tablet and smaller */
@media (max-width: 1024px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .dashboard-grid-student {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .children-grid {
        grid-template-columns: 1fr;
    }
    
    .timetable-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .timetable-grid-personal {
        min-width: 700px;
    }
    
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
        flex-wrap: nowrap;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-brand span {
        display: none;
    }
    
    .navbar-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 2rem;
        display: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .page-header {
        padding: 1rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .card-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .toolbar-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .toolbar-filters select,
    .toolbar-filters button {
        width: 100%;
    }
    
    .dashboard-grid-student {
        grid-template-columns: 1fr;
    }
    
    .children-grid {
        grid-template-columns: 1fr;
    }
    
    .parent-actions-section {
        grid-template-columns: 1fr;
    }
    
    .rooms-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timetable-footer {
        flex-direction: column;
    }
    
    .timetable-footer button {
        width: 100%;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .navbar-brand img {
        height: 30px;
    }
    
    .navbar-brand i {
        font-size: 1.25rem;
    }
    
    .navbar-user {
        gap: 0.25rem;
    }
    
    .notification-bell {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .rooms-grid-4col {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group button {
        width: 100%;
    }
    
    .timetable-grid-personal th,
    .timetable-grid-personal td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .period-col,
    .time-col {
        font-size: 0.7rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .navbar-brand i {
        font-size: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.875rem;
    }
}

/* Landscape mobile fix */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-brand img {
        height: 28px;
    }
    
    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Ensure no horizontal scroll on any device */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

#dashboard {
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for inspect mode (half screen) */
@media (min-width: 768px) and (max-width: 960px) {
    .navbar-brand span {
        display: inline;
    }
    
    .navbar-menu {
        display: flex;
        gap: 0.5rem;
    }
    
    .nav-item span {
        display: none;
    }
    
    .nav-item:hover span {
        display: inline;
    }
}

/* ========== MISPAL BRANDING ========== */
.mispal-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

.mispal-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.mispal-logo-small {
    background: var(--primary);
}

/* Container max-width for very large screens */
@media (min-width: 1920px) {
    .main-content {
        max-width: 1800px;
        margin: 0 auto;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF5252;
}


