/* ═══════════════════════════════════════════════
   CIDADÃO DIGITAL — CSS
   Portal do Cidadão — GaussVision
   ═══════════════════════════════════════════════ */

:root {
    --cd-primary: var(--brand-primary, #1565c0);
    --cd-primary-dark: var(--brand-primary, #0d47a1);
    --cd-accent: var(--brand-secondary, #00e5ff);
    --cd-bg: #f4f6f9;
    --cd-bg-card: #ffffff;
    --cd-text: #2d3748;
    --cd-text-muted: #718096;
    --cd-border: #e2e8f0;
    --cd-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --cd-shadow-hover: 0 12px 32px rgba(0,0,0,0.1);
}

body.dark-theme {
    --cd-primary: var(--brand-primary, #42a5f5);
    --cd-primary-dark: #0a1929;
    --cd-accent: var(--brand-secondary, #00e5ff);
    --cd-bg: #0a0e17;
    --cd-bg-card: #141b29;
    --cd-text: #e0e0e0;
    --cd-text-muted: #a0aec0;
    --cd-border: rgba(255,255,255,0.1);
    --cd-shadow: 0 4px 12px rgba(0,0,0,0.3);
    --cd-shadow-hover: 0 16px 40px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--cd-bg);
    color: var(--cd-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

/* ── Header ── */
.top-bar {
    width: 100%;
    background: var(--cd-primary-dark);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    z-index: 100;
}
.top-left { display: flex; align-items: center; gap: 14px; }
.top-right { display: flex; align-items: center; gap: 16px; }
.top-bar .brasao { height: 40px; border-radius: 4px; }
.top-bar .institution h1 { font-size: 14px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.top-bar .institution .sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.top-bar .gauss-logo { height: 28px; opacity: 0.9; }

.back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    transition: all 0.2s;
}
.back-link:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn-theme {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.btn-theme:hover { background: rgba(255,255,255,0.1); }

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 64px 24px 48px;
    background: linear-gradient(135deg, var(--cd-primary-dark) 0%, var(--cd-primary) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero > * { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
}
.hero-badge i { color: var(--cd-accent); }
.hero h2 {
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero h2 .accent { color: var(--cd-accent); }
.hero p {
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.7;
    opacity: 0.9;
    font-weight: 400;
}

/* ── Container ── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px;
    flex-grow: 1;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--cd-text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i { color: var(--cd-primary); }
.section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--cd-border);
    margin-left: 12px;
}

/* ── Service Cards ── */
.services-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: var(--cd-bg-card);
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--cd-shadow);
    cursor: pointer;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--cd-shadow-hover);
    border-color: var(--cd-primary);
}
.service-card.disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}
.service-icon.orange { background: linear-gradient(135deg, #e65100, #ff9800); }
.service-icon.blue { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.service-icon.green { background: linear-gradient(135deg, #2e7d32, #66bb6a); }
.service-icon.purple { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }
.service-icon.teal { background: linear-gradient(135deg, #00695c, #26a69a); }
.service-icon.red { background: linear-gradient(135deg, #c62828, #ef5350); }

.service-info { flex: 1; }
.service-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--cd-text);
}
.service-info p {
    font-size: 0.85rem;
    color: var(--cd-text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.service-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.service-status.available { color: #2e7d32; }
.service-status.coming { color: #f57c00; }
body.dark-theme .service-status.available { color: #66bb6a; }
body.dark-theme .service-status.coming { color: #ffb74d; }

.service-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--cd-text-muted);
    flex-shrink: 0;
    transition: all 0.2s;
}
.service-card:hover .service-arrow {
    background: var(--cd-primary);
    color: #fff;
}

/* ── ★ CIDADE VIVA — Hero Card Premium ── */
.cidade-viva-hero {
    position: relative;
    display: block;
    padding: 28px 32px;
    border-radius: 18px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    border: 1px solid rgba(0, 229, 255, 0.2);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(0, 229, 255, 0.06);
}
.cidade-viva-hero:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35),
                0 0 60px rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.4);
}

.cv-hero-glow {
    position: absolute;
    top: -60%;
    right: -15%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.4s;
}
.cidade-viva-hero:hover .cv-hero-glow {
    opacity: 1.5;
}

.cv-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
}

.cv-hero-icon-wrap {
    position: relative;
    flex-shrink: 0;
}
.cv-hero-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: linear-gradient(135deg, #00b4d8, #00e5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
    position: relative;
    z-index: 2;
}
.cv-hero-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid rgba(0, 229, 255, 0.35);
    animation: cvPulse 2.5s ease-in-out infinite;
    z-index: 1;
}
@keyframes cvPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.12); opacity: 0; }
}

.cv-hero-text {
    flex: 1;
    min-width: 0;
}
.cv-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00e5ff;
    margin-bottom: 10px;
}
.cv-hero-badge i { font-size: 10px; }

.cv-hero-text h3 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff 0%, #b2ebf2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cv-hero-text p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 14px;
    max-width: 520px;
}

.cv-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cv-hero-tags span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}
.cv-hero-tags span i {
    font-size: 11px;
    color: #00e5ff;
}
.cidade-viva-hero:hover .cv-hero-tags span {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.2);
}

.cv-hero-arrow {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: #00e5ff;
    transition: all 0.3s;
}
.cv-hero-arrow span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cv-hero-arrow i {
    font-size: 18px;
    transition: transform 0.3s;
}
.cidade-viva-hero:hover .cv-hero-arrow {
    background: rgba(0, 229, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.4);
    transform: translateX(3px);
}
.cidade-viva-hero:hover .cv-hero-arrow i {
    transform: translateX(4px);
}

/* Responsivo — Cidade Digital Hero */
@media (max-width: 640px) {
    .cidade-viva-hero { padding: 20px; }
    .cv-hero-content { flex-wrap: wrap; gap: 16px; }
    .cv-hero-icon { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; }
    .cv-hero-pulse { inset: -4px; border-radius: 18px; }
    .cv-hero-text h3 { font-size: 1.2rem; }
    .cv-hero-text p { font-size: 0.82rem; }
    .cv-hero-tags { gap: 6px; }
    .cv-hero-tags span { font-size: 10px; padding: 4px 8px; }
    .cv-hero-arrow { 
        width: 100%; 
        flex-direction: row; 
        justify-content: center;
        padding: 10px;
        border-radius: 10px;
    }
}

/* ── Auth Area ── */
.auth-area { display: flex; align-items: center; }

.btn-auth {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-login {
    background: linear-gradient(135deg, #4285F4, #1a73e8);
    color: #fff;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}
.btn-login:hover {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.5);
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-logout:hover { background: rgba(239,83,80,0.2); color: #ef5350; border-color: #ef5350; }

.btn-reset {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}
.btn-reset:hover { background: rgba(255,152,0,0.2); color: #ff9800; border-color: #ff9800; }

.btn-perfil-alerta {
    background: rgba(255,152,0,0.2);
    color: #ff9800;
    padding: 5px 12px;
    border: 1px solid rgba(255,152,0,0.4);
    font-size: 11px;
    animation: pulseAlert 2s infinite;
}
.btn-perfil-alerta:hover { background: rgba(255,152,0,0.35); }
@keyframes pulseAlert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.btn-minha-conta {
    background: rgba(0,229,255,0.15);
    color: #00e5ff;
    padding: 5px 12px;
    border: 1px solid rgba(0,229,255,0.3);
    font-size: 11px;
    text-decoration: none;
}
.btn-minha-conta:hover {
    background: rgba(0,229,255,0.3);
    border-color: rgba(0,229,255,0.5);
    transform: translateY(-1px);
}
/* ── Login CPF Form ── */
.login-divider {
    text-align: center;
    position: relative;
    margin: 4px 0;
}
.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--cd-border);
}
.login-divider span {
    position: relative;
    background: var(--cd-bg-card);
    padding: 0 14px;
    font-size: 0.78rem;
    color: var(--cd-text-muted);
    font-weight: 500;
}

.login-cpf-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}
.login-cpf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.login-cpf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.login-cpf-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--cd-text);
    display: flex;
    align-items: center;
    gap: 4px;
}
.login-cpf-field label i { color: var(--cd-primary); font-size: 12px; }
.login-cpf-field input {
    padding: 10px 12px;
    border: 1.5px solid var(--cd-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    background: var(--cd-bg);
    color: var(--cd-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-cpf-field input:focus {
    outline: none;
    border-color: var(--cd-primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}
body.dark-theme .login-cpf-field input {
    background: #0a0e17;
    border-color: rgba(255,255,255,0.12);
}
body.dark-theme .login-cpf-field input:focus {
    border-color: var(--cd-accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.cpf-login-btn {
    background: linear-gradient(135deg, var(--cd-primary-dark), var(--cd-primary)) !important;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 700 !important;
}
.cpf-login-btn:hover {
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3) !important;
    transform: translateY(-1px) !important;
}
.cpf-login-btn:disabled { opacity: 0.6; cursor: wait; transform: none !important; }

@media (max-width: 480px) {
    .login-cpf-row { grid-template-columns: 1fr; }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.user-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.user-email {
    color: rgba(255,255,255,0.55);
    font-size: 10px;
    font-weight: 400;
}

/* ── 🔔 Notificações — Sino + Badge + Dropdown ── */
.btn-notif {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}
.btn-notif:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: scale(1.08);
}
.btn-notif.has-notif {
    color: #fff;
    animation: notifPulse 2.5s ease-in-out infinite;
}
@keyframes notifPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,83,80,0); }
    50% { box-shadow: 0 0 0 6px rgba(239,83,80,0.2); }
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(239,68,68,0.5);
    border: 2px solid var(--cd-primary-dark, #0a0e17);
    line-height: 1;
    font-family: 'Inter', system-ui, sans-serif;
}
.notif-badge.visible {
    display: flex;
    animation: badgePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes badgePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Dropdown */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    max-height: 380px;
    background: var(--cd-bg-card, #141b29);
    border: 1px solid var(--cd-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 500;
    animation: notifSlide 0.2s ease;
}
.notif-dropdown.open { display: flex; }
@keyframes notifSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--cd-border, rgba(255,255,255,0.06));
}
.notif-dropdown-header h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--cd-text, #e0e0e0);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.notif-dropdown-header h4 i { color: #42a5f5; font-size: 14px; }
.notif-dropdown-header .notif-count {
    font-size: 10px;
    font-weight: 700;
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    padding: 3px 8px;
    border-radius: 6px;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}
.notif-list::-webkit-scrollbar { width: 3px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(66,165,245,0.1);
    color: #42a5f5;
}
.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-item-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--cd-text, #e0e0e0);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.notif-item-title .notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    flex-shrink: 0;
}
.notif-item-msg {
    font-size: 11px;
    color: var(--cd-text-muted, #8c99a8);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-time {
    font-size: 9px;
    color: var(--cd-text-muted, #8c99a8);
    margin-top: 3px;
    opacity: 0.7;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--cd-text-muted, #8c99a8);
}
.notif-empty i { font-size: 28px; opacity: 0.3; display: block; margin-bottom: 8px; }
.notif-empty span { font-size: 12px; font-weight: 600; }

/* ── Date grouping separators ── */
.notif-date-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 4px;
    margin-top: 2px;
}
.notif-date-group:first-child { margin-top: 0; }
.notif-date-group span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cd-text-muted, #8c99a8);
    white-space: nowrap;
}
.notif-date-group::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cd-border, rgba(255,255,255,0.06));
}
.notif-date-group.today span { color: #42a5f5; }
.notif-date-group.yesterday span { color: #f59e0b; }

/* ── Read vs Unread ── */
.notif-item.read {
    opacity: 0.5;
    transition: opacity 0.2s;
}
.notif-item.read:hover { opacity: 0.8; }
.notif-item.read .notif-item-title { font-weight: 500; }
.notif-item.read .notif-item-icon {
    background: rgba(255,255,255,0.04);
    color: var(--cd-text-muted, #8c99a8);
}

.notif-read-separator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 4px;
    margin-top: 4px;
}
.notif-read-separator span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #66bb6a;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.notif-read-separator span i { font-size: 10px; }
.notif-read-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(102,187,106,0.15);
}

.notif-count-inline {
    font-size: 9px;
    font-weight: 800;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: auto;
    line-height: 1.2;
}

.notif-dropdown-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--cd-border, rgba(255,255,255,0.06));
    text-align: center;
}
.notif-dropdown-footer a {
    font-size: 11px;
    font-weight: 700;
    color: #42a5f5;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
}
.notif-dropdown-footer a:hover { background: rgba(66,165,245,0.08); }

/* Responsivo — Mobile */
@media (max-width: 640px) {
    .notif-dropdown {
        position: fixed;
        top: 56px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 60vh;
        border-radius: 12px;
    }
}

/* ── Login Modal ── */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.login-modal {
    background: var(--cd-bg-card);
    border: 1px solid var(--cd-border);
    border-radius: 20px;
    width: 400px;
    max-width: 92vw;
    padding: 24px 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--cd-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}
.login-modal-close:hover { background: var(--cd-border); color: var(--cd-text); }

.login-modal-header {
    text-align: center;
    margin-bottom: 14px;
}
.login-modal-header .login-brasao {
    width: 52px;
    height: auto;
    margin: 0 auto 6px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.login-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--cd-text);
    margin-bottom: 4px;
}
.login-modal-header p {
    font-size: 0.78rem;
    color: var(--cd-text-muted);
    line-height: 1.4;
}

.login-modal-providers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.login-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid var(--cd-border);
}

.login-provider.google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}
.login-provider.google:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
body.dark-theme .login-provider.google {
    background: #1a1a2e;
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .login-provider.google:hover {
    background: #252540;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.login-provider.microsoft {
    background: var(--cd-bg);
    color: var(--cd-text-muted);
}
.login-provider.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}
.login-soon {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f57c00;
    margin-left: 6px;
}

