/* 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: 400px;
    min-width: 400px;
    max-height: 90vh;
    background: white;
    border-radius: calc(var(--border-radius-md) * 0.8);
    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(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.login-panel-close button {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 29px;
    height: 29px;
    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: 24px 24px 16px;
    flex-shrink: 0;
}

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

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

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

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

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

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

.login-panel-tabs button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.login-panel-tabs button:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.login-panel-tabs button.active {
    color: var(--dentist-blue);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.login-panel-tabs button::after {
    display: none;
}

.login-panel-tabs button.active::after {
    display: none;
}

/* Form Containers */
.login-form-container,
.signup-form-container {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: var(--transition-normal);
    padding: 0 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

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

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

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

.input-wrapper {
    position: relative;
}

.input-wrapper:focus-within {
    outline: none !important;
}

.input-wrapper:focus-within .form-control {
    outline: none !important;
    box-shadow: none !important;
}

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

.form-control {
    width: 100%;
    padding: 10px 11px 10px 32px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 11px;
    transition: var(--transition-normal);
    background: #fff;
    height: 35px;
    box-sizing: border-box;
    color: #333;
}

.form-control:focus {
    border-color: var(--dentist-blue);
    background: white;
    box-shadow: none !important;
    outline: none !important;
    outline-offset: 0 !important;
}

.form-control:focus-visible {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

.form-control::placeholder {
    color: #999;
    font-size: 11px;
}

.toggle-password {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 11px;
    padding: 3px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.toggle-password:hover {
    background: rgba(0, 0, 0, 0.05);
}

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

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
    font-size: 11px;
}

.remember-me input {
    width: 13px;
    height: 13px;
    cursor: pointer;
}

.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: 10px;
    margin-bottom: 16px;
    color: #666;
    line-height: 1.5;
    padding: 10px;
    background: rgba(33, 147, 176, 0.03);
    border-radius: 6px;
    border-left: 2px 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: 6px;
    transform: scale(0.88);
}

.terms-policy label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    font-size: 10px;
    line-height: 1.5;
}

.login-submit,
.btn.login-submit,
.btn-primary.login-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px !important;
    font-size: 11px !important;
    background: var(--gradient-blue);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(33, 147, 176, 0.2) !important;
}

.login-submit:hover,
.btn.login-submit:hover,
.btn-primary.login-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(33, 147, 176, 0.3) !important;
}

.login-submit i {
    transition: transform 0.3s ease;
    font-size: 10px;
}

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

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

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

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

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

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

.social-btn {
    width: 45px;
    height: 45px;
    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: 19px;
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    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 */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .login-panel-content {
        width: 90%;
        max-width: 380px;
    }
    
    .login-branding {
        padding: 20px 20px 12px;
    }
    
    .login-panel-tabs {
        padding: 0 20px;
        margin-bottom: 16px;
    }
    
    .login-form-container,
    .signup-form-container {
        padding: 0 20px;
    }
    
    .social-login {
        padding: 12px 20px 20px;
    }
}

/* Mobile devices (576px and below) */
@media (max-width: 576px) {
    .login-panel-content {
        width: 95%;
        height: 100%;
        max-width: 100%;
        min-width: unset;
        max-height: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .login-branding {
        padding: 16px 12px 12px;
    }
    
    .login-logo {
        height: 28px;
    }
    
    .login-welcome {
        font-size: 17px;
    }
    
    .login-subtitle {
        font-size: 10px;
    }
    
    .login-panel-tabs {
        padding: 0 12px;
        margin-bottom: 12px;
    }
    
    .login-panel-tabs button {
        padding: 11px;
        font-size: 12px;
        gap: 5px;
    }
    
    .login-panel-tabs button i {
        font-size: 12px;
    }
    
    .login-form-container,
    .signup-form-container {
        padding: 0 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .form-control {
        padding: 10px 10px 10px 30px;
        font-size: 10px;
        height: 32px;
    }
    
    .input-icon {
        left: 10px;
        font-size: 10px;
    }
    
    .toggle-password {
        right: 10px;
        font-size: 10px;
        width: 24px;
        height: 24px;
    }
    
    .form-options {
        margin-bottom: 12px;
        font-size: 10px;
    }
    
    .remember-me {
        font-size: 10px;
        gap: 5px;
    }
    
    .remember-me input {
        width: 12px;
        height: 12px;
    }
    
    .forgot-password {
        font-size: 10px;
    }
    
    .login-submit {
        padding: 7px 14px !important;
        font-size: 10px !important;
        margin-top: 6px;
        gap: 5px;
    }
    
    .login-submit i {
        font-size: 9px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .terms-policy {
        font-size: 9px;
        margin-bottom: 12px;
        padding: 8px;
    }
    
    .terms-policy label {
        font-size: 9px;
        gap: 5px;
    }
    
    .terms-policy input[type="checkbox"] {
        margin-right: 5px;
    }
    
    .social-login {
        margin-top: auto;
        padding: 12px 12px 20px;
    }
    
    .divider span {
        font-size: 10px;
        padding: 0 8px;
    }
    
    .social-buttons {
        gap: 12px;
        margin-top: 8px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .login-panel-close {
        top: 12px;
        right: 12px;
    }
    
    .login-panel-close button {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .login-panel-content {
        max-width: 420px;
        width: 420px;
        min-width: 420px;
    }
}

/* Extra large screens (1400px and above) */
@media (min-width: 1400px) {
    .login-panel-content {
        max-width: 450px;
        width: 450px;
        min-width: 450px;
    }
}

/* Short screens - ensure modal fits */
@media (max-height: 700px) {
    .login-panel-content {
        max-height: 95vh;
    }
    
    .login-branding {
        padding: 16px 20px 10px;
    }
    
    .login-logo {
        height: 30px;
        margin-bottom: 8px;
    }
    
    .login-welcome {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .login-subtitle {
        font-size: 10px;
    }
    
    .login-panel-tabs {
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        height: 32px;
        padding: 10px 10px 10px 30px;
    }
    
    .login-submit {
        margin-top: 6px;
        padding: 7px 14px !important;
    }
    
    .social-login {
        padding-top: 12px;
        margin-top: 12px;
    }
}