/* ==============================================
   MAIN CSS - Global Styles
   ============================================== */

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

:root {
    /* Primary Color Palette */
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;

    /* Neutral Colors */
    --dark-blue: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;

    /* Semantic Color Tokens */
    --color-text-primary: #1f2937;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-bg-surface: #ffffff;
    --color-bg-base: #f3f4f6;
    --color-border: #e5e7eb;
    --color-border-focus: #0ea5e9;

    /* Spacing Scale (8px baseline grid) */
    --spacing-xs: 0.25rem;
    /* 4px */
    --spacing-sm: 0.5rem;
    /* 8px */
    --spacing-md: 1rem;
    /* 16px */
    --spacing-lg: 1.5rem;
    /* 24px */
    --spacing-xl: 2rem;
    /* 32px */
    --spacing-2xl: 3rem;
    /* 48px */
    --spacing-3xl: 4rem;
    /* 64px */

    /* Typography - Modern System Font Stack */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;

    /* Fluid Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: clamp(1.125rem, 2vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 3vw, 1.875rem);
    --font-size-3xl: clamp(1.75rem, 4vw, 2.25rem);

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.4;
    --line-height-relaxed: 1.65;

    /* Enhanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;

    /* Transitions - Optimized Timing */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Focus Ring */
    --focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.15);
}



body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    background-color: var(--color-bg-base);
    min-height: 100vh;
    overflow-x: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Heading Line Heights */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: var(--line-height-tight);
    font-weight: 700;
}

p {
    line-height: var(--line-height-relaxed);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==============================================
   HEADER STYLES
   ============================================== */

.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    font-size: var(--font-size-xl);
    box-shadow: var(--shadow-md);
}

.logo-img {
    width: 72px;
    height: auto;
    border-radius: 8px;
    background: var(--white);
    padding: 4px;
    box-shadow: var(--shadow-md);
    display: block;
}

.college-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 0.02em;
}

.tagline {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    font-weight: 400;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity var(--transition-fast);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* ==============================================
   HERO SECTION
   ============================================== */

.hero-section {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content>p:first-of-type {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.hero-description {
    font-size: var(--font-size-lg);
    opacity: 0.85;
    max-width: 640px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

/* ==============================================
   FEATURES SECTION
   ============================================== */

.features-section {
    padding: var(--spacing-3xl) 0;
    background: var(--white);
}

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

/* 2x2 Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.feature-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(180deg, var(--white), #fbfdff);
    border: 1px solid rgba(16, 24, 40, 0.04);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(14, 165, 233, 0.2);
}

.feature-item .feature-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.feature-item .feature-link:hover h4 {
    color: var(--secondary-color);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-lg);
    display: block;
}

.feature-item h4 {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    transition: color var(--transition-fast);
}

.feature-item p {
    color: var(--gray-600);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ==============================================
   BUTTONS
   ============================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

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

.btn-primary:hover {
    background: var(--dark-blue);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--gray-600);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-700);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==============================================
   FOOTER
   ============================================== */

.main-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    color: var(--white);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
}

.footer-section p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: var(--font-size-sm);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: var(--spacing-lg);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--gray-500);
}

/* NEW: UI EFFECTS - Animations, reveal, ripple, tilt, glassy cards */

@media (prefers-reduced-motion: reduce) {

    .reveal,
    .in-view,
    .btn,
    .tilt {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    will-change: transform, opacity;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Hero decorative blob + parallax layers */
.hero-section {
    position: relative;
    overflow: visible;
}

.hero-decor {
    position: absolute;
    right: -40px;
    top: -20px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.15), transparent 30%), radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.12), transparent 30%);
    filter: blur(24px);
    transform: translateZ(0);
    pointer-events: none;
    border-radius: 50%;
}

.parallax {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

.parallax-layer {
    position: absolute;
    transform: translate3d(0, 0, 0);
    transition: transform var(--transition-base);
    will-change: transform;
}

/* Glassy login box */
.login-box {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.75));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: var(--spacing-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.login-box.in-view {
    transform: translateY(0);
}

.login-box:focus-within {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
}

/* Application cards + badges */
.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.application-card {
    background: var(--white);
    border: 1px solid rgba(16, 24, 40, 0.04);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.app-meta {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.badge.pending {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info-color);
}

.badge.approved {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-color);
}

.badge.rejected {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
}

.badge.withdrawn {
    background: rgba(107, 114, 128, 0.08);
    color: var(--gray-600);
}

.application-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: var(--spacing-sm);
}

.application-files {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Improved input focus */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    border: 1px solid var(--gray-300);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.12);
}

/* Button ripple */
.btn {
    position: relative;
    overflow: hidden;
}

.btn .btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    opacity: 0.9;
    animation: ripple 600ms linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* Tilt */
.tilt {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt:hover {
    box-shadow: var(--shadow-lg);
    transform: translateZ(6px);
}

/* Feature card enhancement */
.feature-item {
    background: linear-gradient(180deg, var(--white), #fbfdff);
    border: 1px solid rgba(16, 24, 40, 0.04);
}

.feature-item.in-view {
    transform: translateY(0);
}

/* Subtle entrance */
.hero-content.in-view h2 {
    animation: floatIn 700ms var(--transition-fast) both;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small helpers */
.hidden-visually {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

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

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

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo-img {
        margin: 0 auto;
    }

    /* Features Grid Responsive */
    .features-grid {
        gap: 1.5rem;
        max-width: 700px;
    }

    .feature-item {
        padding: 2rem 1.5rem;
        min-height: 220px;
    }

    .feature-icon {
        font-size: 3rem;
    }
}

/* Mobile: Stack cards vertically (1 column) */
@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.25rem;
        max-width: 100%;
    }

    .feature-item {
        padding: 2rem 1.5rem;
        min-height: 200px;
    }

    .feature-icon {
        font-size: 2.75rem;
        margin-bottom: var(--spacing-md);
    }

    .feature-item h4 {
        font-size: 1rem;
    }

    .feature-item p {
        font-size: 0.875rem;
    }

    /* small-screen adjustments */
}



/* Dropdown (header user menu) */
.user-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.user-dropdown-toggle {
    background: transparent;
    border: none;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--white);
    color: var(--gray-800);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms var(--transition-fast), transform 220ms var(--transition-fast);
    transform: translateY(-6px) scale(0.98);
}

.user-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-menu a,
.user-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
    background: var(--gray-100);
}

/* Simple animations */
.animate-fade-in {
    animation: fadeIn 320ms ease-in-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 260ms ease-out both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tables for applications */
.apps-table {
    width: 100%;
    border-collapse: collapse;
}

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

.apps-table thead th {
    color: var(--primary-color);
    font-weight: 700;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;
}

.status-pending {
    background: #f59e0b;
}

.status-approved {
    background: #10b981;
}

.status-rejected {
    background: #ef4444;
}

/* small button modifiers */
.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: var(--font-size-sm);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .college-info h1 {
        font-size: var(--font-size-xl);
    }

    .hero-content h2 {
        font-size: var(--font-size-2xl);
    }

    .main-nav ul {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

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



/* ==============================================
   LOADING SKELETONS & STATES
   ============================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, var(--gray-200) 4%, var(--gray-300) 25%, var(--gray-200) 36%);
    background-size: 1000px 100%;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 60%;
}

.skeleton-button {
    height: 32px;
    width: 60px;
    border-radius: var(--radius-md);
}

.skeleton-row td {
    padding: 1rem !important;
}

.skeleton-block {
    height: 20px;
    border-radius: 4px;
}