﻿/*=========================================================
    MY JOY SPECIALITY DENTAL CLINIC
    LOGIN PAGE STYLES
=========================================================*/


/*==============================
    OVERRIDE HEADER/FOOTER
    The login page hides them so the full
    screen is owned by the login section.
==============================*/

body:has(.login-section) .main-header,
body:has(.login-section) .site-footer {
    display: none;
}

body:has(.login-section) main {
    padding: 0;
    margin: 0;
}


/*==============================
    LOGIN SECTION
    Full-screen gradient background
==============================*/

.login-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Blue gradient using existing --primary variable values */
    background:
        linear-gradient(
            135deg,
            #0d47a1 0%,
            #1565c0 35%,
            #1e88e5 70%,
            #0d47a1 100%
        );

    /* Subtle dental cross pattern overlay */
    position: relative;
    overflow: hidden;
    padding: 30px 20px;
}

/* Decorative background circles — pure CSS, no images needed */
.login-section::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.login-section::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(245, 124, 0, 0.12);
    pointer-events: none;
}


/*==============================
    LOGIN CONTAINER
    Widened to 560px for a premium SaaS feel
==============================*/

.login-container {
    width: 100%;
    max-width: 560px;
    position: relative;
    z-index: 1;
}


/*==============================
    LOGIN CARD
    Wider padding to fill the extra width well
==============================*/

.login-card {
    background: #ffffff;
    padding: 50px 55px;
    border-radius: 20px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;

    /* Orange accent top border */
    border-top: 5px solid var(--accent, #F57C00);

    animation: cardSlideUp 0.5s ease;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*==============================
    LOGIN LOGO
==============================*/

.login-logo {
    margin-bottom: 20px;
}

.login-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 50%;
    background: #f0f7ff;
    padding: 12px;
    border: 3px solid #e0f0ff;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}


/*==============================
    LOGIN CARD HEADINGS
==============================*/

.login-card h1 {
    color: var(--primary, #1E88E5);
    margin-bottom: 6px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.login-clinic-name {
    font-size: 0.82rem;
    color: var(--accent, #F57C00);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.login-card > p {
    color: var(--gray2, #6B7280);
    font-size: 0.9rem;
    margin-bottom: 30px;
}


/*==============================
    ERROR / SUCCESS MESSAGE
==============================*/

.login-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 22px;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-error::before {
    content: "⚠";
    font-size: 1rem;
    flex-shrink: 0;
}


/*==============================
    FORM GROUPS
==============================*/

.login-card .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #374151;
}


/*==============================
    INPUT WRAPPER WITH ICON
    Wraps <input> with an icon on the left
    Markup: <div class="input-wrapper">
                <span class="input-icon">SVG</span>
                <input ...>
            </div>
==============================*/

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.25s;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary, #1E88E5);
}

.input-wrapper .form-control {
    padding-left: 46px;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.95rem;
    height: 52px;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.input-wrapper .form-control:focus {
    border-color: var(--primary, #1E88E5);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1);
}


/*==============================
    LOGIN BUTTON
==============================*/

.login-card .btn-login-submit {
    width: 100%;
    height: 52px;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--accent, #F57C00),
        #ef6c00
    );
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.35);
}

.login-card .btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 124, 0, 0.45);
    background: linear-gradient(135deg, #fb8c00, #e65100);
}

.login-card .btn-login-submit:active {
    transform: translateY(0);
}


/*==============================
    LOGIN FOOTER NOTE
==============================*/

.login-footer-note {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.6;
}

.login-footer-note a {
    color: var(--primary, #1E88E5);
    text-decoration: none;
}

.login-footer-note a:hover {
    text-decoration: underline;
}


/*==============================
    BACK TO WEBSITE LINK
    Fixed to top-left corner of the viewport.
    Lives outside the flex centering flow so
    the card stays perfectly centered.
==============================*/

.login-back-link {
    position: fixed;
    top: 24px;
    left: 28px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.login-back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}


/*==============================
    ERROR PAGE (unchanged from original)
==============================*/

.error-section {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.error-card {
    background: white;
    padding: 50px;
    max-width: 500px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-card h1 {
    color: var(--primary);
    margin-bottom: 15px;
}

.error-card p {
    margin-bottom: 30px;
}


/*==============================
    RESPONSIVE
==============================*/

@media(max-width: 500px) {

    .login-card {
        padding: 35px 25px;
    }

    .login-card h1 {
        font-size: 1.5rem;
    }

    .error-card {
        padding: 30px 20px;
    }

}
