/* ═══════════════════════════════════════════════════════
   Portal Cliente — E.K.K.O. · PrinsTech Studio
   Capa sobre style.css (reusa el sistema liquid glass)
   ═══════════════════════════════════════════════════════ */

/* Warm ambient — E.K.K.O. territory */
.orb-ekko-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.28), transparent 65%);
    top: -200px; right: -140px;
    animation: drift-1 28s ease-in-out infinite alternate;
}
.orb-ekko-2 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(247, 83, 24, 0.18), transparent 65%);
    bottom: -160px; left: -120px;
    animation: drift-2 34s ease-in-out infinite alternate;
}
.orb-ekko-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.1), transparent 65%);
    top: 42%; left: 38%;
    animation: drift-3 40s ease-in-out infinite alternate;
}

/* ── Layout ── */
.portal-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Header ── */
.portal-header {
    height: 66px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.portal-logo {
    font-family: var(--font-title);
    font-size: 1.7rem;
    letter-spacing: 1.5px;
}
.portal-logo .dot { color: var(--arc-orange); }
.portal-divider { color: var(--text-muted); }
.portal-client-name {
    font-family: var(--font-label);
    font-size: 1.05rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--arc-orange);
}
.portal-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.portal-back {
    font-family: var(--font-label);
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.25s;
}
.portal-back:hover { color: var(--text-primary); }

/* ── Body ── */
.portal-body {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    flex: 1;
    align-items: start;
}

/* ── E.K.K.O. section ── */
.ekko-section {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 126px);
    min-height: 540px;
}

.ekko-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--glass-border);
}
.ekko-avatar {
    position: relative;
    width: 54px; height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--arc-orange);
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.4);
    box-shadow: 0 0 24px rgba(251, 146, 60, 0.18);
    flex-shrink: 0;
}
.ekko-status {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: #4ade80;
    border: 2.5px solid #131313;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.7);
}
.ekko-id { flex: 1; }
.ekko-name {
    font-family: var(--font-title);
    font-size: 1.7rem;
    letter-spacing: 2.5px;
    font-weight: 400;
    line-height: 1.05;
}
.ekko-tagline {
    font-family: var(--font-label);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.ekko-voice-btn i { color: var(--arc-orange); }

/* ── Messages ── */
.ekko-messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ekko-msg { max-width: 88%; }
.chat-msg.user.ekko-user {
    background: rgba(251, 146, 60, 0.13);
    border-color: rgba(251, 146, 60, 0.32);
}
.typing-indicator {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    padding: 13px 17px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    border-bottom-left-radius: 5px;
}
.typing-indicator span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--arc-orange);
    opacity: 0.5;
    animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* ── Suggestion chips ── */
.ekko-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 22px 6px;
}
.suggestion-chip {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 15px;
    transition: all 0.25s ease;
}
.suggestion-chip:hover {
    color: var(--text-primary);
    border-color: rgba(251, 146, 60, 0.4);
    background: rgba(251, 146, 60, 0.07);
    transform: translateY(-2px);
}

.ekko-send {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.85), rgba(247, 83, 24, 0.7));
}
.ekko-send:hover { box-shadow: 0 0 18px rgba(251, 146, 60, 0.45); }

/* ── Side panel ── */
.portal-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-list { display: flex; flex-direction: column; gap: 6px; }
.portal-list-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}
.portal-list-item:hover { background: rgba(255, 255, 255, 0.03); }
.portal-list-item > i {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--arc-orange);
    background: rgba(251, 146, 60, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.2);
    flex-shrink: 0;
}
.portal-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.portal-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.portal-item-meta {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.portal-pct {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--arc-orange);
}
.portal-pct.done { color: #4ade80; }
.portal-mini-btn { padding: 8px 11px; }

/* ── Puerta de acceso (login por código) ── */
.portal-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}
.portal-gate .login-card {
    width: min(420px, 100%);
    padding: 40px 36px 30px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    animation: login-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes login-in {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.portal-gate .login-brand { text-align: center; }
.portal-gate .login-form { display: flex; flex-direction: column; gap: 18px; }
.portal-gate .field { display: flex; flex-direction: column; gap: 7px; }
.portal-gate .field-label {
    font-family: var(--font-label);
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.portal-gate .field-input {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 13px;
    padding: 13px 16px;
    transition: all 0.3s ease;
}
.portal-gate .field-input:focus-within {
    border-color: rgba(251, 146, 60, 0.45);
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.07);
}
.portal-gate .field-input i { color: var(--text-muted); font-size: 0.9rem; }
.portal-gate .field-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.95rem;
    text-transform: uppercase;
}
.portal-gate .login-error {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 11px;
    padding: 10px 14px;
}
.portal-gate .login-error.show { display: flex; }
.login-btn.ekko-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 13px;
    border: none;
    background: linear-gradient(135deg, #fb923c, #f75318);
    color: #fff;
    font-family: var(--font-label);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.login-btn.ekko-btn:hover { box-shadow: 0 0 28px rgba(251, 146, 60, 0.4); }
.login-btn.ekko-btn.loading { pointer-events: none; opacity: 0.7; }
.portal-gate .login-foot {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}
.portal-gate .login-hint { font-size: 0.8rem; color: var(--text-muted); }

.portal-soon {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.portal-soon i { color: var(--arc-orange); margin-right: 6px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .portal-body { grid-template-columns: 1fr; }
    .ekko-section { height: 70vh; min-height: 480px; }
    .portal-back span { display: none; }
}
