/*
 * Descripción: Estilos para las páginas de autenticación (Login/Registro).
 */

/* ==========================================================================
   AUTH — Authentication screens only
   Layer 5 of 7 — ITCSS Feature
   ========================================================================== */

/* ==========================================================================
   AUTH LAYOUT
   ========================================================================== */

@keyframes bgRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

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

@keyframes flowIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0);    }
}

#auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100vw;
    background: #050505;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

#auth-container::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 242, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 70% 70%, rgba(255, 204, 0, 0.05) 0%, transparent 40%);
    animation: bgRotate 20s linear infinite;
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 50px 40px;
    text-align: center;
    z-index: 1;
    position: relative;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Auth-specific button sizing */
.auth-card button, .btn-primary-action {
    min-height: 56px;
    padding: 0 32px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card button { width: 100%; }

.auth-card button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.2);
}

/* ==========================================================================
   LOGOS
   ========================================================================== */

.main-logo {
    width: 100%;
    max-width: 440px;
    height: 110px;
    margin: 0 auto 40px;
    color: #1a1a2e;
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 0.35));
}

.main-logo svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.admin-logo {
    width: 240px;
    height: 60px;
    margin: 0;
    color: var(--logo-text);
}

.admin-logo svg {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   TABS
   ========================================================================== */

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 35px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dim);
    border-radius: 10px;
    border: none;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.auth-form-container { display: none; }

.auth-form-container.active {
    display: block;
    animation: flowIn 0.4s ease-out;
}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */

.input-group {
    text-align: left;
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1d1d1f;
    margin-bottom: 12px;
    margin-left: 4px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon span.material-symbols-rounded {
    position: absolute;
    left: 16px;
    color: var(--text-dim);
    font-size: 20px;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #f5f5f7;
    border: 2px solid #e5e5e7;
    border-radius: 14px;
    color: #1d1d1f;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.3s;
    margin-bottom: 0;
}

.input-with-icon input::placeholder { color: #86868b; }

#class-code, #student-alias {
    text-align: center !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    font-weight: 700;
    letter-spacing: 2px;
}

.center-input span.material-symbols-rounded { display: none !important; }

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.input-wrapper { position: relative; width: 100%; }

/* Specificity 0,2,0 — beats .auth-card button (0,1,1) so width/height aren't overridden */
.input-with-icon .btn-icon-inside {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    width: 40px;
    height: 40px;
    min-height: unset;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s;
}

.input-with-icon .btn-icon-inside:hover { color: white; }

.input-hint {
    font-size: 0.8rem;
    color: #515154;
    margin-top: 10px;
    margin-left: 4px;
    font-weight: 500;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 14px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 20px !important;
    transition: color 0.3s;
    user-select: none;
}

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

/* ==========================================================================
   AUTH BUTTONS
   ========================================================================== */

.btn-primary-action {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 10px;
}

.btn-primary-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4);
    filter: brightness(1.1);
}

.btn-primary-action:active { transform: translateY(-1px); }

.btn-text-link {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.3s;
    width: 100%;
}

.btn-text-link:hover { color: var(--primary); }

/* ==========================================================================
   STUDENT LIST (login screen — class chooser)
   ========================================================================== */

.student-card { padding: 16px 20px; }

.student-card h4 {
    font-weight: 600;
    font-size: 1.1rem;
}

.student-card .xp-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 8px;
    font-weight: 600;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
}

.avatar-circle span { font-size: 20px; opacity: 0.5; }

/* ==========================================================================
   CLASS INFO BADGE
   ========================================================================== */

.class-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 113, 227, 0.2);
    margin: 0 auto;
}
