/* Enhanced login.css with interactive and futuristic elements */
/* Login Page Specific Styles */

:root {
    /* Core variables for consistency */
    --primary-blue: #0077B6;
    --secondary-teal: #20B2AA;
    --dentist-blue: #2193b0;
    --dentist-light-blue: #6dd5ed;
    --dentist-orange: #ff7e5f;
    --text-charcoal: #333333;
    --background-white: #FFFFFF;
    --background-gray: #F8F9FA;
    --box-shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --box-shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --transition-normal: all 0.3s ease;
    
    /* Login-specific gradient variables */
    --login-gradient: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    --login-gradient-hover: linear-gradient(135deg, #1c809c 0%, #5bc0d6 100%);
    --orange-gradient: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    --login-backdrop: rgba(33, 147, 176, 0.05);
}

/* Login Page Container */
.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 80px 20px 20px;
    background: linear-gradient(to bottom, #f8fbff 0%, #f0f5f9 100%);
    position: relative;
    align-items: center;
    justify-content: flex-start;
}

/* Welcome section */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
}

.welcome-text {
    color: var(--text-charcoal);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #666;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

/* Dashboard card styling */
.dashboard-card {
    background: white;
    border-radius: calc(var(--border-radius-md) * 0.8);
    box-shadow: var(--box-shadow-sm);
    margin: 0 auto;
    max-width: 400px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Tabs styling */
.login-panel-content {
    background: white;
    border-radius: calc(var(--border-radius-md) * 0.8);
    overflow: hidden;
    position: relative;
    padding: 24px;
}

.login-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-charcoal);
    margin: 0 0 8px 0;
    text-align: center;
}

.login-card-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.4;
}

/* Tabs styling */
.login-panel-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.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);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    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 i {
    font-size: 13px;
}

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

.login-panel-tabs button.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--dentist-blue);
}

/* Form containers with smooth transitions */
.login-form-container,
.signup-form-container {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.login-form-container.active,
.signup-form-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease forwards;
}

/* Form group styling */
.form-group {
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-charcoal);
    font-size: 12px;
    transition: var(--transition-normal);
}

.form-group.focused label {
    color: var(--dentist-blue);
}

/* Form controls with interactive effects */
.form-control {
    width: 100%;
    padding: 13px;
    border: 1px solid #eee;
    border-radius: calc(var(--border-radius-md) * 0.8);
    font-size: 13px;
    transition: var(--transition-normal);
    background: #f9f9f9;
    color: var(--text-charcoal);
    position: relative;
    height: 35px;
    box-sizing: border-box;
}

.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-group i.input-icon {
    display: none;
}

/* Password input with toggle */
.password-input {
    position: relative;
}

.password-input .form-control {
    padding-right: 36px;
}

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

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

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

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

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

/* Custom checkbox styling */
.remember-me {
    display: flex;
    align-items: center;
    color: #666;
    cursor: pointer;
    gap: 6px;
    position: relative;
    font-size: 11px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    min-width: 15px;
    background-color: #f1f1f1;
    border-radius: 3px;
    transition: all 0.3s ease;
    border: 1.5px solid #ddd;
    box-sizing: border-box;
    flex-shrink: 0;
}

.remember-me:hover .checkbox-custom {
    background-color: #e9f7fa;
    border-color: var(--dentist-light-blue);
}

.remember-me input:checked ~ .checkbox-custom {
    background-color: var(--dentist-blue);
    border-color: var(--dentist-blue);
}

.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked ~ .checkbox-custom:after {
    display: block;
}

/* Forgot password link */
.forgot-password {
    color: var(--dentist-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
    font-weight: 500;
}

.forgot-password:before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--dentist-orange);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: var(--dentist-orange);
    transform: translateX(3px);
}

.forgot-password:hover:before {
    width: 100%;
}

/* Button styling - matching homepage */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px !important;
    border-radius: 5px;
    font-weight: 600;
    font-size: 11px !important;
    transition: var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    width: 100%;
    margin-top: 8px;
}

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

