:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --surface: #FFFFFF;
    --background: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --input-bg: #FFFFFF;
    --ring: rgba(37, 99, 235, 0.2);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left Side - Image */
.auth-hero {
    flex: 1;
    display: none;
    position: relative;
    background-color: var(--primary);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-hero {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.auth-hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.auth-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
}

.auth-hero-content {
    position: relative;
    z-index: 10;
    padding: 4rem;
    color: white;
    margin-top: auto;
}

.auth-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-hero-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 400px;
}

/* Right Side - Form */
.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--surface);
    position: relative;
}

@media (min-width: 1024px) {
    .auth-form-section {
        flex: 0 0 500px;
        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.05);
        z-index: 20;
    }
}

@media (min-width: 1280px) {
    .auth-form-section {
        flex: 0 0 600px;
    }
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.auth-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 1.5rem;
}

.auth-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition);
}

/* For Toggle Animation */
#login-form {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

#recovery-form {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

.form-input::placeholder {
    color: #94A3B8;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    transition: color 0.2s;
    outline: none;
}

.password-toggle:hover {
    color: var(--text-main);
}

.is-invalid {
    border-color: #EF4444 !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
}

.text-danger {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Bootstrap Alert Emulation */
.alert {
    position: relative;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-dismissible {
    padding-right: 3rem;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: .5;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1.25rem 1rem;
    cursor: pointer;
}

.btn-close:hover {
    opacity: .75;
}

.fade {
    transition: opacity .15s linear;
}

.fade:not(.show) {
    opacity: 0;
}


.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-input {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    accent-color: var(--primary);
    cursor: pointer;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
}

.text-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

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

.btn-primary:disabled {
    background-color: #94A3B8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: var(--background);
    border-color: #CBD5E1;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Unlock Slider Styles */
.slider-container {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.unlock-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 48px;
    background: #E2E8F0;
    border-radius: 24px;
    outline: none;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: background 0.3s;
}

.unlock-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    transition: background 0.3s;
}

.unlock-slider::-moz-range-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px;
    transition: background 0.3s;
}

.unlock-slider.unlocked {
    background: #dcfce7;
    border-color: #86efac;
}

.unlock-slider.unlocked::-webkit-slider-thumb {
    background: #22c55e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
}

.unlock-slider.unlocked::-moz-range-thumb {
    background: #22c55e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'%3E%3C/path%3E%3C/svg%3E");
}