/* CUG SIM Management System - Modern Stylesheet */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    /* Modern Palette */
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #8b5cf6;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    --font-main: 'Inter', sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation - Floating Glass */
.navbar {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    position: relative;
    text-align: center;
}

/* Decorative Background Blobs */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #4f46e5;
}

.blob-2 {
    bottom: 10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: #ec4899;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

/* Modern Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out 0.4s backwards;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: white;
}

.card-text {
    color: var(--text-muted);
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    font-size: 1.125rem;
    animation: slideUp 0.8s ease-out 0.3s backwards;
}

.btn-modern:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .navbar-brand span {
        display: none;
    }
}

/* Application Interface Support (Keep compat with old views) */
.page-header {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    color: #1e293b;
}

.page-title {
    color: #1e293b;
}

/* Make sure white cards in dashboard still look good */
.card:not(.glass-card) {
    background: white;
    color: #1e293b;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-control {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.form-label {
    color: #475569;
}

/* Table styles for dashboard */
.table {
    color: #1e293b;
}

.table th {
    background: #f1f5f9;
    color: #475569;
}

/* Badges override */
.badge {
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-submitted {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-under_verification {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-accepted,
.badge-in_progress {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-closed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Grid system for dashboards */
.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Content wrapper for dashboard pages */
.content-wrapper {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Form improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Fix for select dropdowns */
.form-control select,
select.form-control {
    background: rgba(30, 41, 59, 0.95) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-control option,
select.form-control option {
    background: #1e293b !important;
    color: white !important;
    padding: 0.5rem !important;
    border: none !important;
}

.form-control option:hover,
select.form-control option:hover {
    background: #334155 !important;
    color: white !important;
}

.form-control option:checked,
select.form-control option:checked {
    background: #6366f1 !important;
    color: white !important;
}

/* Additional browser-specific fixes */
select.form-control::-ms-expand {
    display: none;
}

/* Firefox specific */
@-moz-document url-prefix() {
    select.form-control {
        background: #1e293b !important;
        color: white !important;
    }
    
    select.form-control option {
        background: #1e293b !important;
        color: white !important;
    }
}

/* WebKit browsers (Chrome, Safari, Edge) */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select.form-control {
        background: rgba(30, 41, 59, 0.95) !important;
        color: white !important;
    }
    
    select.form-control option {
        background: #1e293b !important;
        color: white !important;
    }
}

/* Alert styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Button improvements */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Button outline variant */
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Utility classes */
.mb-3 {
    margin-bottom: 2rem;
}

.mt-3 {
    margin-top: 2rem;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-nav {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}