@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

/* ── WRAPPER ─────────────────────────────────── */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

/* ── TARJETA ─────────────────────────────────── */
.login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 400px;
}

/* ── BRANDING ─────────────────────────────────── */
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.login-brand__logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #0097A7, #00BCD4);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.login-brand__text {
    display: flex;
    flex-direction: column;
}

.login-brand__company {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.login-brand__app {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.login-brand__app small {
    font-weight: 400;
    color: #0097A7;
    font-size: 0.78rem;
    margin-left: 4px;
}

/* ── TÍTULOS ─────────────────────────────────── */
.login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

.login-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* ── ALERTA ─────────────────────────────────── */
.login-alert {
    display: none;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.login-alert.is-error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-alert.is-success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── CAMPOS ─────────────────────────────────── */
.login-field {
    margin-bottom: 1rem;
}

.login-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.login-field__input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field__input:focus {
    background: #fff;
    border-color: #0097A7;
    box-shadow: 0 0 0 3px rgba(0,151,167,0.12);
}

.login-field__input::placeholder { color: #94a3b8; }

/* Campo contraseña con botón toggle */
.login-field__wrap {
    position: relative;
}

.login-field__wrap .login-field__input {
    padding-right: 2.75rem;
}

.login-field__toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.login-field__toggle:hover { color: #475569; }

/* ── BOTÓN PRINCIPAL ─────────────────────────── */
.login-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: #0097A7;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover:not(:disabled) { background: #007b8a; }
.login-btn:active:not(:disabled) { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.login-btn__spinner { display: flex; align-items: center; gap: 0.4rem; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.spin { animation: spin 0.8s linear infinite; }

/* ── AYUDA ─────────────────────────────────── */
.login-help {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 1.5rem;
}

/* ── LINK VOLVER ─────────────────────────────── */
.login-back {
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s;
}

.login-back:hover { color: #0097A7; }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 480px) {
    .login-card { padding: 2rem 1.5rem; }
}
