/* ====================================
   AUTH PAGES STYLES
   Medical Dashboard Authentication
   ==================================== */

/* Auth Page Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #14B8A6 0%, #2563EB 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Card */
.auth-card {
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 40px 32px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 15px 50px rgba(20, 184, 166, 0.2);
    transform: translateY(-3px);
}

@media (max-width: 576px) {
    .auth-card {
        padding: 28px 20px;
    }
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #14B8A6, #2563EB);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
    animation: pulse-logo 3s ease-in-out infinite, heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.05);
    }
    20%, 40% {
        transform: scale(1);
    }
}

@keyframes pulse-logo {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
    }
    50% {
        box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
    }
}

.auth-logo i {
    font-size: 32px;
    color: white;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #64748B;
    margin-bottom: 0;
}

/* Auth Form */
.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

.form-label .required {
    color: #EF4444;
    margin-left: 2px;
}

/* Modern Input Wrapper from forms.html */
.modern-input-wrapper {
    position: relative;
}

.modern-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #14B8A6;
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}

.form-control,
.modern-input {
    height: 48px;
    padding: 0 16px 0 46px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    color: #1E293B;
    transition: all 0.3s ease;
    background: #F8FAFC;
    width: 100%;
}

.form-control:focus,
.modern-input:focus {
    border-color: #14B8A6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
    background: white;
    outline: none;
}

.form-control::placeholder,
.modern-input::placeholder {
    color: #94A3B8;
    font-size: 14px;
}

select.form-control,
select.modern-input {
    padding-right: 40px;
    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='%2314B8A6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    cursor: pointer;
}

/* Password Input Group */
.password-group {
    position: relative;
}

.password-group .form-control,
.password-group .modern-input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 6px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #14B8A6;
}

.password-toggle i {
    font-size: 18px;
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.form-check {
    padding-left: 28px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #CBD5E1;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 0;
    margin-left: -28px;
}

.form-check-input:checked {
    background-color: #14B8A6;
    border-color: #14B8A6;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-check-label {
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 13px;
    color: #14B8A6;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.forgot-link:hover {
    color: #0F766E;
    text-decoration: underline;
}

/* Submit Button - Icon Split Style from buttons.html */
.btn-auth {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #14B8A6, #2563EB);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.btn-auth .btn-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.btn-auth .btn-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
}

.btn-auth .btn-icon {
    width: 50px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-auth .btn-icon i {
    font-size: 18px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-auth:active {
    transform: translateY(0);
}

@media (max-width: 576px) {
    .btn-auth {
        height: 46px;
        font-size: 14px;
    }
    
    .btn-auth .btn-icon {
        width: 46px;
    }
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.auth-divider span {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.btn-social {
    flex: 1;
    height: 46px;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    background: white;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-social:hover {
    border-color: #14B8A6;
    background: #F0FDFA;
    color: #14B8A6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.15);
}

.btn-social i {
    font-size: 18px;
}

.btn-google:hover {
    border-color: #EA4335;
    background: #FEF2F2;
    color: #EA4335;
}

.btn-facebook:hover {
    border-color: #1877F2;
    background: #EFF6FF;
    color: #1877F2;
}

@media (max-width: 576px) {
    .social-login {
        flex-direction: column;
    }
    
    .btn-social {
        width: 100%;
    }
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.auth-footer p {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 0;
}

.auth-footer a {
    color: #14B8A6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #0F766E;
    text-decoration: underline;
}

/* Alert Messages */
.alert-auth {
    padding: 14px 16px;
    border-radius: 10px;
    border: none;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideDown 0.4s ease;
    font-size: 13px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-auth i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-auth-success {
    background: #ECFDF5;
    color: #065F46;
    border-left: 3px solid #10B981;
}

.alert-auth-error {
    background: #FEF2F2;
    color: #991B1B;
    border-left: 3px solid #EF4444;
}

.alert-auth-warning {
    background: #FFFBEB;
    color: #92400E;
    border-left: 3px solid #F59E0B;
}

.alert-auth-info {
    background: #EFF6FF;
    color: #1E40AF;
    border-left: 3px solid #3B82F6;
}

/* Loading State */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Medical Icon Decorations */
.medical-decoration {
    position: fixed;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.medical-decoration.top-left {
    top: 20px;
    left: 20px;
    font-size: 100px;
    color: white;
}

.medical-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    font-size: 120px;
    color: white;
}

/* Back to Home Link */
.back-home {
    position: absolute;
    top: 24px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
    color: white;
}

.back-home i {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 576px) {
    .auth-card {
        padding: 28px 20px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .auth-logo i {
        font-size: 28px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-control,
    .modern-input {
        height: 44px;
        padding: 0 14px 0 42px;
        font-size: 13px;
    }

    .modern-input-icon {
        left: 14px;
        font-size: 16px;
    }

    .password-group .form-control,
    .password-group .modern-input {
        padding-right: 42px;
    }

    .password-toggle {
        right: 12px;
    }

    .form-options {
        margin-bottom: 20px;
    }

    .btn-auth {
        height: 46px;
        font-size: 14px;
    }
    
    .btn-auth .btn-icon {
        width: 46px;
    }

    .auth-divider {
        margin: 20px 0 16px 0;
    }

    .social-login {
        flex-direction: column;
        margin-bottom: 20px;
    }

    .btn-social {
        width: 100%;
    }

    .back-home {
        top: 12px;
        left: 12px;
        padding: 8px 14px;
        font-size: 12px;
    }

    .medical-decoration {
        display: none;
    }

    .alert-auth {
        padding: 12px 14px;
        font-size: 12px;
    }

    .alert-auth i {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .auth-wrapper {
        background: white;
    }

    .back-home,
    .medical-decoration {
        display: none;
    }
}

/* Additional Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #14B8A6, #2563EB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 16px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 24px;
}
