/* ========================================
   MediCare Pro - Login Styles
   ======================================== */

:root {
    --primary: #0D9488;
    --primary-dark: #0F766E;
    --primary-light: #14B8A6;
    --accent: #F59E0B;
    --accent-light: #FBBF24;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --white: #FFFFFF;
    --success: #10B981;
    --error: #EF4444;
    --gradient-1: linear-gradient(135deg, #0D9488 0%, #0F766E 50%, #047857 100%);
    --gradient-2: linear-gradient(135deg, #14B8A6 0%, #0D9488 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--gray-100);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Login Container Layout
   ======================================== */

.login-container {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Left Side - Branding
   ======================================== */

.login-branding {
    flex: 1;
    background: var(--gradient-1);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.1); }
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--white);
    font-weight: 600;
}

.logo-text span {
    color: var(--accent-light);
}

.tagline {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 16px;
}

.description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 20px;
    color: var(--accent-light);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.float-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.float-circle.c1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation: float 8s ease-in-out infinite;
}

.float-circle.c2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

.float-circle.c3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 10%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ========================================
   Right Side - Login Form
   ======================================== */

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 28px;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--gray-500);
    font-size: 15px;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

/* Input Groups */
.input-group {
    margin-bottom: 0px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-500);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 48px 16px 16px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--dark);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.input-icon {
    position: absolute;
    right: 16px;
    color: var(--gray-400);
    font-size: 18px;
}

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

.error-message {
    display: block;
    font-size: 13px;
    color: var(--error);
    margin-top: 8px;
    min-height: 20px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--white);
    background: var(--gradient-2);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: var(--gray-500);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: var(--primary);
}

.btn-link {
    font-size: 14px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-link:disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

/* OTP Section */
.otp-info {
    text-align: center;
    margin-bottom: 32px;
}

.otp-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(13, 148, 136, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
}

.otp-info p {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 4px;
}

.otp-info h3 {
    color: var(--dark);
    font-size: 18px;
    font-weight: 600;
}

.otp-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--dark);
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.otp-separator {
    font-size: 24px;
    color: var(--gray-300);
    font-weight: 300;
}

.timer-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
    padding: 16px;
    background: var(--gray-100);
    border-radius: 10px;
}

#timerText {
    font-size: 14px;
    color: var(--gray-500);
}

#timerText strong {
    color: var(--primary);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.form-footer p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.security-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.security-badges span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-400);
}

.security-badges i {
    color: var(--success);
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader .pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.loader i {
    font-size: 32px;
    color: var(--white);
    z-index: 1;
    animation: beat 1s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.loading-overlay p {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .login-branding {
        padding: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-branding {
        padding: 32px 20px;
        min-height: auto;
    }
    
    .brand-content {
        text-align: center;
    }
    
    .logo-wrapper {
        justify-content: center;
        margin-bottom: 16px;
    }
    
    .logo-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
    
    .logo-text {
        font-size: 26px;
    }
    
    .tagline {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .description {
        font-size: 14px;
        margin-bottom: 24px;
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .feature-item {
        padding: 12px 14px;
        font-size: 12px;
        gap: 8px;
    }
    
    .feature-item i {
        font-size: 16px;
    }
    
    .login-form-section {
        padding: 28px 20px 40px;
    }
    
    .form-wrapper {
        max-width: 100%;
    }
    
    .form-header {
        margin-bottom: 28px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .form-header p {
        font-size: 14px;
    }
    
    .input-wrapper input {
        padding: 14px 44px 14px 52px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    /* OTP Section Mobile */
    .otp-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .otp-info h3 {
        font-size: 16px;
    }
    
    .otp-input-group {
        gap: 6px;
    }
    
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .otp-separator {
        font-size: 20px;
        margin: 0 2px;
    }
    
    .timer-section {
        padding: 14px;
        margin: 20px 0;
    }
    
    #timerText {
        font-size: 13px;
    }
    
    .form-footer {
        margin-top: 28px;
        padding-top: 20px;
    }
    
    .security-badges {
        gap: 16px;
    }
    
    .security-badges span {
        font-size: 11px;
    }
    
    /* Floating elements - reduce on mobile */
    .float-circle.c1 {
        width: 150px;
        height: 150px;
    }
    
    .float-circle.c2 {
        width: 100px;
        height: 100px;
    }
    
    .float-circle.c3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-branding {
        padding: 24px 16px;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .tagline {
        font-size: 14px;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .feature-item {
        padding: 10px 12px;
        font-size: 11px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    
    .feature-item i {
        font-size: 18px;
    }
    
    .login-form-section {
        padding: 24px 16px 36px;
    }
    
    .form-header h2 {
        font-size: 20px;
    }
    
    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 18px;
        border-radius: 8px;
    }
    
    .otp-separator {
        font-size: 18px;
    }
    
    .timer-section {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .btn-link {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .otp-input-group {
        gap: 4px;
    }
    
    .otp-input {
        width: 36px;
        height: 44px;
        font-size: 16px;
    }
    
    .otp-separator {
        font-size: 16px;
        margin: 0;
    }
}

