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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.main-wrapper {
    flex: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: #4361ee;
    border-color: #4361ee;
}

.btn-primary:hover {
    background: #3651d4;
    border-color: #3651d4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67,97,238,0.35);
}

.btn-success {
    background: #2ec4b6;
    border-color: #2ec4b6;
}

.btn-success:hover {
    background: #25a99d;
    border-color: #25a99d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46,196,182,0.35);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,193,7,0.35);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.15);
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 4px rgba(67,97,238,0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.3rem;
}

/* Tables */
.table {
    font-size: 0.9rem;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background: rgba(67,97,238,0.04);
}

/* Badges */
.badge {
    padding: 0.4em 0.7em;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Progress bar */
.progress {
    border-radius: 10px;
    height: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 0;
}

.login-body {
    padding: 2rem;
}

/* Registration page */
.program-detail-card {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
}

.program-detail-card .detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.program-detail-card .detail-item i {
    font-size: 1.25rem;
    margin-top: 2px;
}

.seat-indicator {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.seat-indicator .seat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Steps indicator */
.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.step:first-child {
    border-radius: 8px 0 0 8px;
}

.step:last-child {
    border-radius: 0 8px 8px 0;
}

.step.active {
    background: #4361ee;
    color: #fff;
}

.step.completed {
    background: #2ec4b6;
    color: #fff;
}

.step .step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Success page */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
}

.success-card .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d4edda;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: #28a745;
}

/* Dashboard layout */
.sidebar {
    background: #fff;
    border-right: 1px solid #e9ecef;
    min-height: 100vh;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 2px 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(67,97,238,0.1);
    color: #4361ee;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

/* Admin topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1.5rem;
}

/* QR code display */
.qr-container {
    background: #fff;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.qr-container img {
    max-width: 200px;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    .program-detail-card {
        padding: 1.25rem;
    }
    .login-card {
        margin: 0.5rem;
    }
    .sidebar {
        min-height: auto;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    .card {
        box-shadow: none !important;
    }
}

/* School Theme */
.bg-school {
    background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

.bg-school-soft {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, #4361ee, #7209b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 90vh;
    background: linear-gradient(135deg, #0d1b2a 0%, #1a237e 40%, #283593 70%, #3949ab 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255,193,7,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 10s ease-in-out infinite reverse;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

/* Floating shapes */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    animation: floatShape 20s ease-in-out infinite;
}

.hero-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -5%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.hero-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: 15%;
    right: 10%;
    animation-delay: -5s;
    animation-duration: 20s;
    background: rgba(255,193,7,0.04);
}

.hero-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 30%;
    animation-delay: -10s;
    animation-duration: 18s;
    background: rgba(67,97,238,0.05);
}

.hero-shape:nth-child(4) {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 20%;
    animation-delay: -3s;
    animation-duration: 15s;
    background: rgba(255,255,255,0.04);
}

.hero-badge {
    display: inline-block;
    padding: 2rem;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.hero-badge:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.hero-section .display-4 {
    line-height: 1.15;
}

.hero-section .display-5 {
    line-height: 1.2;
}

/* Feature cards on landing */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.glass-card {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
}

/* Program cards */
.program-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

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

.program-card .program-img {
    height: 180px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
    transition: transform 0.5s ease;
}

.program-card:hover .program-img {
    transform: scale(1.05);
}

.program-card .program-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* Stat counter strip */
.stat-item {
    position: relative;
    padding: 0.5rem;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.15);
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* CTA section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 6s ease-in-out infinite;
}

/* Section title underline */
.section-title-wrapper {
    position: relative;
    display: inline-block;
}

.section-title-wrapper::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4361ee, #7209b7);
    border-radius: 2px;
}

.section-title-wrapper.text-start::after {
    left: 0;
    transform: none;
}

/* Navbar enhancement */
.navbar {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: #ffc107;
    border-radius: 1px;
    transition: transform 0.3s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Animated underline link */
.animated-underline {
    position: relative;
    text-decoration: none;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* Z-index */
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.z-3 { z-index: 3; }

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

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover lift */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

/* Hover scale image */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover-zoom:hover img {
    transform: scale(1.08);
}

/* Border gradient */
.border-gradient {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.border-gradient::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    z-index: -1;
}

/* Typing effect container */
.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #ffc107;
    animation: typing 3s steps(40) 1s forwards, blink 0.8s step-end infinite;
    width: 0;
    max-width: fit-content;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    border: none;
    box-shadow: 0 4px 16px rgba(67,97,238,0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(67,97,238,0.4);
}

/* Landing page specific responsive */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 70vh;
    }
    .hero-section .display-4 {
        font-size: calc(1.8rem + 1.5vw);
    }
    .stat-item:not(:last-child)::after {
        display: none;
    }
    .stat-item .stat-number {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 60vh;
    }
    .hero-section .display-4 {
        font-size: calc(1.5rem + 1vw);
    }
    .hero-badge {
        padding: 1.25rem;
    }
}
