/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:       #2563eb;
    --blue-dark:  #1d4ed8;
    --blue-light: #dbeafe;
    --blue-bg:    #eff6ff;
    --text:       #111827;
    --muted:      #6b7280;
    --border:     #e5e7eb;
    --white:      #ffffff;
    --radius:     16px;
    --shadow:     0 25px 60px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

/* ===== CARD ===== */
.card {
    background: var(--white);
    border-radius: 24px;
    padding: 44px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow);
    animation: slideUp .45s cubic-bezier(.16,1,.3,1) both;
}

/* ===== LOGO ===== */
.logo-area {
    text-align: center;
    margin-bottom: 28px;
}
.logo-icon {
    font-size: 52px;
    line-height: 1;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(37,99,235,.4));
}
.logo-img { max-height: 120px; max-width: 260px; object-fit: contain; }
.logo-area h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.02em;
}

/* ===== HEADLINE ===== */
.headline { text-align: center; margin-bottom: 24px; }
.headline h2 {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.headline h2 .accent { color: var(--blue); }
.headline p { color: var(--muted); margin-top: 8px; font-size: .95rem; }

/* ===== TRUST BADGES ===== */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}
.badge {
    background: var(--blue-bg);
    border: 1px solid var(--blue-light);
    color: #1e40af;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== FORM ===== */
.phone-form { display: flex; flex-direction: column; }

.input-wrap { margin-bottom: 16px; }
.input-wrap label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: .88rem;
}
.input-wrap input {
    width: 100%;
    padding: 17px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-family: inherit;
    letter-spacing: .04em;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
}
.input-wrap input:focus {
    outline: none;
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}
.input-wrap input.error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12); }

/* ===== CTA BUTTON ===== */
.btn-cta {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1.08rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37,99,235,.4);
    transition: transform .18s, box-shadow .18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37,99,235,.5);
}
.btn-cta:active:not(:disabled) { transform: translateY(0); }
.btn-cta:disabled { opacity: .75; cursor: not-allowed; }

.btn-cta .spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}
.btn-cta.loading .btn-label { display: none; }
.btn-cta.loading .spinner   { display: block; }

/* ===== PRIVACY NOTE ===== */
.privacy { text-align: center; color: #9ca3af; font-size: .78rem; margin-top: 12px; }

/* ===== ERROR MESSAGE ===== */
.error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .88rem;
    margin-top: 12px;
    display: none;
}
.error-msg.show { display: block; }

/* ===== ATTENDANTS SECTION ===== */
.attendants-card { animation: slideUp .5s cubic-bezier(.16,1,.3,1) both; }
.attendants-header { text-align: center; margin-bottom: 24px; }
.attendants-header h2 { font-size: 1.35rem; font-weight: 700; color: var(--text); }
.attendants-header p  { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.attendants-list { display: flex; flex-direction: column; gap: 14px; }

.attendant-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color .2s, background .2s, transform .2s;
    cursor: pointer;
}
.attendant-card:hover {
    border-color: var(--blue);
    background: var(--blue-bg);
    transform: translateX(4px);
}
.attendant-card.offline { opacity: .6; pointer-events: none; }

.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-wrap img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.avatar-blank {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e5e7eb;
}
.status-dot {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: #22c55e;
}
.status-dot.off { background: #9ca3af; }

.attendant-info { flex: 1; min-width: 0; }
.attendant-name { font-weight: 700; color: var(--text); font-size: .97rem; }
.attendant-role { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.attendant-status { font-size: .78rem; font-weight: 600; margin-top: 4px; }
.attendant-status.on  { color: #16a34a; }
.attendant-status.off { color: var(--muted); }

/* WhatsApp button mantém verde (cor da marca) */
.wa-btn {
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}
.wa-btn svg { width: 18px; height: 18px; }

.attendants-footer {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
    .card { padding: 32px 24px; border-radius: 20px; }
    .headline h2 { font-size: 1.3rem; }
    .badge { font-size: .78rem; padding: 5px 10px; }
    .input-wrap input { font-size: 1.1rem; padding: 15px 16px; }
    .btn-cta { font-size: 1rem; padding: 16px; }
}
