/* === ROUTE CONTRACT === */
/* Route: /login */
/* Owner: auth */
/* CSS: modules/auth/login.css */
/* === CONTEXT.TXT §22 - Co-located route CSS === */

@layer route {

/* Dark base so behind the canvas is never white */
html:has(#auth-login-page) {
    background: hsla(var(--primary-hs), 12%, 1);
}

/* Make body transparent so the fixed canvas shows through */
body:has(#auth-login-page) {
    background: transparent;
}

#auth-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 60px;
    background: transparent;
}

/* Two-panel wrapper becomes invisible — canvas IS the bg */
#auth-login-page .login-wrapper {
    display: flex;
    flex-direction: column;
    width: 400px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Visual panel hidden — canvas is the background now */
#auth-login-page .visual-panel {
    display: none;
}

#auth-login-page #canvas-holder {
    display: none;
}

/* Glass card — the form panel */
#auth-login-page .form-panel {
    width: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

#auth-login-page .login-card {
    width: 100%;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#auth-login-page .login-card.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide the whole glass panel when the card is toggled off */
#auth-login-page .form-panel:has(.login-card.hidden) {
    display: none;
}


/* Header */
#auth-login-page .login-header {
    text-align: center;
    margin-bottom: 28px;
}

#auth-login-page .login-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 12px;
}

#auth-login-page .login-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

#auth-login-page .login-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* Form fields */
#auth-login-page .form-group {
    margin-bottom: 18px;
}

#auth-login-page .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

#auth-login-page .form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#auth-login-page .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

#auth-login-page .form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.22);
}

/* Sign in button */
#auth-login-page .btn-login {
    width: 100%;
    height: 46px;
    background: hsla(var(--secondary-hs), 53%, 1);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#auth-login-page .btn-login:hover {
    background: hsla(var(--secondary-hs), 45%, 1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#auth-login-page .btn-login:active {
    transform: translateY(0);
}

/* Back link */
#auth-login-page .back-to-home {
    text-align: left;
    margin-top: 16px;
}

#auth-login-page .back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

#auth-login-page .back-to-home a:hover {
    color: #ffffff;
}

/* Toggle button */
#auth-login-page .login-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    z-index: 10;
}

#auth-login-page .login-toggle-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
}

#auth-login-page .login-hide-icon {
    display: none;
}

/* Footer */
#auth-login-page .login-footer {
    margin-top: 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 16px;
}

#auth-login-page .login-footer-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 10px 0;
}

#auth-login-page .role-badges {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

#auth-login-page .role-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 20px;
    font-family: sans-serif;
    pointer-events: none;
}

#loading-text {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

}


/* === EOF_ROUTE_ANCHOR === */