.login-modal-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--cd-border);
}
.login-modal-footer p {
    font-size: 11px;
    color: var(--cd-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.login-modal-footer i { color: #2e7d32; font-size: 12px; }
.link-cadastro {
    color: var(--cd-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}
.link-cadastro:hover { color: var(--cd-accent); text-decoration: underline; }

.login-cpf-field input[type="password"],
.perfil-modal-right input[type="password"] {
    padding: 10px 12px;
    border: 1.5px solid var(--cd-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--cd-bg);
    color: var(--cd-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.login-cpf-field input[type="password"]:focus,
.perfil-modal-right input[type="password"]:focus {
    outline: none;
    border-color: var(--cd-primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}
body.dark-theme .login-cpf-field input[type="password"],
body.dark-theme .perfil-modal-right input[type="password"] {
    background: #0a0e17;
    border-color: rgba(255,255,255,0.12);
}
body.dark-theme .login-cpf-field input[type="password"]:focus,
body.dark-theme .perfil-modal-right input[type="password"]:focus {
    border-color: var(--cd-accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

/* ── Footer ── */
.site-footer {
    background: var(--cd-primary-dark);
    color: rgba(255,255,255,0.6);
    padding: 24px;
    text-align: center;
    font-size: 12px;
    margin-top: auto;
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer strong { color: rgba(255,255,255,0.9); }
.footer-content p { margin: 4px 0; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero h2 { font-size: 1.8rem; }
    .hero { padding: 48px 16px 36px; }
    .service-card { padding: 16px; gap: 14px; }
    .service-icon { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; }
    .top-bar { flex-direction: column; gap: 10px; padding: 12px 16px; }
    .top-right { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .back-link { font-size: 12px; padding: 5px 10px; }
    .user-details { display: none; }
    .login-modal { padding: 24px 20px; }
}

/* ── Modal Completar Perfil (Horizontal) ── */
.perfil-modal-box {
    background: var(--cd-bg-card);
    border: 1px solid var(--cd-border);
    border-radius: 20px;
    width: 720px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}

.perfil-modal-left {
    width: 220px;
    min-width: 220px;
    background: linear-gradient(160deg, var(--cd-primary-dark) 0%, var(--cd-primary) 100%);
    border-radius: 20px 0 0 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}
.perfil-modal-left i {
    font-size: 36px;
    color: var(--cd-accent);
    margin-bottom: 16px;
}
.perfil-modal-left h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}
.perfil-modal-left p {
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.8;
}

.perfil-modal-right {
    flex: 1;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.perfil-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.perfil-modal-right .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.perfil-modal-right .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-text);
    display: flex;
    align-items: center;
    gap: 5px;
}
.perfil-modal-right .form-group label i {
    color: var(--cd-primary);
    font-size: 13px;
}
.perfil-modal-right .form-group .required {
    color: #ef5350;
    font-weight: 700;
}

.perfil-modal-right input[type="text"],
.perfil-modal-right input[type="tel"],
.perfil-modal-right input[type="email"] {
    padding: 10px 12px;
    border: 1.5px solid var(--cd-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--cd-bg);
    color: var(--cd-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
    width: 100%;
}
.perfil-modal-right input[type="text"]:focus,
.perfil-modal-right input[type="tel"]:focus,
.perfil-modal-right input[type="email"]:focus {
    outline: none;
    border-color: var(--cd-primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

.wpp-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.wpp-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #25D366;
}
.wpp-toggle label {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: var(--cd-text-muted) !important;
    cursor: pointer;
}

.field-feedback {
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 16px;
    transition: color 0.2s;
}
.field-feedback.ok { color: #2e7d32; }
.field-feedback.erro { color: #c62828; }
body.dark-theme .field-feedback.ok { color: #66bb6a; }
body.dark-theme .field-feedback.erro { color: #ef5350; }

.lgpd-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--cd-bg);
    border-radius: 8px;
    border: 1px solid var(--cd-border);
}
.lgpd-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--cd-primary);
    flex-shrink: 0;
}
.lgpd-inline label {
    font-size: 0.75rem;
    color: var(--cd-text-muted);
    line-height: 1.4;
    cursor: pointer;
}

.perfil-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-salvar-perfil {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}
.btn-salvar-perfil:hover {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}
.btn-salvar-perfil:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.perfil-msg {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 18px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s;
}
.perfil-msg.ok { color: #2e7d32; background: rgba(46, 125, 50, 0.08); }
.perfil-msg.erro { color: #c62828; background: rgba(198, 40, 40, 0.08); }
body.dark-theme .perfil-msg.ok { color: #66bb6a; background: rgba(102, 187, 106, 0.1); }
body.dark-theme .perfil-msg.erro { color: #ef5350; background: rgba(239, 83, 80, 0.1); }

/* ── Dark theme overrides ── */
body.dark-theme .perfil-modal-right input[type="text"],
body.dark-theme .perfil-modal-right input[type="tel"],
body.dark-theme .perfil-modal-right input[type="email"] {
    background: #0a0e17;
    border-color: rgba(255,255,255,0.12);
}
body.dark-theme .perfil-modal-right input[type="text"]:focus,
body.dark-theme .perfil-modal-right input[type="tel"]:focus,
body.dark-theme .perfil-modal-right input[type="email"]:focus {
    border-color: var(--cd-accent);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
body.dark-theme .lgpd-inline {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
}

/* ── Responsive: mobile stacks vertically ── */
/* ── Disputa CPF Section ── */
.disputa-cpf-box {
    padding: 20px 28px;
    border-top: 2px solid rgba(255,152,0,0.3);
    animation: slideUp 0.3s ease;
}
.disputa-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(255,152,0,0.1);
    border-radius: 10px;
    border: 1px solid rgba(255,152,0,0.2);
}
.disputa-header > i {
    font-size: 22px;
    color: #ff9800;
    margin-top: 2px;
}
.disputa-header strong {
    display: block;
    color: #e65100;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
body.dark-theme .disputa-header strong { color: #ff9800; }
.disputa-header p {
    font-size: 0.78rem;
    color: var(--cd-text-muted);
    margin: 0;
}
.disputa-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.disputa-form .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
}
.disputa-form input[type="email"],
.disputa-form input[type="tel"] {
    padding: 10px 12px;
    border: 1.5px solid var(--cd-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--cd-bg);
    color: var(--cd-text);
    width: 100%;
}
.disputa-form input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255,152,0,0.15);
}
.file-input {
    padding: 10px;
    border: 1.5px dashed var(--cd-border);
    border-radius: 10px;
    background: var(--cd-bg);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--cd-text);
}
.file-input::file-selector-button {
    padding: 6px 14px;
    border: 1px solid var(--cd-border);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--cd-primary-dark), var(--cd-primary));
    color: #fff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s;
}
.file-input::file-selector-button:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}
body.dark-theme .file-input {
    background: #0a0e17;
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
}
body.dark-theme .file-input::file-selector-button {
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .disputa-form input[type="email"],
body.dark-theme .disputa-form input[type="tel"] {
    background: #0a0e17;
    border-color: rgba(255,255,255,0.12);
}

@media (max-width: 700px) {
    .perfil-modal-box {
        flex-direction: column;
        width: 95vw;
    }
    .perfil-modal-left {
        width: 100%;
        min-width: unset;
        border-radius: 20px 20px 0 0;
        padding: 20px 24px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }
    .perfil-modal-left i { font-size: 28px; margin-bottom: 0; }
    .perfil-modal-left h3 { font-size: 1rem; margin-bottom: 2px; }
    .perfil-modal-left p { display: none; }
    .perfil-row {
        grid-template-columns: 1fr;
    }
    .perfil-modal-right {
        padding: 20px;
    }
}

/* ══════════════════════════════════════════════
   VALIDAÇÃO DE DOCUMENTO (KYC)
   ══════════════════════════════════════════════ */
.doc-validacao-card {
    max-width: 800px;
    margin: 12px auto 24px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.4s ease;
}

.doc-val-inner {
    background: var(--cd-bg-card);
    border: 1.5px solid var(--cd-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
}

#docValPendente, #docValVerificado {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
}

.doc-val-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.doc-val-icon.pending {
    background: linear-gradient(135deg, #ff6f00, #ffa000);
    color: #fff;
    animation: pulseGlow 2s ease infinite;
}
.doc-val-icon.verified {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,111,0,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255,111,0,0); }
}

.doc-val-content {
    flex: 1;
}
.doc-val-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--cd-text);
}
.doc-val-content p {
    font-size: 0.82rem;
    color: var(--cd-text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.verified-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    margin-left: 8px;
    vertical-align: middle;
}

.doc-val-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.doc-val-upload-area small {
    font-size: 0.72rem;
    color: var(--cd-text-muted);
}

.btn-upload-doc {
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1565c0, #42a5f5);
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(21,101,192,0.3);
}
.btn-upload-doc:hover {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(21,101,192,0.4);
}
.btn-upload-doc i { font-size: 1.1em; }

/* Progress bar */
.doc-upload-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}
.doc-progress-bar {
    height: 4px;
    background: var(--cd-border);
    border-radius: 4px;
    overflow: hidden;
}
.doc-progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #1565c0, #42a5f5, #1565c0);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: progressSlide 1.5s ease infinite;
}
@keyframes progressSlide {
    0% { width: 10%; background-position: 100% 0; }
    50% { width: 70%; background-position: 0% 0; }
    100% { width: 10%; background-position: 100% 0; }
}
.doc-progress-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-progress-text i { animation: pulse 1s ease infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Result states */
.doc-upload-result {}
.doc-result-success,
.doc-result-info,
.doc-result-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    animation: slideUp 0.3s ease;
}
.doc-result-success {
    background: rgba(46,125,50,0.08);
    border: 1px solid rgba(46,125,50,0.2);
}
.doc-result-success > i {
    color: #2e7d32;
    font-size: 1.4rem;
    margin-top: 2px;
}
.doc-result-success strong { color: #2e7d32; }
.doc-result-success p {
    font-size: 0.82rem;
    color: var(--cd-text-muted);
    margin: 2px 0;
    line-height: 1.5;
}
.doc-confianca {
    font-size: 0.75rem !important;
    font-weight: 600;
    color: var(--cd-text-muted) !important;
    opacity: 0.7;
}

.doc-result-info {
    background: rgba(255,152,0,0.08);
    border: 1px solid rgba(255,152,0,0.2);
}
.doc-result-info strong { color: #e65100; display: block; margin-bottom: 2px; }
.doc-result-info p { font-size: 0.82rem; color: var(--cd-text-muted); margin: 2px 0; }

.doc-result-error {
    background: rgba(198,40,40,0.08);
    border: 1px solid rgba(198,40,40,0.2);
}
.doc-result-error > i { color: #c62828; font-size: 1.3rem; }
.doc-result-error strong { color: #c62828; display: block; }
.doc-result-error p { font-size: 0.82rem; color: var(--cd-text-muted); margin: 2px 0; }

/* Dark theme overrides */
body.dark-theme .doc-val-inner {
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
body.dark-theme .verified-badge {
    background: linear-gradient(135deg, #43a047, #66bb6a);
}
body.dark-theme .doc-result-success {
    background: rgba(102,187,106,0.08);
    border-color: rgba(102,187,106,0.15);
}
body.dark-theme .doc-result-success > i,
body.dark-theme .doc-result-success strong { color: #66bb6a; }
body.dark-theme .doc-result-info {
    background: rgba(255,183,77,0.08);
    border-color: rgba(255,183,77,0.15);
}
body.dark-theme .doc-result-info strong { color: #ffb74d; }
body.dark-theme .doc-result-error {
    background: rgba(239,83,80,0.08);
    border-color: rgba(239,83,80,0.15);
}
body.dark-theme .doc-result-error > i,
body.dark-theme .doc-result-error strong { color: #ef5350; }

@media (max-width: 640px) {
    .doc-validacao-card { padding: 0 12px; margin-bottom: 16px; }
    #docValPendente, #docValVerificado { flex-direction: column; gap: 12px; padding: 16px; }
    .doc-val-icon { width: 44px; height: 44px; font-size: 20px; }
}
