/**
 * LOGIN SEQUENCE — Step 3: Functional Login
 *
 * Authelia UI hidden but alive (React initializes, session cookies work).
 * Our custom card has real inputs wired to Authelia's API.
 */

/* ==========================================
   BASE — deep space, hide Authelia
   ========================================== */
html, body {
    background: #0a0d14 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Authelia UI: invisible but alive (React still initializes) */
#root {
    position: fixed !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================
   APPROACHING ORB
   ========================================== */
.login-orb {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 235, 204, 0.6) 30%,
        rgba(232, 160, 64, 0.3) 60%,
        transparent 100%
    );
    transform: translate(-50%, -50%) scale(0.02);
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: none;
}

.login-orb.approaching {
    opacity: 1;
}

.login-orb.morphing {
    pointer-events: none;
}

/* ==========================================
   LOGIN CARD — glass morphism
   ========================================== */
.login-card {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 380px;
    min-height: 420px;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    z-index: 11;
    pointer-events: none;

    /* Transparent — no frame */
    background: transparent;
    border: none;
    border-radius: 50%;
    box-shadow: none;

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card.settled {
    border-radius: 20px;
    border: none;
    box-shadow: none;
    pointer-events: auto;
}

/* ==========================================
   CARD CONTENT
   ========================================== */
.login-card-content {
    position: relative;
    opacity: 0;
    width: 100%;
    padding: 40px 36px;
    box-sizing: border-box;
    text-align: center;
}

.login-card-content::before {
    content: "";
    position: absolute;
    top: 42%;
    left: 50%;
    width: 640px;
    height: 640px;
    transform: translate(-50%, -50%);
    background: url('/static/media/logo.png?commons-login-logo=20260526_1408') center / contain no-repeat;
    opacity: 0.104;
    pointer-events: none;
    z-index: -1;
}

.login-card-icon {
    margin-bottom: 18px;
    width: 136px;
    height: 136px;
    margin-left: auto;
    margin-right: auto;
    background: url('/static/media/logo.png?commons-login-logo=20260526_1403') center / contain no-repeat;
}

.login-card-icon > svg,
.login-card-icon > img {
    display: none !important;
}

.login-card-title {
    color: #e8e2d8;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

.login-card-notice {
    color: rgba(232, 226, 216, 0.46);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 auto 30px;
    max-width: 280px;
}

/* ==========================================
   FORM FIELDS (real inputs)
   ========================================== */
.login-card-field {
    margin-bottom: 20px;
    text-align: left;
}

.login-card-field label {
    display: block;
    color: #8a8478;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.login-card-input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(232, 160, 64, 0.10);
    border-radius: 8px;
    padding: 0 14px;
    color: #e8e2d8;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.login-card-input::placeholder {
    color: #5a5650;
}

.login-card-input:focus {
    border-color: rgba(232, 160, 64, 0.30);
}

/* ==========================================
   ERROR MESSAGE
   ========================================== */
.login-card-error {
    color: #e05252;
    font-size: 13px;
    margin-top: -8px;
    margin-bottom: 12px;
    min-height: 20px;
    text-align: center;
}

/* ==========================================
   SIGN IN BUTTON
   ========================================== */
.login-card-btn {
    margin-top: 28px;
    width: 100%;
    height: 46px;
    background: rgba(232, 160, 64, 0.15);
    border: 1px solid rgba(232, 160, 64, 0.25);
    border-radius: 8px;
    color: #e8a040;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.login-card-btn:hover {
    background: rgba(232, 160, 64, 0.22);
    border-color: rgba(232, 160, 64, 0.35);
}

.login-card-btn:active {
    background: rgba(232, 160, 64, 0.30);
}

.login-card-btn.loading {
    opacity: 0.6;
    cursor: wait;
}