.btn-primary,
.login-submit {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 147, 176, 0.2) !important;
}

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

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

.btn-orange {
    background: var(--gradient-orange);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 126, 95, 0.3);
}

.btn-orange:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 126, 95, 0.4);
}

.btn-orange:hover i {
    transform: translateX(4px);
}

.login-submit {
    width: 100%;
    margin-top: 8px;
}

/* Terms group */
.terms-group {
    margin-top: 4px;
}

.terms-group .field-error {
    margin-left: 0;
}

/* Terms and policy styling */
.terms-policy {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
}

.terms-text {
    padding-top: 1px;
}

.terms-policy a {
    color: var(--dentist-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.terms-policy a:hover {
    color: var(--dentist-orange);
    text-decoration: underline;
}

/* Custom checkbox for terms */
.terms-policy input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.terms-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1.5px solid #d0d0d0;
    margin-top: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
}

.terms-policy:hover .terms-checkbox {
    background-color: #e9f7fa;
    border-color: var(--dentist-light-blue);
}

.terms-policy input[type="checkbox"]:checked + .terms-checkbox {
    background-color: var(--dentist-blue);
    border-color: var(--dentist-blue);
}

.terms-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 5.5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-policy input[type="checkbox"]:checked + .terms-checkbox::after {
    display: block;
}

.has-error .terms-checkbox {
    border-color: #dc3545;
}

.has-error .terms-policy {
    color: #dc3545;
}

/* Enhanced social login section */
.social-login {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    position: relative;
    margin-top: 20px;
}

.social-login:before {
    content: 'OR';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 12px;
    color: #999;
    font-size: 10px;
}

.social-login p {
    font-size: 11px;
    color: #999;
    margin-bottom: 12px;
}

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

.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.social-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.social-btn:hover:before {
    width: 100%;
    height: 100%;
}

.social-btn.google:hover {
    color: #DB4437;
    border-color: #DB4437;
}

.social-btn.facebook:hover {
    color: #4267B2;
    border-color: #4267B2;
}

.social-btn.apple:hover {
    color: #000;
    border-color: #000;
}

/* Alert styling (top-level form errors) */
.alert {
    padding: 10px 13px;
    margin-bottom: 16px;
    border-radius: calc(var(--border-radius-md) * 0.8);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease forwards;
    line-height: 1.4;
}

.alert i {
    font-size: 14px;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.07);
    color: #c0392b;
    border: 1px solid rgba(220, 53, 69, 0.15);
    border-left: 3px solid #dc3545;
}

/* Inline field errors */
.field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: #c0392b;
    margin-top: 6px;
    padding: 8px 10px;
    line-height: 1.4;
    background-color: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.12);
    border-left: 3px solid #dc3545;
    border-radius: 6px;
    animation: fadeIn 0.3s ease forwards;
}

.field-error::before {
    content: "\f06a";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 11px;
    color: #dc3545;
    flex-shrink: 0;
    margin-top: 1px;
}

.form-group.has-error .form-control {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.03);
}

.form-group.has-error .form-control:focus {
    border-color: #dc3545;
    background: white;
}

.form-group.has-error label {
    color: #dc3545;
}

/* Bottom decorative element */
.dental-bottom-element {
    position: relative;
    padding-top: 20px;
    text-align: center;
}

.dental-svg-bottom {
    width: 100%;
    height: auto;
    display: block;
}

.dental-motivational {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: rgba(33, 147, 176, 0.7);
    font-style: italic;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Pulse Animation for buttons */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 147, 176, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(33, 147, 176, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(33, 147, 176, 0);
    }
}

/* Ripple effect for buttons */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Responsive Adjustments */

