/* ============================================================
   SIVET - Login CSS
   Diseño oscuro premium para autenticación
   ============================================================ */

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: #070d1b;
    overflow: hidden;
}

/* Panel Izquierdo - Branding */
.auth-branding {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    background: linear-gradient(
        135deg,
        #0f172a 0%,
        #1e3a8a 40%,
        #1d4ed8 70%,
        #2563eb 100%
    );
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 60% 40%, rgba(59,130,246,.3) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(30,64,175,.4) 0%, transparent 40%);
    animation: slowRotate 30s linear infinite;
}

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

.auth-branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 480px;
}

.auth-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(59,130,246,.5));
    animation: logoPulse 4s ease infinite;
}

@keyframes logoPulse {
    0%,100% { filter: drop-shadow(0 0 30px rgba(59,130,246,.5)); transform: scale(1); }
    50%      { filter: drop-shadow(0 0 50px rgba(59,130,246,.8)); transform: scale(1.03); }
}

.auth-branding h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: #fff;
    letter-spacing: -.04em;
    margin-bottom: .5rem;
}

.auth-branding h1 span {
    background: linear-gradient(90deg, #60a5fa, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-clinic-name {
    font-size: 1rem;
    color: rgba(255,255,255,.6);
    font-weight: 500;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: .85rem 1.25rem;
    backdrop-filter: blur(8px);
    animation: fadeInLeft .5s ease both;
}

.auth-feature:nth-child(2) { animation-delay: .1s; }
.auth-feature:nth-child(3) { animation-delay: .2s; }

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

.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59,130,246,.25);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-feature-text { color: rgba(255,255,255,.8); font-size: .875rem; font-weight: 500; }

/* Decorative circles */
.auth-deco {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.06);
    pointer-events: none;
}

/* Panel Derecho - Formulario */
.auth-form-panel {
    width: 480px;
    min-height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    box-shadow: -20px 0 60px rgba(0,0,0,.3);
    overflow-y: auto;
}

[data-theme="dark"] .auth-form-panel {
    background: #111827;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: .35rem;
}

.auth-form-header p {
    color: var(--text-muted);
    font-size: .9rem;
    margin: 0;
}

.auth-form { display: flex; flex-direction: column; gap: 0; }

/* Tabs de tipo de cuenta */
.auth-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: .3rem;
    margin-bottom: 1.75rem;
}

.auth-tab {
    flex: 1;
    padding: .65rem;
    text-align: center;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: none;
    background: none;
    font-family: inherit;
}

.auth-tab.active {
    background: var(--bg-secondary);
    color: var(--blue-600);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .auth-tab.active {
    background: var(--bg-tertiary);
}

/* Login Form */
.login-form { display: flex; flex-direction: column; gap: 1rem; }

.auth-submit {
    margin-top: .5rem;
    width: 100%;
    padding: .95rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 6px 20px rgba(37,99,235,.4);
    letter-spacing: .02em;
}

.auth-submit:hover {
    background: linear-gradient(135deg, var(--blue-700), var(--blue-800));
    box-shadow: 0 8px 28px rgba(37,99,235,.55);
    transform: translateY(-1px);
}

.auth-submit:active { transform: translateY(0); }

.auth-submit.loading {
    pointer-events: none;
    opacity: .85;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    font-size: .8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.auth-footer-text {
    text-align: center;
    font-size: .875rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.auth-footer-text a { font-weight: 600; }

.auth-back-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    margin-top: 1.25rem;
    justify-content: center;
    transition: var(--transition);
}

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

/* Role Info Box */
.role-info-box {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    margin-bottom: .5rem;
}

.role-info-box i { color: var(--blue-500); margin-top: .1rem; flex-shrink: 0; }

/* Lockout Warning */
.lockout-warning {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: var(--radius-md);
    padding: .85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .85rem;
    color: var(--red-600);
    margin-bottom: 1rem;
    animation: fadeInDown .3s ease;
}

.lockout-warning i { flex-shrink: 0; margin-top: .1rem; }

/* Responsive */
@media (max-width: 900px) {
    .auth-branding { display: none; }
    .auth-form-panel { width: 100%; box-shadow: none; }
}

@media (max-width: 480px) {
    .auth-form-panel { padding: 2rem 1.5rem; }
    .auth-form-header h2 { font-size: 1.5rem; }
}
