@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-dark: #0c2340;
    --primary-gold: #d4af37;
    --primary-light: #f8d568;
    --modern-dark: #0f172a;
    --modern-slate: #1e293b;
    --modern-light: #f8fafc;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--modern-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    /* removed display: flex; align-items: center; justify-content: center; to allow flow */
}

/* Background & Glass Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-bg {
    background: linear-gradient(-45deg, #0c2340, #1e293b, #0f172a, #0c2340);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Animations */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes smoothAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.logo-float {
    animation: float 3s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.transition-smooth {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo */
.logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.branding-section .logo-wrapper {
    width: 280px;
    height: 280px;
    position: relative;
    margin: 0 auto 3rem;
}

.branding-section .logo-img {
    width: 650px;
    max-width: none;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Inputs */
.input-modern {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.input-modern:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    outline: none;
    border-color: var(--primary-gold);
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-modern:focus+.input-icon {
    color: var(--primary-gold);
}

/* Buttons */
.btn-modern {
    background: linear-gradient(135deg, #d4af37 0%, #f8d568 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px -5px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: none;
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(212, 175, 55, 0.5);
    color: var(--primary-dark);
}

.btn-modern:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px -5px rgba(212, 175, 55, 0.4);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.7s ease;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Login Box */
.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    position: relative;
    /* overflow: hidden; Removed to allow tooltips/popovers if needed, and to not clip content if height is fixed */
    border: 1px solid rgba(226, 232, 240, 0.5);
    animation: smoothAppear 0.6s ease-out;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    /* Removed fixed vertical margin, relying on flex centering/padding */
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #0c2340 0%, #d4af37 50%, #0c2340 100%);
    border-radius: 20px 20px 0 0;
}

/* Checkbox */
.checkbox-modern {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    background-color: white;
}

.checkbox-modern:checked {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.checkbox-modern:checked::after {
    content: '\2713';
    /* Checkmark */
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

/* Floating Elements */
.floating-element {
    position: fixed;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

/* Mobile Logo */
.mobile-logo-wrapper {
    width: 100%;
    height: 140px;
    position: relative;
    overflow: hidden;
}

.mobile-logo-video {
    width: 400px;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Custom Responsive Utilities */
.login-container-responsive {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .login-container-responsive {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

@media (min-width: 992px) {
    .border-lg-end {
        border-right: 1px solid rgba(226, 232, 240, 1) !important;
    }
}

@media (max-width: 991.98px) {
    .border-sm-bottom {
        border-bottom: 1px solid rgba(226, 232, 240, 1) !important;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Utilities */
.text-primary-gold {
    color: var(--primary-gold);
}

.text-primary-dark {
    color: var(--primary-dark);
}

.bg-primary-gold {
    background-color: var(--primary-gold);
}

.bg-primary-dark {
    background-color: var(--primary-dark);
}

.hover-text-primary-gold:hover {
    color: var(--primary-gold) !important;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (min-width: 992px) {
    .login-box {
        padding: 2.5rem;
    }

    .branding-section {
        position: relative;
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .logo-img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .login-box {
        padding: 1.5rem;
    }

    .logo-img {
        width: 70px;
        height: 70px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.7);
}