:root {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --secondary: #1e293b;
    --secondary-light: #334155;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --header-height: 65px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: var(--text-dark); min-height: 100vh; }

/* LOGIN - Design Premium Enterprise */
.login-screen { display: flex; min-height: 100vh; background: #080d1a; position: relative; overflow: hidden; }

/* Aurora Background */
.login-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; animation: aurora-float 20s ease-in-out infinite; }
.aurora-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(20,184,166,0.4) 0%, transparent 70%); top: -200px; left: -100px; animation-delay: 0s; }
.aurora-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(14,165,233,0.3) 0%, transparent 70%); top: 50%; right: -150px; animation-delay: -5s; animation-duration: 25s; }
.aurora-orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(6,182,212,0.25) 0%, transparent 70%); bottom: -100px; left: 30%; animation-delay: -10s; animation-duration: 22s; }
.aurora-orb-4 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%); top: 20%; left: 50%; animation-delay: -15s; animation-duration: 28s; }
@keyframes aurora-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(40px, 20px) scale(1.05); }
}

/* Grid de fundo */
.login-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(20,184,166,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(20,184,166,0.03) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; z-index: 0; mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%); }

/* Canvas de partículas */
.login-particles-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

.login-left { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 50px; position: relative; z-index: 2; }
.login-brand { text-align: center; margin-bottom: 50px; }
.heart-container { position: relative; margin-bottom: 20px; display: flex; flex-direction: column; align-items: center; }
.heart-glow { position: absolute; width: 120px; height: 120px; background: radial-gradient(circle, rgba(20,184,166,0.4) 0%, transparent 70%); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -60%); animation: heart-glow-pulse 2s ease-in-out infinite; z-index: -1; }
@keyframes heart-glow-pulse {
    0%, 100% { transform: translate(-50%, -60%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -60%) scale(1.3); opacity: 0.7; }
}
.heart-svg { width: 90px; height: 80px; filter: drop-shadow(0 0 25px rgba(20,184,166,0.6)); overflow: visible; }
.heart-svg-sm { width: 45px; height: 40px; filter: drop-shadow(0 0 12px rgba(20,184,166,0.5)); }
.heart-path { fill: url(#heartGrad); animation: heartbeat-real 1.8s ease-in-out infinite; transform-origin: center center; }
.heart-container svg { overflow: visible; }
@keyframes heartbeat-real {
    0% { transform: scale(1); }
    5% { transform: scale(1.15); }
    10% { transform: scale(1); }
    15% { transform: scale(1.1); }
    20% { transform: scale(1); }
    100% { transform: scale(1); }
}
.ecg-line { width: 260px; height: 35px; margin-top: 12px; }
.ecg-path { fill: none; stroke: url(#heartGrad); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: ecg-draw 3s linear infinite; filter: drop-shadow(0 0 6px rgba(20,184,166,0.5)); }
@keyframes ecg-draw { 0% { stroke-dashoffset: 600; } 100% { stroke-dashoffset: 0; } }

.login-title { font-size: 3.5rem; font-weight: 800; background: linear-gradient(135deg, #ffffff 0%, #14b8a6 50%, #0ea5e9 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-align: center; margin-bottom: 8px; letter-spacing: 4px; }
.login-tagline { font-size: 1.1rem; color: rgba(255,255,255,0.7); text-align: center; font-weight: 300; }
.login-slogan { font-size: 0.9rem; color: rgba(20,184,166,0.7); text-align: center; margin-top: 12px; font-weight: 400; letter-spacing: 0.5px; font-style: italic; }

.login-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 520px; width: 100%; margin-bottom: 40px; }
.feature-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; backdrop-filter: blur(12px); animation: fadeInUp 0.8s ease-out both; animation-delay: var(--delay); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.feature-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(20,184,166,0.1) 0%, transparent 50%); opacity: 0; transition: opacity 0.4s; border-radius: 16px; }
.feature-card:hover { background: rgba(20,184,166,0.08); border-color: rgba(20,184,166,0.3); transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 40px rgba(20,184,166,0.15); }
.feature-card:hover::before { opacity: 1; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
.feature-icon { width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary), #06b6d4, #0ea5e9); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1rem; flex-shrink: 0; box-shadow: 0 4px 15px rgba(20,184,166,0.3); }
.feature-text h4 { font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.95); margin-bottom: 3px; }
.feature-text p { font-size: 0.75rem; color: rgba(255,255,255,0.45); }

.login-stats { display: flex; gap: 30px; }
.login-stat { text-align: center; min-width: 80px; }
.login-stat .stat-number { display: block; font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), #0ea5e9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.login-stat .stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; display: block; }
.stat-bar { display: block; width: 100%; height: 3px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.stat-bar-fill { display: block; height: 100%; width: var(--fill); background: linear-gradient(90deg, var(--primary), #0ea5e9); border-radius: 3px; animation: stat-fill-anim 2s ease-out both; animation-delay: 1s; }
@keyframes stat-fill-anim { from { width: 0; } to { width: var(--fill); } }

.login-right { width: 520px; min-width: 520px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; position: relative; z-index: 2; background: rgba(15,23,42,0.6); backdrop-filter: blur(30px); border-left: 1px solid rgba(20,184,166,0.1); }
.login-card { background: rgba(255,255,255,0.97); border-radius: 24px; padding: 40px; width: 100%; max-width: 440px; box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1); position: relative; overflow: hidden; }
.login-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), #06b6d4, #0ea5e9, var(--primary)); background-size: 200% 100%; animation: gradient-shift 3s linear infinite; }
@keyframes gradient-shift { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
.login-card-header { text-align: center; margin-bottom: 25px; }
.login-card-logo { display: flex; justify-content: center; margin-bottom: 15px; }
.login-card-title { font-size: 1.6rem; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.login-card-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.lgpd-notice { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #f0fdfa, #ecfdf5); border-radius: 12px; padding: 12px 16px; margin-bottom: 25px; font-size: 0.82rem; color: var(--text-muted); border: 1px solid rgba(20,184,166,0.15); }
.lgpd-notice-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--primary), #06b6d4); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.8rem; flex-shrink: 0; }
.lgpd-notice strong { color: var(--secondary); }
.lgpd-badge { margin-left: auto; background: linear-gradient(135deg, var(--primary), #0ea5e9); color: white; font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }

.input-icon-wrapper { position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; z-index: 1; pointer-events: none; transition: color 0.3s; }
.form-control-icon { padding-left: 45px !important; }
.form-group-animated .form-control:focus ~ .input-icon,
.form-group-animated .input-icon-wrapper:focus-within .input-icon { color: var(--primary); }

/* Login Options */
.login-options { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.remember-me { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; position: relative; }
.remember-me input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; border-radius: 4px; }
.forgot-password { font-size: 0.85rem; color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.forgot-password:hover { color: var(--primary-dark); }

/* Botão Premium com Shimmer */
.btn-login-submit { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 50%, #0ea5e9 100%); color: white; border: none; border-radius: 14px; font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; overflow: hidden; box-shadow: 0 4px 20px rgba(20,184,166,0.3); }
.btn-login-submit:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(20,184,166,0.5); }
.btn-login-submit .btn-arrow { transition: transform 0.3s; }
.btn-login-submit:hover .btn-arrow { transform: translateX(5px); }
.btn-shimmer { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
.btn-login-submit:active { transform: translateY(0) scale(0.98); }

/* Login Footer */
.login-footer { display: flex; align-items: center; gap: 20px; margin-top: 25px; padding-top: 15px; }
.login-footer-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; animation: status-pulse 2s infinite; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
@keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.login-footer-version { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.login-footer-security { font-size: 0.75rem; color: rgba(255,255,255,0.4); display: flex; align-items: center; gap: 5px; }
.login-footer-security i { font-size: 0.65rem; color: var(--primary); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; color: var(--secondary); margin-bottom: 8px; font-size: 0.95rem; }
.form-control { width: 100%; padding: 14px 16px; border: 2px solid var(--border-color); border-radius: 10px; font-size: 1rem; font-family: inherit; transition: all 0.3s; background: white; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.password-field { position: relative; }
.password-toggle { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 5px; }
.btn-primary { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%); color: white; border: none; border-radius: 10px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3); }
.btn-secondary { padding: 10px 20px; background: var(--bg-light); color: var(--secondary); border: 2px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.btn-secondary:hover { background: var(--border-color); }
.login-terms { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }
.login-terms a { color: var(--primary); text-decoration: none; }
.login-help { text-align: center; margin-top: 30px; font-size: 0.9rem; color: var(--text-muted); }
.login-help a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* CLINICA SELECT */
.clinica-select-screen { display: none; min-height: 100vh; background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%); justify-content: center; align-items: center; padding: 40px; position: relative; overflow: hidden; }
.clinica-select-screen::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(20,184,166,0.08) 0%, transparent 50%), radial-gradient(ellipse at 70% 30%, rgba(14,165,233,0.06) 0%, transparent 50%); pointer-events: none; }
.clinica-select-card { background: white; border-radius: 24px; padding: 45px; width: 100%; max-width: 600px; box-shadow: 0 25px 60px rgba(0,0,0,0.4); position: relative; z-index: 1; }
.clinica-select-header { text-align: center; margin-bottom: 30px; }
.clinica-select-title { font-size: 1.5rem; font-weight: 700; color: var(--secondary); margin-bottom: 10px; }
.clinica-select-subtitle { color: var(--text-muted); }
.clinica-list { display: flex; flex-direction: column; gap: 15px; }
.clinica-card { display: flex; align-items: center; gap: 20px; padding: 22px; background: #f8fafc; border-radius: 16px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid #e2e8f0; }
.clinica-card:hover { background: #f0fdfa; border-color: var(--primary); transform: translateX(5px); box-shadow: 0 8px 25px rgba(20,184,166,0.15); }
.clinica-card-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem; flex-shrink: 0; }
.clinica-card-info h4 { font-size: 1.1rem; color: var(--secondary); margin-bottom: 5px; font-weight: 600; }
.clinica-card-info p { font-size: 0.9rem; color: var(--text-muted); }

/* MAIN SYSTEM */
.main-system { display: none; min-height: 100vh; }
.main-system.active { display: block; }

/* SIDEBAR */
.sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100vh; background: var(--secondary); color: white; z-index: 1000; overflow-y: auto; transition: transform 0.3s ease; }
.sidebar-header { padding: 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-logo { display: flex; align-items: center; gap: 5px; }
.sidebar-logo .heart { font-size: 28px; color: var(--primary); }
.sidebar-logo .pulse { font-size: 20px; color: var(--primary-light); }
.sidebar-title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.sidebar-nav { padding: 15px 0; }
.nav-section { padding: 10px 20px 5px; font-size: 0.75rem; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: all 0.3s; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.nav-item.active { background: rgba(20, 184, 166, 0.2); color: var(--primary-light); border-left-color: var(--primary); }
.nav-item i { width: 20px; text-align: center; }

/* HEADER */
.header { position: fixed; top: 0; left: var(--sidebar-width); right: 0; height: var(--header-height); background: white; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 25px; z-index: 999; }
.header-left { display: flex; align-items: center; gap: 20px; }
.hamburger-btn { display: none; background: none; border: none; font-size: 1.5rem; color: var(--secondary); cursor: pointer; padding: 5px; }
.header-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 600; color: var(--secondary); }
.header-title .heart { color: var(--primary); }
.header-title .pulse { color: var(--primary); font-size: 0.9rem; }
.header-selectors { display: flex; align-items: center; gap: 15px; margin-left: 30px; }
.header-selector { display: flex; align-items: center; gap: 8px; }
.header-selector label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.header-selector select { padding: 8px 12px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; background: white; cursor: pointer; min-width: 150px; }
.header-selector select:focus { outline: none; border-color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 15px; }
.header-dropdown { position: relative; }
.apoio-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.apoio-btn:hover { background: var(--primary-dark); }
.dropdown-menu { position: absolute; top: calc(100% + 10px); right: 0; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); min-width: 220px; display: none; z-index: 1001; overflow: hidden; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: var(--text-dark); text-decoration: none; transition: all 0.3s; cursor: pointer; }
.dropdown-item:hover { background: var(--bg-light); color: var(--primary); }
.dropdown-item i { width: 20px; color: var(--primary); }
.header-notifications { position: relative; }
.notification-btn { background: none; border: none; font-size: 1.3rem; color: var(--text-muted); cursor: pointer; padding: 8px; position: relative; }
.notification-badge { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: var(--danger); color: white; font-size: 0.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.header-user { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 12px; border-radius: 10px; transition: all 0.3s; }
.header-user:hover { background: var(--bg-light); }
.user-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.9rem; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 0.9rem; color: var(--secondary); }
.user-role { font-size: 0.8rem; color: var(--text-muted); }
.user-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); min-width: 280px; display: none; z-index: 1001; overflow: hidden; }
.user-dropdown.show { display: block; }
.user-dropdown-header { padding: 20px; background: var(--bg-light); border-bottom: 1px solid var(--border-color); }
.user-dropdown-header .user-name { font-size: 1rem; margin-bottom: 3px; }
.user-dropdown-header .user-email { font-size: 0.85rem; color: var(--text-muted); }
.user-dropdown-header .user-perfil { display: inline-block; margin-top: 8px; padding: 4px 10px; background: var(--primary); color: white; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }

/* MAIN CONTENT */
.main-content { margin-left: var(--sidebar-width); margin-top: var(--header-height); padding: 25px; min-height: calc(100vh - var(--header-height)); overflow-x: hidden; }
.module-content { display: none; }
.module-content.active { display: block; }
.page-header { margin-bottom: 25px; }
.page-title { font-size: 1.8rem; font-weight: 700; color: var(--secondary); margin-bottom: 5px; }
.page-subtitle { color: var(--text-muted); }

/* CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: white; border-radius: 16px; padding: 25px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.stat-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.stat-card-title { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.stat-card-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-card-icon.primary { background: rgba(20, 184, 166, 0.1); color: var(--primary); }
.stat-card-icon.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-card-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-card-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.stat-card-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.stat-card-value { font-size: 2rem; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.stat-card-change { font-size: 0.85rem; display: flex; align-items: center; gap: 5px; }
.stat-card-change.positive { color: var(--success); }
.stat-card-change.negative { color: var(--danger); }

/* CONTENT CARDS */
.content-card { background: white; border-radius: 16px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); margin-bottom: 25px; }
.card-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--border-color); }
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--secondary); display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--primary); }
.card-actions { display: flex; gap: 10px; }
.card-body { padding: 25px; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }
.content-grid .content-card { margin-bottom: 0; min-width: 0; overflow: hidden; }
.content-grid .content-card canvas { max-width: 100%; }

