/* 
 * Consolidated CSS File - All Styles Combined
 * This file contains all the modular styles in one file for compatibility
 */

/* ========================================
   CSS VARIABLES (DESIGN TOKENS)
   ======================================== */

:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --success-gradient: linear-gradient(135deg, #00b894, #00a085);
    --warning-gradient: linear-gradient(135deg, #fdcb6e, #e17055);
    --danger-gradient: linear-gradient(135deg, #e17055, #d63031);
    --info-gradient: linear-gradient(135deg, #0984e3, #74b9ff);
    
    /* Solid Colors */
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --info-color: #0984e3;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --gray-900: #000000;
    
    /* Typography */
    --font-family-primary: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    /* Glassmorphism */
    --glass-background: rgba(255, 255, 255, 0.95);
    --glass-background-light: rgba(255, 255, 255, 0.05);
    --glass-backdrop: blur(10px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   CSS RESET AND BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    color: var(--gray-800);
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--secondary-color);
}

/* Container */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: var(--spacing-lg);
}

.hidden {
    display: none !important;
}

/* ========================================
   FORM COMPONENTS
   ======================================== */

.form-container {
    background: var(--glass-background);
    backdrop-filter: var(--glass-backdrop);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl) var(--spacing-xl);
    box-shadow: var(--shadow-2xl);
    border: var(--glass-border);
    transition: all var(--transition-base);
}

.form-container.hidden {
    display: none;
}

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* Portal Branding with College Icon */
.portal-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.college-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.college-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.form-header h2 {
    color: var(--gray-800);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
}

.form-header h2 i {
    color: #667eea;
    margin-right: 10px;
}

.form-header p {
    color: var(--gray-600);
    font-size: var(--font-size-base);
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
    width: 16px;
    z-index: 1;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 15px 45px 15px 50px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
    font-family: var(--font-family-primary);
}

/* Special padding for password inputs with toggle button */
.input-group input[type="password"] {
    padding-right: 50px;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #999;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: color 0.3s ease;
    z-index: 2;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: #667eea;
}

/* Role Selector */
.role-selector {
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
}

.role-selector label {
    color: #333;
    font-weight: 500;
    margin-bottom: 15px;
    display: block;
    font-size: 16px;
}

.role-options {
    display: flex;
    gap: 10px;
}

.role-option {
    cursor: pointer;
    flex: 1;
    position: relative;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    text-align: center;
    gap: 8px;
    cursor: pointer;
    min-width: 120px;
    width: 100%;
}

.role-card i {
    font-size: 24px;
    color: #888;
    transition: color 0.3s ease;
}

.role-card span {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: color 0.3s ease;
}

.role-option input[type="radio"]:checked + .role-card {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.role-option input[type="radio"]:checked + .role-card i {
    color: #667eea;
}

.role-option input[type="radio"]:checked + .role-card span {
    color: #667eea;
}

.role-card:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary i {
    margin-right: 8px;
    font-size: 14px;
}

/* Loading State for Primary Button */
.btn-primary.loading {
    background: #ccc;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Secondary Button */
.btn-secondary {
    width: 100%;
    padding: 12px;
    background: #6c757d;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary i {
    margin-right: 8px;
    font-size: 14px;
}

/* Loading State for Secondary Button */
.btn-secondary.loading {
    background: #6c757d;
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    pointer-events: none;
}

.btn-secondary.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Form Links */
.form-links {
    text-align: center;
    margin-top: 20px;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #764ba2;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.remember-me input {
    margin-right: 8px;
    width: auto !important;
    padding: 0 !important;
}

/* Error and Success Messages */
.error-message, .success-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* User Info Display */
.user-info {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.user-info h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 20px;
}

.user-info p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

/* === GLOBAL UTILITIES === */

/* Floating Background Bubbles Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 20s infinite linear;
}

.floating-shape.shape1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.floating-shape.shape2 {
    width: 80px;
    height: 80px;
    top: 70%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 20s;
    animation-direction: reverse;
}

.floating-shape.shape3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 10%;
    animation-delay: 10s;
    animation-duration: 30s;
}

.floating-shape.shape4 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 40%;
    animation-delay: 15s;
    animation-duration: 18s;
    animation-direction: reverse;
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-100px) translateX(50px) rotate(90deg);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-200px) translateX(-30px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-150px) translateX(-80px) rotate(270deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) translateX(0px) rotate(360deg);
        opacity: 0.7;
    }
}

/* Additional bubble effects for more depth */
.background-animation::before,
.background-animation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    animation: float 15s infinite linear;
}

.background-animation::before {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 5%;
    animation-delay: 8s;
    animation-duration: 22s;
}

.background-animation::after {
    width: 90px;
    height: 90px;
    top: 15%;
    left: 70%;
    animation-delay: 12s;
    animation-duration: 28s;
    animation-direction: reverse;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundFlow 20s ease-in-out infinite;
}

@keyframes backgroundFlow {
    0%, 100% { 
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .container {
        max-width: 95%;
        padding: 15px;
    }
    
    .form-container {
        padding: 25px 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .role-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-group input,
    .input-group select {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }
    
    .input-group i {
        left: 15px;
        font-size: 14px;
    }
    
    .toggle-password {
        right: 15px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 15px 20px;
        font-size: 14px;
    }
}

/* Responsive Role Selector */
@media (max-width: 480px) {
    .role-selector {
        gap: 10px;
    }
    
    .role-card {
        padding: 15px 10px;
        min-width: 100px;
        font-size: 14px;
    }
    
    .role-card i {
        font-size: 20px;
    }
    
    .role-card span {
        font-size: 12px;
    }
}

/* ========================================
   ANALYTICS DASHBOARD STYLES
======================================== */

/* Analytics Section */
.analytics-section {
    margin-top: 40px;
    padding: 0;
    animation: fadeInUp 0.6s ease-out;
}

.analytics-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.analytics-header h3 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.analytics-header h3 i {
    color: #667eea;
    font-size: 24px;
}

.analytics-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

/* KPI Cards Container */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.kpi-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
}

.kpi-icon i {
    font-size: 24px;
    color: white;
}

.kpi-info h3 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 5px 0;
    line-height: 1;
}

.kpi-info p {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 3px 0;
    opacity: 0.95;
}

.kpi-subtitle {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

/* Charts Container */
.charts-container {
    padding: 0 20px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.chart-header {
    margin-bottom: 20px;
    text-align: center;
}

.chart-header h4 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chart-header h4 i {
    color: #667eea;
    font-size: 16px;
}

.chart-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Loading State for Charts */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #666;
}

.chart-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #667eea;
}

.chart-loading p {
    margin: 0;
    font-size: 14px;
}

/* No Data State */
.chart-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #999;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.chart-no-data i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.chart-no-data p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Table Header Actions */
.table-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-analytics {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-analytics:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-analytics i {
    font-size: 16px;
}

/* Animation for Analytics Section */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
