:root {
    --primary-color: #26549E;
    --primary-rgb: 38, 84, 158;
    --secondary-color: #FF5C0A;
    --accent-color: #00D2FF;
    --bg-gradient: radial-gradient(circle at top left, #f8faff 0%, #e8f0fe 50%, #d1e3ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.02);
    --text-color: #1a202c;
    --text-secondary: #4a5568;
    --card-radius: 8px;
}

body {
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: flourishDrift 20s ease infinite;
    background-attachment: fixed;
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    letter-spacing: -0.011em;
    overflow-x: hidden;
}

@keyframes flourishDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header {
    background: #26549E !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky !important;
    top: 0;
    z-index: 1040 !important; /* Ensure it stays above dashboard cards */
}

footer {
    background: #26549E !important;
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

main {
    flex: 1;
    padding-top: 10px;
    padding-bottom: 5px;
}

.glass-morphism {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--card-radius);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.glass-morphism:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
    border-radius: var(--card-radius);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 15px 45px -12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.25rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3c75 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e4a8c 0%, #112a52 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(38, 84, 158, 0.25);
}

/* SSO Buttons */
.btn-google, .btn-facebook {
    border-radius: 14px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-google {
    background: white !important;
    color: #3c4043 !important;
    border: 2px solid #34A853 !important;
}

.btn-google:hover {
    background: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

.btn-facebook {
    background-color: #1877f2 !important;
    color: white !important;
    border: none !important;
}

.btn-facebook:hover {
    background-color: #166fe5 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.3) !important;
}

.btn-google img {
    height: 20px;
    width: 20px;
    margin-right: 12px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.7));
}

.toast-container {
    z-index: 1055;
}

/* Utilities */
.fw-800 { font-weight: 800; }
.line-height-1 { line-height: 1.1; }

.section-title {
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Global Modal Glassmorphism */
.modal-content {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1) !important;
    border-radius: var(--card-radius) !important;
    overflow: hidden !important;
}

.modal-header {
    background: var(--primary-color) !important;
    height: 40px !important;
    padding: 0 1.25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: white !important;
}

.modal-header .modal-title {
    color: white !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-backdrop {
    background-color: var(--primary-color) !important;
}

.modal-backdrop.show {
    opacity: 0.25 !important;
}

/* Global Dropdown Glassmorphism */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 0.75rem !important;
    border-radius: 16px !important;
    z-index: 1060 !important;
    transform-origin: top right;
    animation: dropdownPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dropdownPop {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dropdown-item {
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background: rgba(38, 84, 158, 0.1) !important;
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.dropdown-item i {
    width: 20px;
}

.dropdown-divider {
    opacity: 0.15 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.2) !important;
    margin: 0.5rem 0 !important;
}

/* Fix for Select elements consistency */
.form-select:focus {
    box-shadow: none !important;
    border-color: rgba(38, 84, 158, 0.2) !important;
}
