/* Modern Login Panel Styles */
:root {
    --dentist-blue: #2193b0;
    --dentist-light-blue: #6dd5ed;
    --dentist-orange: #ff7e5f;
    --gradient-blue: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --border-radius-md: 12px;
    --transition-normal: all 0.3s ease;
}

.login-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Initial state - hidden */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.login-panel.active {
    opacity: 1;
    visibility: visible;
}

.login-panel-content {
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 0;
    position: relative;
    animation: slideIn 0.3s forwards;
    display: flex;
    flex-direction: column;
}

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

.login-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.login-panel-close button {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.login-panel-close button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: rotate(90deg);
}

/* Login Branding */
.login-branding {
    text-align: center;
    padding: 20px 25px 12px;
    flex-shrink: 0;
}

.login-logo {
    height: 35px;
    margin-bottom: 10px;
}

.login-welcome {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
}

/* Tabs */
.login-panel-tabs {
    display: flex;
    padding: 0 25px;
    margin-bottom: 12px;
    position: relative;
    flex-shrink: 0;
}

.login-panel-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 1px;
    background: #eee;
}

.login-panel-tabs button {
    flex: 1;
    background: none;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: var(--transition-normal);
}

.login-panel-tabs button.active {
    color: var(--dentist-blue);
}

.login-panel-tabs button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.login-panel-tabs button.active::after {
    transform: scaleX(1);
}

/* Form Containers */
.login-form-container,
.signup-form-container {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-normal);
    padding: 0 25px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.login-form-container.active,
.signup-form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Form Elements */
.form-group {
    margin-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #37474F;
    font-size: 11px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 6px 10px 6px 30px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 12px;
    transition: var(--transition-normal);
    background: #f9f9f9;
    height: 32px;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--dentist-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 147, 176, 0.1);
    outline: none;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 12px;
    padding: 2px;
}

.toggle-password:hover {
    color: var(--dentist-blue);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #666;
    cursor: pointer;
}

.remember-me input {
    margin-right: 6px;
}

.forgot-password {
    color: var(--dentist-blue);
    text-decoration: none;
    transition: var(--transition-normal);
}

.forgot-password:hover {
    color: var(--dentist-orange);
    text-decoration: underline;
}

.terms-policy {
    font-size: 12px;
    margin-bottom: 12px;
    color: #666;
    line-height: 1.3;
    padding: 10px;
    background: rgba(33, 147, 176, 0.03);
    border-radius: 6px;
    border-left: 3px solid var(--dentist-blue);
}

.terms-policy a {
    color: var(--dentist-blue);
    text-decoration: none;
    transition: var(--transition-normal);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.terms-policy a:hover {
    color: var(--dentist-orange);
    border-bottom-color: var(--dentist-orange);
}

.terms-policy input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.terms-policy label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}

.login-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.login-submit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.login-submit i {
    transition: transform 0.3s ease;
}

.login-submit:hover i {
    transform: translateX(5px);
}

/* Social Login */
.social-login {
    text-align: center;
    padding: 12px 25px 20px;
    flex-shrink: 0;
}

.divider {
    position: relative;
    margin: 12px 0;
    text-align: center;
}

.divider span {
    display: inline-block;
    padding: 0 8px;
    background: white;
    position: relative;
    z-index: 1;
    color: #999;
    font-size: 12px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 12px;
}

.social-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background: white;
    color: #666;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 24px;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-btn.google {
    color: #444;
    border-color: #ddd;
}

.social-btn.google:hover {
    color: #DB4437;
    border-color: #DB4437;
    background-color: rgba(219, 68, 55, 0.05);
}

.social-btn.apple {
    color: #444;
    border-color: #ddd;
}

.social-btn.apple:hover {
    color: #000;
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 576px) {
    .login-panel-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .login-branding {
        padding: 20px 15px 15px;
    }
    
    .login-panel-tabs {
        padding: 0 15px;
    }
    
    .login-form-container,
    .signup-form-container,
    .social-login {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-login {
        margin-top: auto;
        padding-bottom: 30px;
    }
}