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

/* ─── RESET & BASE ───────────────────────────────────────────────── */
.portal-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.portal-wrap {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: #f3f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Detalhe decorativo de fundo suave */
.portal-wrap::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(207,1,107,0.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(230,184,0,0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(207,1,107,0.03) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgPulse {
    0%   { transform: translate(0,0) rotate(0deg); }
    100% { transform: translate(2%, 2%) rotate(1deg); }
}

/* ─── CARD ───────────────────────────────────────────────────────── */
.portal-card {
    background: linear-gradient(90deg, #ebe6db 0%, #d5d5d4 100%);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.10),
        0 2px 8px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.55);
    animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── LOGO ───────────────────────────────────────────────────────── */
.portal-logo {
    text-align: center;
    margin-bottom: 20px;
}

.portal-logo-img {
    max-width: 100%;
    width: 260px;
    height: auto;
    display: inline-block;
    border-radius: 8px;
}

/* ─── BRAND ──────────────────────────────────────────────────────── */
.portal-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.brand-eai {
    font-size: 14px;
    font-weight: 400;
    color: rgba(0,0,0,0.45);
    letter-spacing: 0.5px;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.brand-exper {
    font-size: 14px;
    font-weight: 600;
    color: #cf016b;
    background: linear-gradient(135deg, #cf016b, #8b0048);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── TAGLINE ────────────────────────────────────────────────────── */
.portal-tagline {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.portal-tagline p {
    color: rgba(0,0,0,0.55);
    font-size: 13px;
    line-height: 1.5;
}

.portal-tagline p strong {
    color: #cf016b;
    font-weight: 700;
}

/* ─── LOGIN BOX ──────────────────────────────────────────────────── */
.portal-welcome {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.portal-desc {
    font-size: 13px;
    color: rgba(0,0,0,0.50);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ─── CAMPOS ─────────────────────────────────────────────────────── */
.portal-field {
    margin-bottom: 18px;
}

.portal-field label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(0,0,0,0.45);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.portal-field input {
    width: 100%;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 14px 16px;
    color: #1a1a1a;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}

.portal-field input::placeholder {
    color: rgba(0,0,0,0.28);
}

.portal-field input:focus {
    border-color: #cf016b;
    background: rgba(255,255,255,0.90);
    box-shadow: 0 0 0 3px rgba(207,1,107,0.12);
}

.portal-password-wrap {
    position: relative;
}

.portal-password-wrap input {
    padding-right: 48px;
}

.toggle-senha {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.toggle-senha:hover { opacity: 0.75; }

/* ─── ALERTAS ────────────────────────────────────────────────────── */
.portal-alert {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    animation: alertIn 0.3s ease;
}

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.portal-alert-error {
    background: rgba(207,1,107,0.10);
    border: 1px solid rgba(207,1,107,0.30);
    color: #8b0048;
}

.portal-alert-notfound {
    background: rgba(230,184,0,0.12);
    border: 1px solid rgba(230,184,0,0.35);
    color: rgba(0,0,0,0.75);
}

.portal-alert-notfound p { margin-bottom: 6px; }
.portal-alert-notfound p:last-child { margin-bottom: 0; }

/* ─── LINKS ──────────────────────────────────────────────────────── */
.portal-links {
    text-align: center;
    margin-bottom: 20px;
}

.portal-links a {
    color: rgba(207,1,107,0.65);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.portal-links a:hover { color: #cf016b; text-decoration: underline; }

/* ─── BOTÃO ──────────────────────────────────────────────────────── */
.portal-btn {
    width: 100%;
    padding: 16px;
    background: #cf016b;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 6px 20px rgba(207,1,107,0.35);
}

.portal-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.30), transparent);
    transition: left 0.5s ease;
}

.portal-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(230,184,0,0.50); }
.portal-btn:hover::after { left: 100%; }
.portal-btn:active { transform: translateY(0); }
.portal-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ÁREA CARD ──────────────────────────────────────────────────── */
.portal-area-card {
    max-width: 560px;
}

/* ─── SENHA DO MÊS ───────────────────────────────────────────────── */
.portal-senha-mes {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(90deg, rgba(255,222,89,0.22) 0%, rgba(230,184,0,0.15) 100%);
    border: 1px solid rgba(230,184,0,0.40);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 28px;
}

.senha-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

.senha-content { flex: 1; }

.senha-linha {
    color: rgba(0,0,0,0.80);
    font-size: 14px;
    margin-bottom: 4px;
}

.senha-valor {
    color: #cf016b;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.senha-obs {
    color: rgba(0,0,0,0.45);
    font-size: 11px;
    line-height: 1.4;
}

/* ─── SEÇÃO ──────────────────────────────────────────────────────── */
.portal-section-header { margin-bottom: 20px; }

.portal-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #cf016b;
    margin-bottom: 8px;
}

.portal-section-desc {
    font-size: 13px;
    color: rgba(0,0,0,0.55);
    line-height: 1.6;
}

/* ─── AGENTES ────────────────────────────────────────────────────── */
.portal-agents {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.70) 0%, rgba(240,238,234,0.60) 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 16px 18px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 100%;
    background: var(--agent-color, #cf016b);
    border-radius: 3px 0 0 3px;
    transition: width 0.3s ease;
}

.agent-card:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0.90) 0%, rgba(235,230,219,0.85) 100%);
    border-color: rgba(207,1,107,0.20);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

.agent-card:hover::before { width: 4px; }

.agent-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.75);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.07);
}

.agent-info { flex: 1; min-width: 0; }

.agent-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.2px;
}

.agent-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--agent-color, #cf016b);
    margin-bottom: 3px;
}

.agent-desc {
    font-size: 12px;
    color: rgba(0,0,0,0.45);
    line-height: 1.4;
}

.agent-arrow {
    color: rgba(0,0,0,0.22);
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.agent-card:hover .agent-arrow {
    color: var(--agent-color, #cf016b);
    transform: translateX(3px);
}

/* ─── SOCIAL BAR ─────────────────────────────────────────────────── */
.portal-social-bar {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.social-card {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.70) 0%, rgba(240,238,234,0.60) 100%);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.22s ease;
}

.social-card:hover {
    background: rgba(255,255,255,0.88);
    border-color: var(--agent-color, #cf016b);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.social-card .social-icon {
    font-size: 20px;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.75);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.07);
}

.social-card .social-icon-svg {
    background: transparent;
    border: none;
    border-radius: 0;
}

.social-card .agent-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--agent-color, #cf016b);
    margin-bottom: 0;
    white-space: nowrap;
}

/* ─── USER BAR ───────────────────────────────────────────────────── */
.portal-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.user-greeting {
    font-size: 13px;
    color: rgba(0,0,0,0.45);
}

.logout-btn {
    font-size: 12px;
    color: rgba(207,1,107,0.75);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid rgba(207,1,107,0.25);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: #cf016b;
    border-color: rgba(207,1,107,0.55);
    background: rgba(207,1,107,0.07);
}

/* ─── RESPONSIVO ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .portal-card { padding: 36px 24px; border-radius: 20px; }
    .portal-welcome { font-size: 20px; }
    .agent-card { padding: 14px; }
}
