*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f7fb;color:#172033}a{text-decoration:none;color:#1d4ed8}input,select,textarea,button{font-family:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:flex;flex-direction:column}.topbar{background:#0f172a;color:white;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 8px 22px rgba(15,23,42,.18)}.brand{display:flex;align-items:center;gap:14px}.logos{display:flex;align-items:center;gap:8px}.logos img{width:48px;height:48px;object-fit:contain;background:white;border-radius:10px;padding:4px}.logo-fallback{width:48px;height:48px;display:grid;place-items:center;background:#1e293b;border:1px solid #475569;border-radius:10px;font-weight:800}.brand-text{font-size:11px;line-height:1.25;color:#cbd5e1;text-transform:uppercase}.brand-text strong{display:block;font-size:18px;color:white;margin-top:4px;text-transform:none}.userbox{text-align:right;display:flex;align-items:center;gap:10px}.userbox span{font-weight:700}.userbox small{display:block;color:#cbd5e1}.navtabs{display:flex;gap:8px;overflow:auto;padding:10px 22px;background:#fff;border-bottom:1px solid #e5e7eb}.navtabs a{padding:10px 14px;border-radius:12px;color:#334155;font-weight:700;font-size:14px;white-space:nowrap}.navtabs a:hover,.navtabs a.active{background:#dbeafe;color:#1d4ed8}.content{flex:1;width:100%;max-width:1180px;margin:0 auto;padding:24px}.footer{background:#0f172a;color:#94a3b8;text-align:center;padding:13px;font-size:12px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}.page-head h1{margin:0;font-size:28px}.page-head p{margin:5px 0 0;color:#64748b}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;padding:10px 14px;font-weight:800;font-size:14px}.btn-primary{background:#2563eb;color:#fff}.btn-primary:hover{background:#1d4ed8}.btn-dark{background:#0f172a;color:#fff}.btn-light{background:#f1f5f9;color:#334155}.btn-outline-light{border:1px solid rgba(255,255,255,.22);color:white;background:transparent}.btn-mini{display:inline-flex;align-items:center;justify-content:center;border-radius:10px;background:#eef2ff;color:#1d4ed8;padding:7px 9px;font-size:12px;font-weight:800;border:0}.btn-mini.danger{background:#fee2e2;color:#b91c1c}.full{width:100%}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.card{background:white;border:1px solid #e5e7eb;border-radius:18px;padding:18px;box-shadow:0 10px 26px rgba(15,23,42,.04)}.stat small{display:block;color:#64748b;font-weight:700;text-transform:uppercase;font-size:11px}.stat strong{font-size:26px;margin-top:8px;display:block;color:#0f172a}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-title h2,.card h2{margin:0;font-size:18px}.empty{padding:28px;text-align:center;color:#94a3b8;background:#f8fafc;border-radius:14px}.event-list{display:flex;flex-direction:column;gap:10px}.event-item{display:flex;align-items:center;gap:12px;padding:11px;border:1px solid #f1f5f9;border-radius:14px;background:#fff}.event-time,.event-date{min-width:64px;text-align:center;color:#1d4ed8;font-weight:900}.event-date{font-size:12px;color:#475569}.event-main{flex:1}.event-main strong{display:block}.event-main small{display:block;color:#64748b;margin-top:3px}.badge{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;white-space:nowrap}.badge-blue{background:#dbeafe;color:#1d4ed8}.badge-green{background:#dcfce7;color:#166534}.badge-amber{background:#fef3c7;color:#92400e}.badge-purple{background:#ede9fe;color:#6d28d9}.badge-red{background:#fee2e2;color:#991b1b}.badge-gray{background:#f1f5f9;color:#475569}.filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end}.filters label,.grid-form label{display:block;font-size:11px;text-transform:uppercase;font-weight:900;color:#64748b;margin-bottom:6px}.filters input,.filters select,.grid-form input,.grid-form select,.grid-form textarea{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;background:white;color:#111827;outline:none}.filters input:focus,.filters select:focus,.grid-form input:focus,.grid-form select:focus,.grid-form textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.11)}.filter-actions{display:flex;gap:8px}.table-wrap{width:100%;overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #eef2f7;vertical-align:top}th{font-size:12px;text-transform:uppercase;color:#64748b;background:#f8fafc}td small{color:#64748b}.actions{display:flex;gap:7px;flex-wrap:wrap}.form-card{max-width:900px}.grid-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.span-2{grid-column:span 2}.form-actions{display:flex;justify-content:flex-end;gap:10px}.help-box{background:#eff6ff;border:1px solid #bfdbfe;border-radius:14px;color:#1e40af;padding:12px;font-size:13px}.detail-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:1px solid #e5e7eb;padding-bottom:14px;margin-bottom:14px}.detail-header h2{font-size:26px;margin:0}.detail-header p{color:#64748b;margin:5px 0}.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}.detail-grid div{background:#f8fafc;border-radius:14px;padding:12px}.detail-grid small,.notes small{display:block;color:#64748b;font-weight:900;text-transform:uppercase;font-size:11px}.detail-grid strong{display:block;margin-top:5px}.notes{background:#f8fafc;border-radius:14px;padding:14px;margin-top:14px}.notes p{white-space:normal;line-height:1.55}.meta{border-top:1px solid #e5e7eb;margin-top:16px;padding-top:12px;color:#64748b;font-size:12px}.calendar-card{overflow:auto}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.weeknames div{text-align:center;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;margin-bottom:6px}.day{min-height:128px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:8px}.day.blank{background:transparent;border:0}.day.today{border-color:#2563eb;background:#eff6ff}.day-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.day-head a{background:#dbeafe;color:#1d4ed8;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;font-weight:900}.calendar-event{display:block;font-size:11px;padding:5px;border-radius:8px;margin-bottom:4px;color:#0f172a;background:#dbeafe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-event.realizada{background:#dcfce7}.calendar-event.cancelada{background:#fee2e2}.calendar-event.reprogramada{background:#ede9fe}.calendar-event.pendiente{background:#fef3c7}.report-sheet{display:block}.print-title{text-align:center;margin-bottom:18px}.print-title h1{font-size:18px;margin:0}.print-title h2{font-size:16px;margin:4px 0}.print-title h3{font-size:22px;margin:10px 0 4px}.report-cards{grid-template-columns:repeat(3,1fr)}.summary-row{display:flex;justify-content:space-between;border-bottom:1px solid #f1f5f9;padding:9px 0}.alert{padding:12px 14px;border-radius:14px;margin-bottom:14px;font-weight:700}.alert-success{background:#dcfce7;color:#166534}.alert-error{background:#fee2e2;color:#991b1b}.login-body{min-height:100vh;background:linear-gradient(135deg,#0f172a,#1d4ed8);display:grid;place-items:center;padding:20px}.login-card{width:100%;max-width:430px;background:white;border-radius:24px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.25)}.login-header{background:#0f172a;color:white;text-align:center;padding:28px}.login-header h1{margin:12px 0 4px}.login-header p{margin:0;color:#cbd5e1}.login-logos{display:flex;justify-content:center;gap:8px}.login-logos img{height:56px;width:56px;object-fit:contain;background:white;border-radius:12px;padding:5px}.login-form{padding:24px;display:flex;flex-direction:column;gap:10px}.login-form label{font-size:12px;text-transform:uppercase;font-weight:900;color:#475569}.login-form input{border:1px solid #cbd5e1;border-radius:13px;padding:13px 14px;font-size:15px}.login-help{font-size:12px;color:#64748b;text-align:center;line-height:1.45;background:#f8fafc;border-radius:12px;padding:10px}.login-footer{text-align:center;padding:13px;background:#f8fafc;color:#94a3b8;font-size:12px}@media(max-width:900px){.cards,.grid-2{grid-template-columns:1fr}.filters{grid-template-columns:1fr 1fr}.detail-grid{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}.userbox{text-align:left}.calendar-grid{min-width:760px}.brand-text strong{font-size:16px}}@media(max-width:640px){.content{padding:14px}.page-head{flex-direction:column}.filters,.grid-form{grid-template-columns:1fr}.span-2{grid-column:span 1}.form-actions{justify-content:stretch;flex-direction:column}.cards{grid-template-columns:1fr}.logos img{width:38px;height:38px}.logo-fallback{width:38px;height:38px}.userbox{width:100%;justify-content:space-between}.navtabs{padding:8px 14px}.table-wrap table{min-width:820px}}@media print{.topbar,.navtabs,.footer,.no-print,.btn,.head-actions{display:none!important}body{background:white}.content{max-width:none;padding:0}.card{box-shadow:none;border:1px solid #ddd;border-radius:0}.report-sheet{font-size:12px}table{font-size:11px}.grid-2,.cards{display:grid!important;grid-template-columns:1fr 1fr}.report-cards{grid-template-columns:repeat(3,1fr)!important}}

