:root { --bg: #f3f4f6; --card: #ffffff; --text: #1f2937; --muted: #64748b; --blue: #0f172a; --accent: #10b981; --border: #e2e8f0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', sans-serif; height: 100vh; overflow: hidden; }
.hidden { display: none !important; }
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--card); border-left: 4px solid var(--accent); padding: 15px 20px; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border: 1px solid var(--border); animation: slideIn 0.3s ease-out; }
.toast.error { border-left-color: #ef4444; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
dialog:not([open]) { display: none; }
dialog[open] { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 2rem; width: 90%; max-width: 600px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); z-index: 9999; }
dialog::backdrop { background: rgba(0,0,0,0.8); backdrop-filter: blur(2px); }
#reminder-alert-modal[open] { display: flex; align-items: center; justify-content: center; top: 0; left: 0; transform: none; padding: 0; }
.checklist-box { max-height: 150px; overflow-y: auto; border: 1px solid var(--border); padding: 10px; background: #f8fafc; border-radius: 5px; }
.grid-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; padding-bottom: 40px; }
.grid-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; padding-bottom: 40px; }
.app-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 15px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(0,0,0,0.02); height: 100%; }
.app-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: var(--blue); }
.app-card i { font-size: 3rem; color: var(--blue); margin-bottom: 10px; }
.section-title { font-size: 1rem; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-bottom: 15px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.portal-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 15px; transition: all 0.2s ease; position: relative; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); border-color: #cbd5e1; }
.portal-card.invalid-card { border: 1px solid #fecaca; background: #fff1f2; }
.pc-header { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.pc-icon { width: 40px; height: 40px; background: #f1f5f9; color: var(--blue); border-radius: 8px; display: grid; place-items: center; font-size: 1.2rem; overflow: hidden; }
.pc-icon img { width: 100%; height: 100%; object-fit: contain; }
.pc-title { font-size: 1.1rem; font-weight: 700; color: var(--blue); width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-badge { font-size: 0.7rem; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; color: var(--muted); font-weight:bold; }
.pc-badge.valid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pc-badge.invalid { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.pc-badge.informado { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.pc-body { display: flex; flex-direction: column; gap: 12px; }
.data-field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 0.7rem; font-weight: bold; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.data-box { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 12px; font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; color: #334155; transition: 0.2s; }
.data-box:hover { border-color: #cbd5e1; background: #fff; }
.data-box i { color: #94a3b8; margin-right: 8px; width: 16px; text-align: center; }
.data-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Courier New', monospace; font-weight: 600; }
.action-icon { cursor: pointer; color: #64748b; padding: 4px; border-radius: 4px; transition: 0.2s; }
.action-icon:hover { background: #e2e8f0; color: var(--accent); }
.btn-access { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px; background: var(--blue); color: #fff; border: none; border-radius: 6px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: 0.2s; text-decoration: none; }
.btn-access:hover { background: #1e293b; transform: scale(1.01); }
.pc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; font-size: 0.8rem; color: #94a3b8; }
.pc-tools { display: flex; gap: 5px; }
.tool-btn { width: 28px; height: 28px; border-radius: 4px; border: 1px solid transparent; display: grid; place-items: center; color: #94a3b8; cursor: pointer; transition: 0.2s; }
.tool-btn:hover { background: #f1f5f9; color: var(--blue); }
.tool-btn.del:hover { background: #fef2f2; color: #ef4444; }
.tool-btn.warn { color: #f59e0b; } .tool-btn.warn:hover { background: #fffbeb; }
.btn-report-text { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 5px; transition: 0.2s; }
.btn-report-text:hover { background: #fef3c7; }
.invalid-box { background: rgba(255,255,255,0.7); border: 1px solid #fecaca; color: #b91c1c; padding: 10px; border-radius: 6px; font-size: 0.75rem; display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.invalid-box i { font-size: 1.2rem; }
.security-bar { display: flex; gap: 15px; margin-bottom: 30px; padding: 10px 20px; background: #0f172a; border-radius: 8px; border: 1px solid #1e293b; align-items: center; color: #cbd5e1; font-size: 0.8rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); flex-wrap: wrap; font-family: 'Segoe UI', sans-serif; text-transform: none; letter-spacing: normal; }
.sec-item { display: flex; align-items: center; gap: 6px; font-weight: 500; color: #cbd5e1; }
.sec-item i { color: #10b981; }
.sec-badge { background: rgba(16, 185, 129, 0.2); color: #10b981; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; border: 1px solid rgba(16, 185, 129, 0.3); }
.sec-user { margin-left: auto; color: #fff; font-weight: normal; }
@keyframes pulseWifi { 0% { opacity: 0.5; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.5; transform: scale(0.9); } }
.wifi-pulse { color: #22c55e !important; animation: pulseWifi 2s infinite; }
.lgpd-ok { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); border: 1px solid; }
.login-container { display: flex; height: 100vh; align-items: center; justify-content: center; position: relative; background: var(--bg); }
.login-box { background: var(--card); padding: 3rem; border-radius: 12px; border: 1px solid var(--border); width: 100%; max-width: 400px; z-index: 10; box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.brand-logo-img { max-width: 180px; display: block; margin: 0 auto 15px auto; }
.brand-subtitle { color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 30px; text-align: center; }
.input-group { margin-bottom: 15px; width: 100%; }
.input-group label { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 5px; }
.input-group input, .input-dark, select { width: 100%; padding: 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 5px; outline: none; transition: 0.3s; }
.input-group input:focus { border-color: var(--blue); background: #fff; }
.btn-login { width: 100%; padding: 12px; background: var(--blue); color: #fff; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; transition: 0.3s; margin-top: 10px; }
.btn-login:hover { filter: brightness(1.1); }
.login-footer { margin-top: 20px; font-size: 0.75rem; color: var(--muted); text-align: center; }
#boot-overlay, #welcome-overlay { position: fixed; inset: 0; z-index: 10000; background: #0f172a; display: flex; align-items: center; justify-content: center; color: #fff; transition: opacity 0.5s ease; }
.boot-content, .welcome-content { text-align: center; width: 320px; }
.boot-icon { font-size: 3rem; color: #10b981; margin-bottom: 15px; animation: pulse 2s infinite; }
.boot-title { font-weight: bold; letter-spacing: 2px; margin-bottom: 20px; font-family: 'Segoe UI', sans-serif; }
.boot-bar-container { width: 100%; height: 6px; background: #334155; border-radius: 3px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.boot-bar-fill { height: 100%; background: #10b981; width: 0%; transition: width 0.3s ease; box-shadow: 0 0 10px #10b981; }
.boot-log { font-family: 'Courier New', monospace; font-size: 0.85rem; color: #94a3b8; min-height: 1.2em; text-align: center; }
.welcome-icon { font-size: 4rem; color: #10b981; margin-bottom: 20px; }
.welcome-label { font-size: 0.9rem; letter-spacing: 2px; color: #94a3b8; margin-bottom: 10px; }
.welcome-name { font-size: 2rem; font-weight: bold; margin-bottom: 5px; color: #fff; }
.welcome-sub { color: #64748b; font-size: 1rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
.app-layout { display: flex; height: 100vh; }
.sidebar { width: 250px; background: var(--card); padding: 2rem 1.5rem; display: flex; flex-direction: column; border-right: 1px solid var(--border); transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1), padding 0.55s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.55s ease, opacity 0.4s ease; z-index: 100; overflow-y: auto; overflow-x: hidden; position: relative; }
.sidebar.collapsed { width: 0; padding: 0; border-color: transparent; }
.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed nav,
.sidebar.collapsed .nav-label { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease, visibility 0.2s ease; }

/* ── Botão Toggler (dentro da sidebar aberta) ── */
.sidebar-toggler {
    position: absolute; right: -15px; top: 30px;
    width: 32px; height: 32px;
    background: var(--blue); color: #fff;
    border-radius: 50%; display: grid; place-items: center;
    border: 2px solid var(--bg); cursor: pointer; z-index: 200;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 0.75rem;
}
.sidebar-toggler:hover { transform: scale(1.15); box-shadow: 0 4px 16px rgba(15,23,42,0.3); }

/* ── Botão quando sidebar está oculta (pill flutuante) ── */
.sidebar.collapsed .sidebar-toggler {
    position: fixed; left: 0; top: 50%; right: auto;
    transform: translateY(-50%);
    width: 22px; height: 52px;
    border-radius: 0 12px 12px 0;
    border: none;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 2px 4px 20px rgba(15,23,42,0.25);
    font-size: 0.65rem;
    opacity: 0.6;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed .sidebar-toggler:hover {
    opacity: 1; width: 28px;
    box-shadow: 4px 6px 25px rgba(15,23,42,0.4);
}

/* ── Alternância de ícones do toggler ── */
.sidebar-toggler .toggler-close { transition: opacity 0.3s ease; opacity: 1; }
.sidebar-toggler .toggler-open  { position: absolute; transition: opacity 0.3s ease; opacity: 0; }
.sidebar.collapsed .sidebar-toggler .toggler-close { opacity: 0; position: absolute; }
.sidebar.collapsed .sidebar-toggler .toggler-open  { opacity: 1; position: static; }

.main-content { flex: 1; padding: 2rem; overflow-y: auto; background: var(--bg); position: relative; transition: padding 0.3s ease; }
.nav-item { padding: 12px; color: var(--muted); cursor: pointer; border-radius: 5px; margin-bottom: 5px; display: flex; align-items: center; gap: 10px; transition: all 0.2s; white-space: nowrap; position: relative; overflow: hidden; }
.nav-item i { width: 20px; text-align: center; flex-shrink: 0; }
.nav-item span.nav-text { transition: opacity 0.2s; opacity: 1; }

.nav-item:hover, .nav-item.active { background: #f1f5f9; color: var(--blue); font-weight: 600; }
.nav-item.has-submenu { justify-content: space-between; }
.nav-item.has-submenu .nav-left { display: flex; align-items: center; gap: 10px; }
.nav-item.has-submenu .submenu-icon { font-size: 0.8rem; transition: transform 0.3s ease; }
.nav-item.has-submenu.open .submenu-icon { transform: rotate(180deg); }
.nav-submenu { overflow: hidden; max-height: 0; transition: max-height 0.3s ease-out; margin-left: 20px; border-left: 1px solid #e2e8f0; padding-left: 5px; }
.nav-submenu.open { max-height: 500px; transition: max-height 0.5s ease-in; }

.nav-label { font-size: 0.75rem; color: #9ca3af; margin: 20px 0 10px 0; font-weight: bold; letter-spacing: 1px; transition: opacity 0.2s; white-space: nowrap; }

/* Admin Home Cards */
.app-card.admin-card { border: 2px solid #1e293b; background: linear-gradient(145deg, #f8fafc, #f1f5f9); position: relative; overflow: hidden; }
.app-card.admin-card::before { content: 'ADMIN'; position: absolute; top: 10px; right: -25px; background: #e11d48; color: #fff; font-size: 0.6rem; font-weight: bold; padding: 2px 30px; transform: rotate(45deg); letter-spacing: 1px; }
.app-card.admin-card i { color: #1e293b; }
.app-card.admin-card:hover { border-color: #e11d48; box-shadow: 0 10px 20px rgba(225, 29, 72, 0.15); }
.page-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 1.2rem; margin: 0; color: var(--text); font-weight: 700; }
.search-bar { width: 250px !important; padding: 8px !important; }
.btn-new { background: var(--blue); color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: 600; }
.audit-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.audit-table th { text-align: left; padding: 12px; border-bottom: 2px solid #e5e7eb; color: var(--text); }
.audit-table td { padding: 12px; border-bottom: 1px solid #e5e7eb; color: var(--muted); }
.pass-wrapper { position: relative; } .pass-toggle { position: absolute; right: 10px; top: 12px; cursor: pointer; color: var(--muted); }
.mobile-toggle { display: none; position: absolute; top: 15px; left: 15px; z-index: 200; background: var(--card); border: 1px solid var(--border); padding: 10px; }
.badge-active { background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; border: 1px solid #bbf7d0; }
.badge-inactive { background: #fee2e2; color: #ef4444; padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; border: 1px solid #fecaca; }
.btn-act { padding:8px 15px; border-radius:5px; border:1px solid #e2e8f0; background:#fff; color:#475569; font-weight:600; cursor:pointer; transition:0.2s }
.btn-act:hover { background:#f1f5f9; border-color:#cbd5e1; color:#0f172a }
.btn-del { color:#ef4444; border-color:#fecaca } .btn-del:hover { background:#fef2f2; border-color:#f87171; color:#b91c1c }
.warn-btn { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; } .warn-btn:hover { background: #fee2e2; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 10px; max-height: 200px; overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 5px; background: #f8fafc; }
.icon-option { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: 5px; border: 1px solid transparent; color: var(--muted); transition: 0.2s; }
.icon-option:hover { background: #e2e8f0; color: var(--blue); }
.icon-option.selected { background: var(--blue); color: #fff; }
.kpi-box { flex-direction:column; align-items:flex-start; background:#fff; }
.kpi-box span { font-size:1.5rem; font-weight:bold; }
.kpi-box small { color:var(--muted); }
@media (max-width: 768px) { .sidebar { position: absolute; height: 100%; transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .mobile-toggle { display: block; } .main-content { padding: 4rem 1rem 1rem 1rem; } .search-bar { width: 100% !important; order: 3; } .responsive-treat { flex-direction:column !important; } }
.iframe-container { position: absolute; top: 0; left: 250px; right: 0; bottom: 0; background: var(--bg); z-index: 50; }
.iframe-container iframe { width: 100%; height: 100%; border: none; }
@media (max-width: 768px) { .iframe-container { left: 0; } }
.sidebar-logo { width: 120px; display: block; margin: 0 auto 20px auto; }

/* --- PATCH: STARTUP INTRO --- */
#startup-intro { position: fixed; inset: 0; z-index: 999999; background: #0f172a; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: opacity 0.8s ease, visibility 0.8s; }
.startup-content { text-align: center; }
.startup-logo { width: 180px; margin-bottom: 25px; animation: startupPulse 2s infinite; filter: drop-shadow(0 0 10px rgba(16,185,129,0.2)); }
.startup-spinner { width: 40px; height: 40px; border: 3px solid rgba(16,185,129,0.2); border-top-color: #10b981; border-radius: 50%; animation: startupSpin 1s linear infinite; margin: 0 auto 20px auto; }
.startup-text { color: #10b981; font-family: 'Courier New', monospace; font-size: 0.9rem; letter-spacing: 1px; }
@keyframes startupSpin { to { transform: rotate(360deg); } }
@keyframes startupPulse { 0% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 15px rgba(16,185,129,0.5)); } 100% { transform: scale(0.95); opacity: 0.8; } }

/* ═══════════════════════════════════════════
   ASSISTENTE PESSOAL — PAINEL DE NOTIFICAÇÕES
   ═══════════════════════════════════════════ */
.assistente-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
}
.assistente-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #10b981);
    background-size: 300% 100%;
    animation: assistGradient 4s linear infinite;
}
@keyframes assistGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
.assistente-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px 15px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* ═══ ISABEL TECH AVATAR ═══ */
.isabel-3d-wrapper {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    width: 90px; height: 90px;
    border-radius: 12px;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.3s ease;
}
.isabel-3d-wrapper:hover {
    box-shadow: none;
    transform: scale(1.05);
    border-color: transparent;
}
#isabel-tech-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 12px;
}
.isabel-status-dot {
    position: absolute;
    bottom: 3px; right: 3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #ffffff;
    z-index: 5;
    box-shadow: 0 0 6px rgba(59,130,246,0.6);
    animation: statusBlink 3s ease-in-out infinite;
}
@keyframes statusBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.3; }
}

/* Ondas de áudio quando Isabel fala */
.isabel-speak-wave {
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 16px;
    z-index: 10;
}
.isabel-speak-wave span {
    width: 3px;
    background: #10b981;
    border-radius: 2px;
    animation: waveBar 0.8s ease-in-out infinite;
}
.isabel-speak-wave span:nth-child(1) { animation-delay: 0s; height: 6px; }
.isabel-speak-wave span:nth-child(2) { animation-delay: 0.1s; height: 10px; }
.isabel-speak-wave span:nth-child(3) { animation-delay: 0.2s; height: 14px; }
.isabel-speak-wave span:nth-child(4) { animation-delay: 0.1s; height: 10px; }
.isabel-speak-wave span:nth-child(5) { animation-delay: 0s; height: 6px; }
@keyframes waveBar {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

.isabel-nametag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    color: #475569;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 3px;
}
.assistente-greeting { flex: 1; }
.assistente-greeting h3 {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    line-height: 1.3;
}
.assistente-greeting p {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0;
}
.assistente-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    animation: badgeBounce 2s ease infinite;
    flex-shrink: 0;
}
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.assistente-body {
    padding: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 350px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.assistente-body::-webkit-scrollbar { width: 4px; }
.assistente-body::-webkit-scrollbar-track { background: #f1f5f9; }
.assistente-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Bolha de mensagem da Isabel */
.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 92%;
    animation: chatSlideIn 0.35s ease-out both;
}
.chat-row.isabel { align-self: flex-start; }
.chat-row.user { align-self: flex-end; flex-direction: row-reverse; }

@keyframes chatSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mini avatar tech ao lado da bolha — hidden, replaced by floating orb */
.chat-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: transparent;
    display: none;
    flex-shrink: 0;
}

/* ═══ FLOATING ORB — Entidade que vive no chat ═══ */
#isabel-chat-orb {
    position: absolute;
    left: 4px;
    top: 20px;
    width: 28px;
    height: 28px;
    z-index: 20;
    pointer-events: none;
    transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.4s ease;
    filter: drop-shadow(0 0 6px rgba(59,130,246,0.4));
}
.orb-core {
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #93c5fd 0%, #3b82f6 60%, #1d4ed8 100%);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(59,130,246,0.7), 0 0 25px rgba(59,130,246,0.3);
    animation: orbPulse 2s ease-in-out infinite;
}
@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 12px rgba(59,130,246,0.7), 0 0 25px rgba(59,130,246,0.3); }
    50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 18px rgba(59,130,246,0.9), 0 0 35px rgba(59,130,246,0.4); }
}
.orb-ring {
    position: absolute;
    left: 50%; top: 50%;
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.orb-ring-1 {
    width: 20px; height: 20px;
    animation: orbRingSpin 3s linear infinite;
    border-color: rgba(59,130,246,0.25) transparent rgba(59,130,246,0.25) transparent;
}
.orb-ring-2 {
    width: 26px; height: 26px;
    animation: orbRingSpin 5s linear infinite reverse;
    border-color: transparent rgba(96,165,250,0.2) transparent rgba(96,165,250,0.2);
}
@keyframes orbRingSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.orb-trail {
    position: absolute;
    left: 50%; top: 50%;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(59,130,246,0.3);
    transform: translate(-50%, -50%);
    animation: orbTrailFade 1.5s ease-out infinite;
}
@keyframes orbTrailFade {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3); }
}

/* Orb speaking boost */
#isabel-chat-orb.speaking .orb-core {
    animation: orbSpeakPulse 0.4s ease-in-out infinite;
}
@keyframes orbSpeakPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1.1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* Bolha da Isabel */
.chat-bubble {
    padding: 10px 14px;
    border-radius: 12px 12px 12px 4px;
    font-size: 0.82rem;
    line-height: 1.5;
    position: relative;
}
.chat-sender {
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 3px;
    display: block;
}
.chat-sender.isabel-name { color: #3b82f6; }
.chat-sender.user-name { color: #10b981; }
.chat-bubble.isabel-msg {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    color: #334155;
}
.chat-bubble.isabel-msg .chat-emphasis {
    color: #2563eb;
    font-weight: 700;
}
/* Bolha do usuário */
.chat-bubble.user-msg {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    color: #065f46;
    border-radius: 12px 12px 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Quick-reply buttons */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    animation: chatSlideIn 0.4s ease-out both;
    align-self: flex-start;
    padding-left: 32px;
}
.chat-quick-btn {
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    white-space: nowrap;
}
.chat-quick-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59,130,246,0.15);
}
.chat-quick-btn.primary {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #059669;
}
.chat-quick-btn.primary:hover {
    background: #d1fae5;
    border-color: #34d399;
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

/* Typing indicator */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 32px;
    animation: chatSlideIn 0.3s ease-out both;
}
.chat-typing-dots {
    display: flex;
    gap: 3px;
    padding: 10px 14px;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 12px 12px 12px 4px;
}
.chat-typing-dots span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #3b82f6;
    animation: typingBounce 1.2s ease-in-out infinite;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* Divider no chat */
.chat-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px 0;
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.chat-divider-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Estado vazio (tudo ok) */
.assist-empty {
    text-align: center;
    padding: 15px 0;
}
.assist-empty-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: block;
}
.assist-empty-text {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Loading */
.assistente-loading {
    text-align: center;
    padding: 15px 0;
    color: #94a3b8;
    font-size: 0.85rem;
}
.assistente-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}
.assistente-loading-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: dotPulse 1.4s ease-in-out infinite;
}
.assistente-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.assistente-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Separador de notificações */
.assist-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 2px 0;
}
.assist-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}
.assist-divider-label {
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   CALENDÁRIO DE AGENDAMENTO DE VEÍCULOS
   ═══════════════════════════════════════════ */
.v-periodo-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.v-periodo-btn:hover { border-color: var(--blue); color: var(--blue); }
.v-periodo-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.v-calendar-container {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    user-select: none;
}
.v-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.v-cal-header button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--blue);
    transition: 0.2s;
}
.v-cal-header button:hover { background: var(--blue); color: #fff; }
.v-cal-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-transform: capitalize;
}
.v-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.v-cal-dow {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted);
    padding: 4px 0;
    text-transform: uppercase;
}
.v-cal-day {
    text-align: center;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    border: 1px solid transparent;
}
.v-cal-day:hover:not(.disabled):not(.empty) {
    background: #e0f2fe;
    border-color: #3b82f6;
}
.v-cal-day.empty { cursor: default; }
.v-cal-day.today {
    border: 2px solid var(--blue);
    font-weight: 800;
}
.v-cal-day.selected {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue);
}
.v-cal-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
}
.v-cal-day.occupied {
    background: #fee2e2;
    color: #b91c1c;
}
.v-cal-day.partial {
    background: #fef3c7;
    color: #92400e;
}
.v-cal-day.free {
    background: #f0fdf4;
    color: #166534;
}
.v-cal-day.weekend-free:not(.selected):not(.occupied):not(.partial) {
    background: #f1f5f9;
    color: #64748b;
}
.v-cal-day .v-cal-dot {
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    border-radius: 50%;
}
.v-cal-day.occupied .v-cal-dot { background: #ef4444; }
.v-cal-day.partial .v-cal-dot { background: #f59e0b; }
.v-cal-day.free .v-cal-dot { background: #10b981; }

/* =========================================
   MÓDULO PROSPECÇÕES
   ========================================= */
.prosp-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    text-transform: uppercase;
}

.prosp-EM_PROSPECCAO { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.prosp-PROPOSTA_ENVIADA { background: rgba(234, 179, 8, 0.15); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.prosp-EM_ANALISE { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.prosp-APROVADA { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.prosp-RECUSADA { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.prosp-CANCELADA { background: rgba(100, 116, 139, 0.15); color: #64748b; border: 1px solid rgba(100, 116, 139, 0.3); }

.prosp-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.prosp-stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}
.prosp-stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
}

.prosp-pulse-new {
    animation: prospPulse 2s infinite;
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: top;
}

@keyframes prospPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* =========================================
   MÓDULO PROSPECÇÕES - TABS
   ========================================= */
.prosp-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    overflow-x: auto;
}
.prosp-tab {
    padding: 8px 16px;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.prosp-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}
.prosp-tab.active {
    background: var(--primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.prosp-tab-content {
    display: none;
}
.prosp-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.prosp-dias-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}
.prosp-dias-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.prosp-dias-expired {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}
.prosp-aviso-inline {
    display: block;
    font-size: 0.7rem;
    margin-top: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    animation: prospPulse 2s infinite;
}
.prosp-cor-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    vertical-align: middle;
}

/* Comentários - Chat Style */
.prosp-chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.prosp-chat-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}
.prosp-chat-row.sent {
    flex-direction: row-reverse;
}
.prosp-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #fff;
}
.prosp-chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.prosp-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.prosp-chat-sent {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}
.prosp-chat-received {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}
.prosp-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
    gap: 15px;
}
.prosp-chat-sent .prosp-chat-header {
    color: rgba(255,255,255,0.85);
}
.prosp-chat-received .prosp-chat-header {
    color: #94a3b8;
}
.prosp-chat-author {
    font-weight: 600;
}
.prosp-chat-received .prosp-chat-author {
    color: #2563eb;
}
.prosp-chat-status {
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.prosp-chat-sent .prosp-chat-status {
    color: rgba(255,255,255,0.6);
}
.prosp-chat-sent .prosp-chat-status.lido {
    color: #4ade80; /* verde claro para check duplo lido no balão enviado */
}
.prosp-badge-comments {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 5px;
    animation: prospPulse 2s infinite;
}

/* --- User Profile Premium UI --- */
.user-profile-header { display: flex; align-items: center; gap: 15px; }
.avatar-circle { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--accent)); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.profile-card { background: var(--card); padding: 30px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.3s ease; }
.profile-section-title { color: var(--blue); font-size: 1rem; margin: 0 0 15px 0; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.profile-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.profile-readonly input, .profile-readonly select { background-color: #f8fafc; border: 1px dashed #cbd5e1; color: #64748b; pointer-events: none; }
.profile-readonly .pass-toggle { display: none; }
.profile-form-actions { justify-content: flex-end; gap: 15px; align-items: center; }

@media (max-width: 768px) { 
    .profile-form-grid { grid-template-columns: 1fr; } 
    .page-head { flex-direction: column; align-items: flex-start; } 
    .user-profile-header { margin-top: 10px; } 
    .profile-form-actions { justify-content: center; }
}
