:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --slate: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.15);
}

[data-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #e0e7ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Abstract Animated Orbs in Background */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #818cf8;
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #c084fc;
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(60px, 40px) scale(1.15);
    }
}

/* Glassmorphic Login Container */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 10;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

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

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-header img {
    max-height: 60px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    transition: transform 0.3s ease;
}

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

.brand-header h4 {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.brand-header p {
    color: var(--slate);
    font-size: 0.9rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.input-group-custom {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-group-custom i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate);
    z-index: 5;
    transition: color 0.3s;
}

.form-control-custom {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    color: var(--dark);
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control-custom:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.form-control-custom:focus + i {
    color: var(--primary);
}

.form-select-custom {
    padding-left: 2.75rem !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
}

/* Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4f46e5 100%);
}

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

/* Modal Glassmorphism */
.modal-glass {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-glass .modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1rem;
}

.modal-header {
    border: none;
    padding-bottom: 0;
}

.modal-footer {
    border: none;
    padding-top: 0;
}

.security-badge {
    width: 64px;
    height: 64px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Beautiful Code / Digit inputs */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1.5rem 0;
}

.otp-box {
    width: 48px;
    height: 56px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    background: #fff;
    color: var(--dark);
    transition: all 0.2s;
    outline: none;
}

.otp-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

/* Error Wiggle */
.wiggle {
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%,
    100% {
        transform: translateX(0);
    }
    20%,
    60% {
        transform: translateX(-8px);
    }
    40%,
    80% {
        transform: translateX(8px);
    }
}

/* Theme button */
.btn-theme {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    border: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    z-index: 20;
}

.btn-theme:hover {
    color: var(--primary);
    transform: rotate(30deg);
}

/* Custom Alert styling */
.alert-premium {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

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

.forgot-link:hover {
    opacity: 0.8;
    text-decoration: underline !important;
}