/* === Parche recordatorios y actividades vencidas === */
.badge-darkred{background:#7f1d1d;color:#fff}.stat-danger strong{color:#991b1b}.dashboard-cards{grid-template-columns:repeat(5,minmax(0,1fr))}.event-overdue{border-color:#fecaca;background:#fff1f2}.overdue-card{margin-top:18px}.calendar-event.vencida{background:#7f1d1d;color:#fff}.agenda-alert-panel{background:#fff;border:1px solid #dbeafe;border-left:5px solid #2563eb;border-radius:18px;padding:14px;margin-bottom:18px;box-shadow:0 10px 26px rgba(15,23,42,.04)}.agenda-alert-panel.is-collapsed{border-left-color:#cbd5e1}.alert-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.alert-panel-head strong{display:block;font-size:16px;color:#0f172a}.alert-panel-head small{display:block;color:#64748b;margin-top:2px}.btn-notification.is-active{background:#dcfce7;color:#166534}.alert-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.alert-column{background:#f8fafc;border:1px solid #eef2f7;border-radius:14px;padding:12px}.alert-column h3{font-size:13px;text-transform:uppercase;color:#475569;margin:0 0 8px;font-weight:900}.alert-empty{margin:0;color:#94a3b8;font-size:13px}.alert-item{display:grid;grid-template-columns:48px 1fr;gap:4px 9px;padding:9px;border-radius:12px;margin-bottom:7px;background:#fff;border:1px solid #e5e7eb;color:#172033}.alert-item:last-child{margin-bottom:0}.alert-item b{grid-row:span 2;color:#1d4ed8}.alert-item span{font-weight:800}.alert-item small{color:#64748b}.alert-overdue{border-color:#fecaca;background:#fff1f2}.alert-overdue b{color:#991b1b}.system-alert{padding:10px 12px;border-radius:12px;margin-bottom:10px;font-size:13px;font-weight:700}.notice-error{background:#fee2e2;color:#991b1b}.toast-root{position:fixed;right:18px;top:18px;z-index:9999;display:flex;flex-direction:column;gap:10px;pointer-events:none}.agenda-toast{width:min(380px,calc(100vw - 28px));display:flex;gap:10px;align-items:flex-start;background:#fff;border:1px solid #dbeafe;border-left:5px solid #2563eb;border-radius:16px;padding:13px;box-shadow:0 18px 42px rgba(15,23,42,.20);opacity:0;transform:translateY(-16px);transition:all .28s ease;pointer-events:auto}.agenda-toast.is-visible{opacity:1;transform:translateY(0)}.agenda-toast.toast-danger{border-color:#fecaca;border-left-color:#991b1b;background:#fff7f7}.toast-icon{font-size:22px;line-height:1}.toast-body{flex:1}.toast-body strong{display:block;color:#0f172a}.toast-body p{margin:4px 0 6px;color:#475569;font-size:13px;line-height:1.35}.toast-body a{font-weight:900;font-size:13px}.toast-close{border:0;background:#f1f5f9;color:#475569;border-radius:50%;width:24px;height:24px;font-size:18px;line-height:22px}.toast-close:hover{background:#e2e8f0}@media(max-width:900px){.dashboard-cards{grid-template-columns:1fr 1fr}.alert-columns{grid-template-columns:1fr}.toast-root{left:14px;right:14px;top:12px}.agenda-toast{width:100%}}@media(max-width:640px){.dashboard-cards{grid-template-columns:1fr}.alert-panel-head{align-items:flex-start;flex-direction:column}.btn-notification{width:100%}}
