/* Modern & Elegant CSS with Glass Morphism */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e1b4b;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    animation: backgroundMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

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

/* Glass Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.4);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.navbar-text {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

/* Container Styles */
.container {
    position: relative;
    z-index: 1;
}

/* Glass Cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-body {
    color: white;
}

.card-title {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Form Controls */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-label {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Select dropdown options - dark text on white background */
.form-select option {
    background: white !important;
    color: #1e1b4b !important;
    padding: 8px;
}

/* For white background cards/pages */
.card .form-control,
.card .form-select {
    background: white !important;
    color: #1e1b4b !important;
    border: 1px solid #d1d5db !important;
}

.card .form-control:focus,
.card .form-select:focus {
    background: white !important;
    color: #1e1b4b !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.1) !important;
}

.card .form-control::placeholder {
    color: #9ca3af !important;
}

.card .form-label {
    color: #1e1b4b !important;
    text-shadow: none !important;
}

.card .form-select option {
    background: white !important;
    color: #1e1b4b !important;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    animation: slideInDown 0.5s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Tables */
.table-responsive {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    animation: fadeIn 0.8s ease;
}

.table {
    color: white;
}

.table thead {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.05);
}

.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

.table-warning thead {
    background: rgba(245, 158, 11, 0.2);
}

.table-success thead {
    background: rgba(16, 185, 129, 0.2);
}

.table-info thead {
    background: rgba(59, 130, 246, 0.2);
}

.table-secondary {
    opacity: 0.6;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4rem;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, white, transparent);
    border-radius: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Homepage Hero */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease;
}

/* Form Check */
.form-check-input {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

/* Code Tags */
code {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: #fbbf24;
}

/* Links */
a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Loading Animation */
.loading {
    animation: pulse 2s infinite;
}

/* Hover Glow Effect */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* Modal Fixes */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.modal-dialog {
    z-index: 1060 !important;
    pointer-events: auto !important;
}

.modal-content {
    pointer-events: auto !important;
    position: relative;
    z-index: 1061 !important;
}

.modal-header,
.modal-body,
.modal-footer {
    pointer-events: auto !important;
    position: relative;
    z-index: 1062 !important;
}

.modal button,
.modal .btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 1063 !important;
    cursor: pointer !important;
}

.modal form {
    pointer-events: auto !important;
    z-index: 1063 !important;
}
/* Fix for white background pages - make text dark */
.bg-white .form-label,
.bg-white .card-title,
.bg-white h1, .bg-white h2, .bg-white h3, 
.bg-white h4, .bg-white h5, .bg-white h6,
.bg-white p, .bg-white span, .bg-white div,
.bg-white td, .bg-white th, .bg-white label {
    color: #1e1b4b !important;
    text-shadow: none !important;
}

.bg-white .form-control,
.bg-white .form-select {
    background: white !important;
    color: #1e1b4b !important;
    border: 1px solid #d1d5db !important;
}

.bg-white .form-control::placeholder {
    color: #9ca3af !important;
}

.bg-white .table {
    color: #1e1b4b !important;
}

.bg-white .card {
    background: white !important;
    border: 1px solid #e5e7eb !important;
}

.bg-white .card-body {
    color: #1e1b4b !important;
}

/* Also fix for cards with white/light backgrounds */
.card.bg-white,
.card[style*="background: white"],
.card[style*="background-color: white"],
.card[style*="background:#fff"],
.card[style*="background-color:#fff"] {
    color: #1e1b4b !important;
}

.card.bg-white .form-label,
.card.bg-white .form-control,
.card.bg-white .form-select,
.card.bg-white h1, .card.bg-white h2, .card.bg-white h3,
.card.bg-white h4, .card.bg-white h5, .card.bg-white h6,
.card.bg-white p, .card.bg-white span,
.card.bg-white td, .card.bg-white th {
    color: #1e1b4b !important;
    text-shadow: none !important;
}

.card.bg-white .form-control,
.card.bg-white .form-select {
    background: white !important;
    color: #1e1b4b !important;
    border: 1px solid #d1d5db !important;
}

.card.bg-white .form-control::placeholder {
    color: #9ca3af !important;
}

/* Small text visibility */
.text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}