/* =========================================================================
   4. AUTHENTICATION & TERMINAL OVERLAYS
   (FINAL COMPACT SYSTEM DISCIPLINE)
   ========================================================================= */

/* --- AUTH OVERLAY --- */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease forwards;
}

/* --- TERMINAL CONTAINER --- */
.terminal-box {
    width: 100%;
    max-width: 340px;
    background: #050505;
    border: 1px solid var(--accent);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.08);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Subtle scanline */
.terminal-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* --- HEADER --- */
.term-header {
    background: rgba(255, 255, 255, 0.015);
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 34px;
}

.term-title {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-pro {
    background: var(--accent);
    color: #000;
    font-size: 7px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 800;
}

/* --- BODY --- */
.term-body {
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* System message */
.sys-msg {
    color: var(--text-dim);
    font-size: 9px;
    font-family: var(--font-mono);
    border-left: 2px solid var(--accent-dim);
    padding-left: 8px;
    line-height: 1.3;
    margin-bottom: 2px;
}

/* --- INPUT GROUPS --- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
}

.input-group label {
    font-size: 8px;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.7;
}

/* Inputs */
.terminal-box input {
    height: 32px;
    background: #000;
    border: 1px solid var(--border-dim);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 0 10px;
    width: 100%;
}

.terminal-box input:focus {
    border-color: var(--accent);
    background: rgba(0, 255, 157, 0.02);
}

/* --- PRIMARY ACTION BUTTON --- */
.terminal-box button,
.terminal-box .btn-main,
.terminal-box .btn-tech {
    height: 34px;
    width: 100%;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 10px;
    font-family: var(--font-mono);
}

/* SVG icons */
.terminal-box svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* --- FEEDBACK --- */
.feedback {
    min-height: 12px;
    font-size: 9px;
    text-align: center;
    color: var(--error);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* --- FOOTER LINKS --- */
.link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #141414;
}

/* --- PORTFOLIO LIST --- */
.port-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border);
    background: #000;
    padding: 3px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.port-item {
    padding: 6px 8px;
    background: var(--bg-card);
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 2px;
    transition: all 0.15s ease;
}

.port-item:hover {
    border-color: var(--accent);
    background: rgba(0, 255, 157, 0.04);
}

.port-name {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    to { opacity: 1; }
}