/* Tablet and smaller laptops (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .login-container {
        padding: 70px 20px 20px;
    }
    
    .dashboard-card {
        max-width: 380px;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .login-container {
        padding: 60px 15px 15px;
    }
    
    .dashboard-card {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .login-panel-content {
        padding: 20px;
    }
    
    .login-card-title {
        font-size: 16px;
    }
    
    .login-card-subtitle {
        font-size: 11px;
    }
    
    .login-panel-tabs {
        margin-bottom: 20px;
    }
    
    .login-panel-tabs button {
        padding: 11px;
        font-size: 12px;
    }
    
    .login-panel-tabs button i {
        font-size: 12px;
    }
    
    .form-group label {
        font-size: 11px;
    }
    
    .form-control {
        padding: 12px;
        font-size: 12px;
        height: 33px;
    }
    
    .toggle-password {
        right: 10px;
        font-size: 10px;
        width: 24px;
        height: 24px;
    }
}

/* Mobile devices (576px and below) */
@media (max-width: 576px) {
    .login-container {
        padding: 40px 10px 10px;
    }
    
    .dashboard-card {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .login-panel-content {
        padding: 16px;
    }
    
    .login-card-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .login-card-subtitle {
        font-size: 10px;
        margin-bottom: 16px;
    }
    
    .login-panel-tabs {
        margin-bottom: 16px;
        padding: 0;
    }
    
    .login-panel-tabs button {
        padding: 10px 8px;
        font-size: 11px;
        gap: 5px;
    }
    
    .login-panel-tabs button i {
        font-size: 11px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .form-control {
        padding: 11px;
        font-size: 11px;
        height: 32px;
    }
    
    .toggle-password {
        right: 10px;
        font-size: 9px;
        width: 22px;
        height: 22px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
        font-size: 10px;
    }
    
    .remember-me {
        font-size: 10px;
        gap: 5px;
    }
    
    .checkbox-custom {
        width: 13px;
        height: 13px;
        min-width: 13px;
    }
    
    .checkbox-custom:after {
        left: 3px;
        top: 0.5px;
        width: 3.5px;
        height: 7px;
    }
    
    .forgot-password {
        font-size: 10px;
    }
    
    .btn {
        padding: 7px 14px !important;
        font-size: 10px !important;
        margin-top: 6px;
        gap: 5px;
    }
    
    .btn i {
        font-size: 9px;
    }
    
    .social-login {
        padding-top: 16px;
        margin-top: 16px;
    }
    
    .social-login:before {
        font-size: 9px;
        padding: 0 10px;
        top: -7px;
    }
    
    .social-login p {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .social-buttons {
        gap: 10px;
    }
    
    .social-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .alert {
        padding: 8px 11px;
        font-size: 10px;
        margin-bottom: 12px;
    }
    
    .alert i {
        font-size: 12px;
    }
    
    .terms-policy {
        font-size: 10px;
        gap: 6px;
    }
    
    .terms-checkbox {
        width: 16px;
        height: 16px;
        min-width: 16px;
    }

    .terms-checkbox::after {
        left: 4.5px;
        top: 1.5px;
        width: 4px;
        height: 8px;
    }
    
    .field-error {
        font-size: 10px;
        padding: 6px 8px;
        gap: 5px;
    }
    
    .field-error::before {
        font-size: 10px;
    }
    
    .terms-group .field-error {
        margin-left: 0;
    }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
    .login-container {
        padding: 100px 20px 20px;
    }
    
    .dashboard-card {
        max-width: 420px;
    }
}

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

/* Short screens - ensure content fits */
@media (max-height: 700px) {
    .login-container {
        padding: 30px 10px 10px;
    }
    
    .login-panel-content {
        padding: 16px;
    }
    
    .login-card-title {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .login-card-subtitle {
        font-size: 9px;
        margin-bottom: 12px;
    }
    
    .login-panel-tabs {
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        padding: 10px;
        height: 30px;
    }
    
    .btn {
        margin-top: 6px;
        padding: 6px 12px !important;
    }
    
    .social-login {
        padding-top: 12px;
        margin-top: 12px;
    }
}