/* TABLES */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 15px; background: var(--bg-light); font-weight: 600; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border-color); }
.data-table td { padding: 15px; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
.data-table tbody tr:hover { background: var(--bg-light); }
.btn-icon-sm { background: var(--bg-light); border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--text-muted); transition: all 0.3s; margin-right: 5px; }
.btn-icon-sm:hover { background: var(--primary); color: white; }
.btn-icon-sm.success:hover { background: var(--success); }
.btn-icon-sm.warning:hover { background: var(--warning); }
.btn-icon-sm.danger:hover { background: var(--danger); }
.btn-info { padding: 10px 20px; background: var(--info); color: white; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.btn-info:hover { background: #2563eb; }
.btn-danger { padding: 10px 20px; background: var(--danger); color: white; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.btn-danger:hover { background: #dc2626; }
.alert { padding: 15px; border-radius: 10px; margin-bottom: 15px; }
.alert-info { background: rgba(59, 130, 246, 0.1); color: #1e40af; border: 1px solid rgba(59, 130, 246, 0.3); }
.alert-success { background: rgba(34, 197, 94, 0.1); color: #166534; border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-warning { background: rgba(245, 158, 11, 0.1); color: #92400e; border: 1px solid rgba(245, 158, 11, 0.3); }
.alert-danger { background: rgba(239, 68, 68, 0.1); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.3); }
.input-group { display: flex; gap: 10px; }
.input-group .form-control { flex: 1; }
code { background: var(--bg-light); padding: 3px 8px; border-radius: 4px; font-family: monospace; font-size: 0.85rem; }

/* STATUS BADGES */
.status-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.status-badge.active, .status-badge.ativo, .status-badge.confirmado, .status-badge.concluído, .status-badge.concluida, .status-badge.pago, .status-badge.normal, .status-badge.aprovada { background: rgba(34, 197, 94, 0.1); color: #166534; }
.status-badge.inactive, .status-badge.inativo, .status-badge.cancelado, .status-badge.glosada { background: rgba(239, 68, 68, 0.1); color: #991b1b; }
.status-badge.agendado, .status-badge.pendente, .status-badge.aguardando, .status-badge.solicitado, .status-badge.enviada, .status-badge.agendada { background: rgba(59, 130, 246, 0.1); color: #1e40af; }
.status-badge.em_atendimento, .status-badge.em_análise, .status-badge.baixo, .status-badge.vencendo { background: rgba(245, 158, 11, 0.1); color: #92400e; }
.tipo-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.tipo-badge.receita { background: rgba(34, 197, 94, 0.1); color: #166534; }
.tipo-badge.despesa { background: rgba(239, 68, 68, 0.1); color: #991b1b; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 15px; font-size: 0.75rem; font-weight: 500; margin-right: 5px; background: var(--bg-light); color: var(--text-muted); }
.tag.tag-vip { background: rgba(245, 158, 11, 0.2); color: #92400e; }
.tag.tag-gestante { background: rgba(236, 72, 153, 0.2); color: #9d174d; }
.tag.tag-idoso { background: rgba(139, 92, 246, 0.2); color: #5b21b6; }
.tag.tag-crônico { background: rgba(239, 68, 68, 0.2); color: #991b1b; }
.tag.tag-novo { background: rgba(34, 197, 94, 0.2); color: #166534; }
.perfil-badge { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.perfil-badge.perfil-admin { background: rgba(139, 92, 246, 0.2); color: #5b21b6; }
.perfil-badge.perfil-médico { background: rgba(20, 184, 166, 0.2); color: #0d9488; }
.perfil-badge.perfil-recepcionista { background: rgba(59, 130, 246, 0.2); color: #1e40af; }
.perfil-badge.perfil-financeiro { background: rgba(245, 158, 11, 0.2); color: #92400e; }
.perfil-badge.perfil-paciente { background: rgba(34, 197, 94, 0.2); color: #166534; }

/* TABS */
.tabs { display: flex; gap: 5px; border-bottom: 2px solid var(--border-color); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 12px 20px; cursor: pointer; font-weight: 500; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.3s; white-space: nowrap; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* FILTERS */
.filters-bar { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.filter-input { padding: 10px 14px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; min-width: 150px; }
.filter-input:focus { outline: none; border-color: var(--primary); }
.search-box { position: relative; flex: 1; max-width: 300px; }
.search-box input { width: 100%; padding: 10px 14px 10px 40px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; }
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* ACTIVITIES */
.activity-list { display: flex; flex-direction: column; gap: 15px; }
.activity-item { display: flex; align-items: flex-start; gap: 15px; padding: 15px; background: var(--bg-light); border-radius: 12px; }
.activity-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.activity-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.activity-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.activity-content h4 { font-size: 0.95rem; font-weight: 600; color: var(--secondary); margin-bottom: 3px; }
.activity-content p { font-size: 0.85rem; color: var(--text-muted); }

/* QUICK ACTIONS */
.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.quick-action-btn { display: flex; align-items: center; gap: 12px; padding: 15px; background: var(--bg-light); border: none; border-radius: 12px; cursor: pointer; transition: all 0.3s; text-align: left; width: 100%; }
.quick-action-btn:hover { background: var(--primary); color: white; }
.quick-action-btn:hover i { color: white; }
.quick-action-btn i { color: var(--primary); font-size: 1.1rem; }
.quick-action-btn span { font-weight: 500; }

/* CHARTS */
.chart-container { height: 300px; position: relative; max-width: 100%; overflow: hidden; }

/* MODAL */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: none; justify-content: center; align-items: center; z-index: 2000; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal-container { background: white; border-radius: 20px; width: 100%; max-width: 600px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-container.large { max-width: 900px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--border-color); }
.modal-title { font-size: 1.3rem; font-weight: 600; color: var(--secondary); }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 5px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 25px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 25px; border-top: 1px solid var(--border-color); }
.modal-footer .btn-primary { width: auto; padding: 12px 30px; }
.modal-footer .btn-secondary { padding: 12px 30px; }
.view-details { padding: 5px 0; }
.view-details h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.2rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-grid div { padding: 6px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.mt-3 { margin-top: 15px; }

/* CHECKBOX GROUP */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-light); border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s; }
.checkbox-label:hover { background: var(--border-color); }

/* FILE UPLOAD */
.file-upload-area { border: 2px dashed var(--border-color); border-radius: 12px; padding: 40px; text-align: center; cursor: pointer; transition: all 0.3s; }
.file-upload-area:hover { border-color: var(--primary); background: rgba(20, 184, 166, 0.05); }
.file-upload-area i { font-size: 3rem; color: var(--primary); margin-bottom: 15px; }
.file-upload-area p { color: var(--text-muted); }
.file-list { margin-top: 15px; }
.file-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--bg-light); border-radius: 8px; margin-bottom: 8px; }
.file-item-info { display: flex; align-items: center; gap: 10px; }
.file-item-info i { color: var(--primary); }

/* TOAST */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 15px 20px; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); transform: translateX(120%); transition: transform 0.3s; }
.toast.show { transform: translateX(0); }
.toast-success { border-left: 4px solid var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning i { color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info i { color: var(--info); }

/* SIDEBAR OVERLAY */
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* UTILITY */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.mb-3 { margin-bottom: 15px; }
.btn-icon { background: none; border: none; color: var(--primary); cursor: pointer; padding: 5px 10px; font-size: 0.9rem; }
.btn-icon:hover { text-decoration: underline; }

/* RESPONSIVE */
@media (max-width: 1200px) { .content-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    /* SIDEBAR & HEADER MOBILE */
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .header { left: 0; }
    .main-content { margin-left: 0; padding: 15px; }
    .hamburger-btn { display: block; }
    .header-selectors { display: none; }
    .header-right { gap: 8px; }
    .user-info { display: none; }
    .apoio-btn span { display: none; }
    .apoio-btn { padding: 8px 12px; }
    .header-title { font-size: 0.95rem; }
    .notification-btn { font-size: 1.1rem; padding: 6px; }

    /* LOGIN MOBILE */
    .login-screen { flex-direction: column; }
    .login-left { padding: 30px 20px 15px; }
    .login-right { width: 100%; min-width: unset; padding: 20px; border-left: none; border-top: 1px solid rgba(20,184,166,0.1); background: rgba(15,23,42,0.4); }
    .login-title { font-size: 2rem; }
    .login-tagline { font-size: 0.95rem; }
    .login-slogan { display: none; }
    .login-features-grid { display: none; }
    .login-stats { display: none; }
    .login-particles-canvas { display: none; }
    .login-grid-bg { display: none; }
    .aurora-orb { filter: blur(60px); opacity: 0.4; }
    .aurora-orb-3, .aurora-orb-4 { display: none; }
    .login-brand { margin-bottom: 15px; text-align: center; }
    .heart-glow { width: 80px; height: 80px; }
    .heart-svg { width: 70px; height: 62px; }
    .ecg-line { width: 180px; height: 28px; }
    .login-card { padding: 30px 25px; border-radius: 20px; }
    .login-card::before { height: 3px; }
    .login-footer { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .login-options { flex-direction: column; gap: 10px; align-items: flex-start; }

    /* FORMULÁRIOS E FILTROS MOBILE */
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .search-box { max-width: none; }
    .filter-group { flex-direction: column; align-items: stretch; gap: 4px; }
    .filter-input { min-width: unset; width: 100%; }

    /* DASHBOARD MOBILE */
    .page-title { font-size: 1.3rem; }
    .page-subtitle { font-size: 0.85rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card-value { font-size: 1.5rem; }
    .stat-card-icon { width: 38px; height: 38px; font-size: 1rem; }
    .content-grid { grid-template-columns: 1fr; gap: 15px; }
    .chart-container { height: 220px; }

    /* TABELAS MOBILE */
    .table-responsive { margin: 0 -15px; padding: 0 15px; }
    .data-table th, .data-table td { padding: 10px 8px; font-size: 0.8rem; white-space: nowrap; }
    .data-table th:nth-child(n+4), .data-table td:nth-child(n+4) { min-width: 100px; }

    /* CARDS MOBILE */
    .content-card { border-radius: 12px; }
    .card-header { padding: 15px; flex-direction: column; gap: 10px; align-items: flex-start; }
    .card-title { font-size: 0.95rem; }
    .card-body { padding: 15px; }
    .card-actions { width: 100%; }
    .card-actions .btn-primary, .card-actions .btn-secondary { flex: 1; font-size: 0.8rem; padding: 8px 12px; }

    /* TABS MOBILE */
    .tabs { gap: 0; }
    .tab { padding: 10px 12px; font-size: 0.8rem; }

    /* MODAIS MOBILE */
    .modal-overlay { padding: 10px; align-items: flex-end; }
    .modal-container { max-height: 85vh; border-radius: 16px 16px 0 0; }
    .modal-container.large { max-width: 100%; }
    .modal-header { padding: 15px 18px; }
    .modal-title { font-size: 1.1rem; }
    .modal-body { padding: 18px; }
    .modal-footer { padding: 15px 18px; flex-wrap: wrap; }
    .modal-footer .btn-primary, .modal-footer .btn-secondary { flex: 1; min-width: 120px; }
    .detail-grid { grid-template-columns: 1fr; }

    /* QUICK ACTIONS MOBILE */
    .quick-actions { gap: 8px; }
    .quick-action-btn { padding: 12px; font-size: 0.85rem; }

    /* ACTIVITIES MOBILE */
    .activity-item { padding: 12px; gap: 10px; }
    .activity-icon { width: 34px; height: 34px; font-size: 0.85rem; }
    .activity-content h4 { font-size: 0.85rem; }
    .activity-content p { font-size: 0.8rem; }

    /* CLINICA SELECT MOBILE */
    .clinica-select-screen { padding: 20px; }
    .clinica-select-card { padding: 25px; border-radius: 16px; }
    .clinica-card { padding: 16px; gap: 12px; }
    .clinica-card-icon { width: 40px; height: 40px; font-size: 1rem; }
    .clinica-card-info h4 { font-size: 0.95rem; }
    .clinica-card-info p { font-size: 0.8rem; }

    /* TOAST MOBILE */
    .toast-container { top: 70px; right: 10px; left: 10px; }
    .toast { padding: 12px 15px; font-size: 0.85rem; }

    /* DROPDOWN MOBILE */
    .dropdown-menu { min-width: 180px; }
    .user-dropdown { min-width: 250px; right: -10px; }

    /* BADGES MOBILE */
    .status-badge, .tipo-badge, .perfil-badge { font-size: 0.7rem; padding: 4px 8px; }

    /* CHECKBOX GROUP MOBILE */
    .checkbox-group { gap: 6px; }
    .checkbox-label { padding: 6px 10px; font-size: 0.8rem; }

    /* FILE UPLOAD MOBILE */
    .file-upload-area { padding: 25px 15px; }
    .file-upload-area i { font-size: 2rem; }

    /* INPUT GROUP MOBILE */
    .input-group { flex-direction: column; }

    /* PRONTUÁRIO MOBILE */
    .resumo-ia-card { margin: 0 -5px 16px; }
    .resumo-ia-body { max-height: 180px; font-size: 0.75rem; }

    /* BI & ANALYTICS MOBILE */
    .content-grid .content-card canvas { height: 180px !important; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card-value { font-size: 1.3rem; }
    .page-title { font-size: 1.1rem; }
    .main-content { padding: 10px; }
    .header { padding: 0 12px; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab { padding: 8px 10px; font-size: 0.75rem; }
    .chart-container { height: 180px; }
    .modal-container { max-height: 90vh; }
    .modal-body { padding: 15px; }
    .form-control { font-size: 16px; /* evita zoom no iOS */ }
    select.form-control { font-size: 16px; }
}

/* ==================== TRANSCRIÇÃO DE ÁUDIO (MICROFONE) ==================== */
.btn-mic-transcricao {
    background: none;
    border: 2px solid #14b8a6;
    color: #14b8a6;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
    margin-left: 8px;
    flex-shrink: 0;
}
.btn-mic-transcricao:hover {
    background: #14b8a6;
    color: white;
    transform: scale(1.1);
}
.btn-mic-transcricao.gravando {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    animation: pulse-mic 1s infinite;
}
@keyframes pulse-mic {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ==================== RESUMO PRÉ-CONSULTA IA ==================== */
.resumo-ia-card {
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
    border: 1px solid #99f6e4;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(20,184,166,0.1);
}
.resumo-ia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
}
.resumo-ia-header i {
    color: #5eead4;
    margin-right: 6px;
}
.resumo-ia-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.resumo-ia-close:hover {
    background: rgba(255,255,255,0.2);
}
.resumo-ia-body {
    padding: 12px 14px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #374151;
    max-height: 250px;
    overflow-y: auto;
}
.resumo-ia-loading {
    text-align: center;
    padding: 20px;
    color: #14b8a6;
    font-weight: 500;
}
.resumo-ia-empty {
    text-align: center;
    padding: 15px;
    color: #64748b;
}
.resumo-ia-content h4 {
    border-bottom: 1px solid #99f6e4;
    padding-bottom: 3px;
}
.resumo-ia-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #99f6e4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.resumo-ia-footer small {
    color: #94a3b8;
    font-size: 0.72rem;
}


/* ==================== DASHBOARD GRÁFICOS v15.2 ==================== */
.dash-indicators-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dash-indicator-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

.dash-indicator-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dash-indicator-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dash-indicator-info {
    display: flex;
    flex-direction: column;
}

.dash-indicator-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-indicator-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.card-badge {
    font-size: 11px;
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Aniversariantes */
.aniversariantes-list {
    max-height: 250px;
    overflow-y: auto;
}

.aniversariante-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.aniversariante-item:last-child {
    border-bottom: none;
}

.aniversariante-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #ec4899;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.aniversariante-info {
    display: flex;
    flex-direction: column;
}

.aniversariante-info strong {
    font-size: 13px;
    color: #1e293b;
}

.aniversariante-info small {
    font-size: 11px;
    color: #94a3b8;
}

/* Responsivo dashboard */
@media (max-width: 768px) {
    .dash-indicators-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-indicator-card {
        padding: 12px 14px;
    }
    .dash-indicator-value {
        font-size: 16px;
    }
}

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

/* ==================== PWA INSTALL BANNER ==================== */
#pwa-install-banner {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3001;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - 30px);
    max-width: 480px;
}
#pwa-install-banner.show {
    bottom: 20px;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(20,184,166,0.1);
}
.pwa-banner-icon {
    flex-shrink: 0;
}
.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pwa-banner-text strong {
    font-size: 0.9rem;
    color: #1e293b;
}
.pwa-banner-text span {
    font-size: 0.75rem;
    color: #64748b;
}
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pwa-btn-install {
    padding: 8px 16px;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.pwa-btn-install:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(20,184,166,0.3);
}
.pwa-btn-dismiss {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
}
.pwa-btn-dismiss:hover {
    color: #64748b;
}

/* ==================== BOTÃO BIOMETRIA ==================== */
.btn-biometria {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #14b8a6;
    border: 2px solid #14b8a6;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}
.btn-biometria:hover {
    background: rgba(20,184,166,0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20,184,166,0.2);
}
.btn-biometria i {
    font-size: 1.3rem;
}

/* ==================== KPIs / METAS ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.kpi-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.kpi-value {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}
.kpi-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.kpi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0ea5e9);
    border-radius: 4px;
    transition: width 1s ease;
}
.kpi-bar-fill.success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.kpi-bar-fill.info {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}
.kpi-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* ==================== MINI-CALENDÁRIO ==================== */
.mini-calendario {
    margin-bottom: 15px;
}
.mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.mini-cal-month {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}
.mini-cal-nav {
    background: #f1f5f9;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}
.mini-cal-nav:hover {
    background: #14b8a6;
    color: white;
}
.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    font-size: 0.75rem;
}
.mini-cal-day-header {
    font-weight: 600;
    color: #94a3b8;
    padding: 4px;
    text-transform: uppercase;
    font-size: 0.65rem;
}
.mini-cal-day {
    padding: 5px 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}
.mini-cal-day:hover {
    background: #f0fdfa;
    color: #14b8a6;
}
.mini-cal-day.today {
    background: #14b8a6;
    color: white;
    font-weight: 700;
}
.mini-cal-day.has-event {
    position: relative;
}
.mini-cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #14b8a6;
    border-radius: 50%;
}
.mini-cal-day.today.has-event::after {
    background: white;
}
.mini-cal-day.other-month {
    color: #cbd5e1;
}

/* AGENDA HOJE */
.agenda-hoje-list {
    max-height: 200px;
    overflow-y: auto;
}
.agenda-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.agenda-item:last-child {
    border-bottom: none;
}
.agenda-item-hora {
    font-size: 0.8rem;
    font-weight: 700;
    color: #14b8a6;
    min-width: 50px;
}
.agenda-item-info {
    flex: 1;
}
.agenda-item-info strong {
    font-size: 0.85rem;
    color: #1e293b;
    display: block;
}
.agenda-item-info small {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ==================== NOTIFICAÇÕES DASHBOARD ==================== */
.notificacoes-list {
    max-height: 300px;
    overflow-y: auto;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.notif-item:last-child {
    border-bottom: none;
}
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.notif-icon.info { background: rgba(59,130,246,0.1); color: #3b82f6; }
.notif-icon.success { background: rgba(34,197,94,0.1); color: #22c55e; }
.notif-icon.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.notif-icon.danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.notif-content {
    flex: 1;
}
.notif-content strong {
    font-size: 0.85rem;
    color: #1e293b;
    display: block;
    margin-bottom: 2px;
}
.notif-content p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}
.notif-time {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .mini-cal-grid { font-size: 0.7rem; }
    .agenda-hoje-list { max-height: 150px; }
    .notificacoes-list { max-height: 200px; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

/* ==================== DROPDOWN DE BUSCA DE PACIENTES ==================== */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 4px;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: var(--bg-light);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-icon-sm.danger {
    background: #fef2f2;
    color: var(--danger);
}

.btn-icon-sm.danger:hover {
    background: var(--danger);
    color: white;
}
