/* ============================================================
   LOGIN / 2FA — Páginas de autenticación
   ============================================================ */

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* ── CLI Window ─────────────────────────────────────────── */
.cli-window {
    background: #0f172a; /* Dark terminal bg */
    color: #10b981; /* Terminal green */
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 650px;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: 'JetBrains Mono', monospace;
    text-align: left;
}

.cli-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #334155;
    position: relative;
}

.cli-buttons {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 1rem;
}

.cli-btn-mac {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.cli-btn-mac.close { background: #ef4444; }
.cli-btn-mac.minimize { background: #f59e0b; }
.cli-btn-mac.maximize { background: #10b981; }

.cli-title {
    margin: 0 auto;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    user-select: none;
    letter-spacing: 0.5px;
}

.cli-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.cli-line {
    color: #10b981;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
}

.type-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid transparent;
    animation: typing 2.5s steps(40, end), blink-caret 0.75s step-end infinite;
    max-width: max-content;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #10b981 }
}

.cli-input-group {
    display: flex;
    align-items: center;
    margin: 0.2rem 0;
}

.cli-prompt {
    color: #3b82f6;
    margin-right: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Override existing input styles exactly for cli */
.cli-window input[type="text"],
.cli-window input[type="password"] {
    background: transparent !important;
    border: none !important;
    color: #f8fafc !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    text-align: left !important;
    letter-spacing: normal !important;
    border-radius: 0 !important;
}

.cli-window input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-right: 10px solid #10b981;
    animation: blink-caret 1s step-end infinite;
}

.cli-submit-group {
    margin-top: 1.5rem;
}

.cli-submit-btn {
    background: transparent !important;
    border: none !important;
    color: #10b981 !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    padding: 0 !important;
    cursor: pointer !important;
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.2s !important;
    text-align: left !important;
    box-shadow: none !important;
    width: auto !important;
    font-weight: normal !important;
    display: inline !important;
    margin: 0 !important;
}

.cli-submit-btn:hover {
    color: #f8fafc !important;
    transform: none !important;
    text-shadow: 0 0 10px rgba(248, 250, 252, 0.8) !important;
}

.cli-msg {
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
}

.cli-window .msg-error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    border-radius: 0 4px 4px 0;
}

.cli-window .msg-success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    border-radius: 0 4px 4px 0;
}

.cli-link {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}

.cli-link:hover {
    color: #9ca3af;
    text-decoration: underline;
}

.cli-window input:-webkit-autofill,
.cli-window input:-webkit-autofill:hover, 
.cli-window input:-webkit-autofill:focus, 
.cli-window input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: #10b981 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ── 2FA card ───────────────────────────────────────────── */
.card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

/* ── Inputs ─────────────────────────────────────────────── */
input {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    margin: 1.25rem 0;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    text-align: center;
    letter-spacing: 2px;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ── Button ─────────────────────────────────────────────── */
button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* ── Messages ───────────────────────────────────────────── */
.msg-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.msg-success {
    color: var(--accent);
    background: var(--accent-bg);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ── Back link ──────────────────────────────────────────── */
.login-back-link {
    display: block;
    margin-top: 2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
