:root{
  --bg:#f5f7f9;--panel:#fff;--ink:#182230;--muted:#667085;--line:#dce3e8;
  --brand:#176b80;--brand-strong:#0f5567;--brand-soft:#edf7f9;--accent:#58a7bd;
  --ok:#087443;--ok-bg:#ecfdf3;--warn:#a04f12;--warn-bg:#fff4e5;--danger:#b42318;--danger-bg:#fef3f2;
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 26px rgba(16,24,40,.035);
  --radius:14px;--control-radius:9px;--content:1320px;
}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:var(--brand);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}.container{max-width:var(--content);margin:0 auto;padding:26px 20px 60px}
.topbar{background:#102f3a;color:#fff;border-bottom:1px solid #173f4c}.topbar-inner{max-width:var(--content);margin:auto;display:flex;align-items:center;gap:18px;padding:0 20px;min-height:58px}.brand{font-size:20px;font-weight:800;color:#fff;letter-spacing:.02em}.brand:hover{text-decoration:none}.nav{display:flex;gap:4px;flex-wrap:wrap}.nav a{color:#d9e9ee;padding:8px 10px;border-radius:8px;font-size:13px}.nav a:hover{background:#1a4654;text-decoration:none}.spacer{flex:1}.userchip{font-size:12px;color:#c5d9df}.logout{background:transparent;border:1px solid #5b7c87;color:#fff;border-radius:8px;padding:7px 10px;cursor:pointer}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin:12px 0 22px}.page-head h1,h1{font-size:29px;line-height:1.15;margin:0 0 7px}.page-head .subtitle,.subtitle{margin:0;color:var(--muted);max-width:850px}h2{font-size:19px;margin:0 0 13px}h3{font-size:15px;margin:0}.eyebrow{font-size:11px;font-weight:750;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.grid{display:grid;gap:16px}.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:19px;box-shadow:var(--shadow)}.narrow-card{max-width:760px}.stack-lg>*+*{margin-top:20px}.stack-md>*+*{margin-top:13px}.stack-sm>*+*{margin-top:7px}.mt-sm{margin-top:6px}.mt-md{margin-top:12px}.mt-lg{margin-top:18px}
.section-title{margin:4px 0 13px;padding:8px 11px;border-left:4px solid var(--accent);background:#f7fbfc;border-radius:6px;font-weight:760}.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.legend-line{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:12px}.required-star{color:var(--danger);font-weight:800}.validate-dot{color:var(--brand);font-size:10px;vertical-align:middle}.optional-label{color:var(--muted);font-size:11px;font-weight:500;margin-left:5px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}.form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field.full{grid-column:1/-1}.span-2{grid-column:span 2}.field label{font-weight:650;font-size:13px}.help{font-size:12px;color:var(--muted)}input,select,textarea{width:100%;border:1px solid #cdd6de;border-radius:var(--control-radius);padding:10px 11px;background:#fff;color:var(--ink);transition:border-color .15s,box-shadow .15s}textarea{min-height:100px;resize:vertical}.description-area{min-height:150px}input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px rgba(88,167,189,.16)}input:disabled,select:disabled,textarea:disabled{background:#f2f4f7;color:#98a2b3}.form-actions{display:flex;gap:9px;align-items:center;margin-top:18px}.align-end{align-self:end}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:9px;padding:9px 13px;font-weight:700;cursor:pointer;background:var(--brand);color:#fff;text-decoration:none;white-space:nowrap}.btn:hover{text-decoration:none;filter:brightness(.97)}.btn.secondary{background:#edf1f4;color:#344054}.btn.outline{background:#fff;color:#344054;border-color:var(--line)}.btn.small{padding:6px 9px;font-size:12px}.btn.block{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed;filter:none}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2f6;color:#475467;font-size:12px;font-weight:700}.badge.draft{background:var(--warn-bg);color:var(--warn)}.badge.validated{background:var(--ok-bg);color:var(--ok)}.tag{display:inline-block;margin:2px 4px 2px 0;padding:3px 8px;background:#eef2f6;border-radius:999px;color:#475467;font-size:12px}.small{font-size:12px}.muted{color:var(--muted)}.right{text-align:right}.nowrap{white-space:nowrap}.stat{font-size:34px;font-weight:800}.stat-card{min-height:116px}.notice{padding:11px 13px;border-radius:10px;background:#fff7ed;color:#7a2e0e;border:1px solid #fed7aa;margin:12px 0}.notice.error{background:var(--danger-bg);color:#912018;border-color:#fecdca}.notice.ok{background:var(--ok-bg);color:#05603a;border-color:#abefc6}.empty{padding:26px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:11px;background:#fafbfc}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff}table{border-collapse:collapse;width:100%;min-width:760px}th,td{padding:11px 12px;text-align:left;border-bottom:1px solid #edf0f3;vertical-align:top}th{font-size:12px;color:#475467;background:#f8fafb;position:sticky;top:0}tr:last-child td{border-bottom:0}.code-cell{max-width:520px;overflow-wrap:anywhere}
.row-card{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fbfcfd;margin-bottom:8px}.link-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;color:inherit}.link-row:hover{text-decoration:none;border-color:#afc7cf;background:#f8fcfd}.row-grid{display:grid;grid-template-columns:1.2fr 1fr .8fr 1.6fr 36px;gap:8px;align-items:end}.row-grid.material{grid-template-columns:1fr 1.2fr 1fr 1fr 1.2fr 36px}.remove{width:34px;height:38px;border-radius:8px;border:1px solid #fecdca;background:#fff;color:var(--danger);cursor:pointer}
.timeline{display:flex;flex-direction:column;gap:10px}.timeline-item{display:block;border:1px solid var(--line);border-left:4px solid #9bc8d7;padding:13px 14px;background:#fff;border-radius:0 10px 10px 0;color:inherit}.timeline-item:hover{text-decoration:none;background:#fbfdfe}.timeline-head{display:flex;justify-content:space-between;gap:12px}.event-kind{font-size:11px;color:var(--muted);margin-left:7px}.event-snippet{margin-top:6px;color:#344054;white-space:pre-line}.prose-text{white-space:pre-wrap;font-size:15px;line-height:1.6}.patient-summary .card>div+div{margin-top:4px}
.advanced-panel{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.advanced-panel>summary{cursor:pointer;padding:13px 16px;font-weight:740;list-style:none}.advanced-panel>summary::-webkit-details-marker{display:none}.advanced-panel>summary:after{content:'＋';float:right;color:var(--muted)}.advanced-panel[open]>summary:after{content:'−'}.details-body{border-top:1px solid var(--line);padding:16px}.dynamic-field{margin-bottom:12px}.hidden-by-condition{display:none!important}
.combo-field{position:relative}.combo-menu{position:absolute;z-index:30;top:100%;left:0;right:0;margin-top:4px;max-height:280px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 16px 40px rgba(16,24,40,.14);padding:5px}.combo-option{display:flex;width:100%;flex-direction:column;align-items:flex-start;border:0;background:#fff;padding:9px 10px;border-radius:7px;cursor:pointer;text-align:left}.combo-option:hover{background:var(--brand-soft)}.combo-option span{font-size:11px;color:var(--muted)}.combo-empty{padding:14px;text-align:center;color:var(--muted);font-size:12px}
.validation-box{border:1px solid #c7dfe6;background:#f3fafc;border-radius:10px;padding:10px 12px;color:#335f6c}.validation-box strong{display:block;margin-bottom:3px}.validation-box .ready{color:var(--ok)}.sticky-actions{position:sticky;bottom:0;z-index:20;display:flex;justify-content:space-between;align-items:center;gap:12px;background:rgba(245,247,249,.94);backdrop-filter:blur(8px);border:1px solid var(--line);border-radius:12px;padding:10px 12px;box-shadow:0 -7px 24px rgba(16,24,40,.06)}.autosave-indicator{font-size:11px;color:var(--muted)}
.filterbar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px;margin-bottom:17px}.filterbar .field{min-width:150px}.filterbar .grow{flex:1;min-width:260px}.searchbar .grow{min-width:360px}.subnav{display:flex;gap:6px;flex-wrap:wrap;margin:-7px 0 18px}.subnav a{padding:6px 9px;border:1px solid var(--line);background:#fff;border-radius:8px;color:#475467;font-size:12px}.subnav a:hover{text-decoration:none;background:#f7fafb}.check-card,.check-row{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--line);border-radius:9px;padding:10px;background:#fbfcfd}.check-card input,.check-row input{width:auto;margin-top:2px}
.count-row{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #edf0f3}.count-row:last-child{border-bottom:0}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quick-link{border:1px solid var(--line);border-radius:9px;padding:12px;background:#fbfcfd;font-weight:650}.quick-link:hover{text-decoration:none;background:var(--brand-soft)}
.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;margin:16px 0 9px}.calendar-toolbar h2{margin:0}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-head>div{padding:8px;text-align:center;font-size:12px;font-weight:700;color:var(--muted)}.calendar-body{border-top:1px solid var(--line);border-left:1px solid var(--line);background:#fff}.calendar-day{min-height:135px;padding:7px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);overflow:hidden}.calendar-day.outside{background:#f8fafb;color:#98a2b3}.day-number{font-size:12px;font-weight:700;margin-bottom:6px}.calendar-event{display:block;border-left:3px solid var(--accent);background:#f2f9fb;border-radius:5px;padding:5px 6px;margin:4px 0;color:#214853;font-size:11px}.calendar-event.draft{border-left-color:#d68b37;background:#fff8ed}.calendar-event strong,.calendar-event span{display:block}.calendar-event span{color:#667085;font-size:10px}.calendar-event:hover{text-decoration:none;filter:brightness(.98)}
.file-row{border-bottom:1px solid #edf0f3;padding:9px 0}.file-row:last-of-type{border-bottom:0}.upload-box{background:#f8fafb;border:1px dashed #cdd6de;border-radius:10px;padding:13px}.audit-timeline{display:flex;flex-direction:column}.audit-item{display:grid;grid-template-columns:18px 1fr;gap:9px;position:relative;padding:4px 0 15px}.audit-item:not(:last-child):before{content:'';position:absolute;left:6px;top:15px;bottom:-2px;width:1px;background:#d6e2e6}.audit-dot{width:13px;height:13px;border-radius:50%;background:var(--brand-soft);border:3px solid var(--accent);margin-top:3px;z-index:1}.kv-list{display:flex;flex-direction:column}.kv-row{display:grid;grid-template-columns:220px 1fr;gap:14px;padding:7px 0;border-bottom:1px solid #edf0f3}.kv-row .k{color:var(--muted)}.kv-section{font-weight:760;margin:14px 0 4px}.metric{background:#eef8fb;border:1px solid #cbe8f1;border-radius:10px;padding:12px}.metric strong{font-size:22px;display:block}.json-block{white-space:pre-wrap;overflow:auto;background:#f8fafb;padding:14px;margin:0;border-radius:0 0 12px 12px}
.template-field-row{display:grid;grid-template-columns:1fr 1.3fr .85fr 1fr .7fr 1.2fr .55fr .55fr 1fr 1fr 36px;gap:6px;margin-bottom:7px;align-items:end}.template-field-row input,.template-field-row select{padding:7px 8px;font-size:12px}.divider{height:1px;background:var(--line);margin:18px 0}
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eaf4f7,#f7f5ee)}.login-card{width:min(430px,92vw);background:#fff;border:1px solid var(--line);border-radius:18px;padding:28px;box-shadow:0 18px 50px rgba(20,40,55,.12)}.login-mark{width:52px;height:52px;border-radius:14px;background:var(--brand);display:grid;place-items:center;color:#fff;font-size:24px;font-weight:800;margin-bottom:18px}.countdown{font-size:12px;color:var(--muted);min-height:18px}
@media(max-width:1000px){.cols-4,.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.row-grid,.row-grid.material,.template-field-row{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-day{min-height:105px}.nav{order:3;width:100%}.topbar-inner{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}}
@media(max-width:680px){.container{padding:18px 13px 50px}.page-head{flex-direction:column}.cols-4,.cols-3,.cols-2,.form-grid,.form-grid.three,.quick-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.filterbar{align-items:stretch}.filterbar .field,.filterbar .grow,.searchbar .grow{min-width:100%}.sticky-actions{position:static;flex-direction:column;align-items:stretch}.sticky-actions .actions{width:100%}.sticky-actions .btn{flex:1}.calendar-grid{min-width:740px}.calendar-body,.calendar-head{overflow:visible}.container:has(.calendar-grid){overflow-x:auto}.kv-row{grid-template-columns:1fr}.row-grid,.row-grid.material,.template-field-row{grid-template-columns:1fr}.userchip{display:none}}

/* Compatibilidad visual de plantillas v0.1 que todavía se conservan. */
.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:18px 0}.toolbar .filters{display:flex;gap:8px;flex-wrap:wrap;flex:1}.section{margin:22px 0 12px;padding:9px 12px;border-left:4px solid var(--accent);background:#f7fbfc;border-radius:6px;font-weight:750}

/* -------------------------------------------------------------------------
   SIGO v0.3 · Hoja genérica de evento
   Todo este diseño es compartido por cualquier evento; no hay CSS por rama.
   ------------------------------------------------------------------------- */
.compact-head{margin-bottom:14px}.event-create-card{max-width:900px;margin:0 auto}.event-create-step{display:flex;align-items:center;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--line)}.step-number{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--brand);color:#fff;font-weight:800}.static-field{min-height:42px;border:1px solid var(--line);border-radius:var(--control-radius);background:#f8fafb;padding:9px 11px;display:flex;flex-direction:column;justify-content:center}.static-field span{font-size:11px;color:var(--muted)}.form-actions{padding-top:6px}
.patient-sheet{padding:15px 18px}.patient-sheet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px}.patient-sheet-grid>div{min-width:0}.meta-label{display:block;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.035em;margin-bottom:3px}.patient-sheet-grid strong{display:block;overflow-wrap:anywhere}.patient-event-index{margin-top:18px}.event-index{border:1px solid var(--line);border-radius:11px;overflow:hidden}.event-index-head,.event-index-row{display:grid;grid-template-columns:180px minmax(260px,1.7fr) minmax(170px,1fr) 110px;gap:14px;align-items:center}.event-index-head{background:#f7f9fa;color:var(--muted);font-size:11px;font-weight:760;text-transform:uppercase;letter-spacing:.03em;padding:9px 12px;border-bottom:1px solid var(--line)}.event-index-row{padding:12px;color:inherit;background:#fff;border-bottom:1px solid #edf0f3}.event-index-row:last-child{border-bottom:0}.event-index-row:hover{text-decoration:none;background:#f9fcfd}.event-date{font-variant-numeric:tabular-nums}.event-title{display:flex;flex-direction:column;gap:2px}.event-title small{color:var(--muted);font-size:10px}
.event-sheet-header{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:18px}.event-header-top{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:20px 22px 17px}.event-header-top h1{margin:2px 0 4px;font-size:30px;line-height:1.15}.event-patient-link{font-weight:650}.event-metadata-bar{display:grid;grid-template-columns:1.15fr 1.4fr .7fr 1fr;gap:0;border-top:1px solid var(--line);background:#f9fbfc}.event-metadata-bar>div{padding:12px 16px;border-right:1px solid var(--line)}.event-metadata-bar>div:last-child{border-right:0}.event-metadata-bar strong,.event-metadata-bar small{display:block}.validation-inline{border-top:1px solid var(--line);background:#fcfdfd}.validation-inline>summary{cursor:pointer;padding:9px 16px;font-weight:700;color:#405a64}.validation-inline-form{display:flex;gap:8px;align-items:center;padding:0 16px 12px}.validation-inline-form select{max-width:330px}
.event-team-card{margin-top:0;margin-bottom:18px}.event-team-card .section-head{margin-bottom:14px}.event-team-card h2{margin:1px 0 4px}.event-team-card .section-head p{margin:0}.event-team-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:11px;overflow:hidden}.event-team-member{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:11px 13px;background:#fff;border-bottom:1px solid #edf0f3}.event-team-member:last-child{border-bottom:0}.event-team-member strong,.event-team-member span{display:block}.event-team-member span{font-size:12px;color:var(--muted);margin-top:2px}.event-team-flags{display:flex;align-items:flex-end;gap:7px;flex-direction:column;max-width:45%;text-align:right}.event-team-flags .badge{color:#475467;margin:0}.event-team-flags small{color:var(--muted);overflow-wrap:anywhere}.compact-empty{padding:16px;margin-bottom:12px}.event-team-add{margin-top:12px}.event-team-add>summary{list-style:none;width:max-content}.event-team-add>summary::-webkit-details-marker{display:none}.event-team-add[open]>summary{display:none}.event-team-form{display:grid;grid-template-columns:minmax(190px,1.35fr) minmax(160px,1fr) auto minmax(180px,1.2fr);gap:10px;align-items:end;border:1px solid var(--line);background:#fafcfd;border-radius:11px;padding:13px}.event-team-fellow{align-self:end;min-height:42px;white-space:nowrap}.event-team-form .actions{grid-column:1/-1}.event-team-notes{min-width:0}
.storage-intro-card,.storage-connection-card,.storage-safety-card{margin-bottom:16px}.storage-intro-card .section-head,.storage-connection-card .section-head{align-items:flex-start}.storage-connection-card h2,.storage-intro-card h2{margin:1px 0 4px}.storage-connection-card .section-head p,.storage-intro-card .section-head p{margin:0}.storage-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}.storage-stats>div{border:1px solid var(--line);border-radius:9px;background:#fafcfd;padding:10px}.storage-stats strong{font-size:20px}.storage-actions{margin-top:12px}.inline-form{display:flex;align-items:center;gap:7px}.inline-form input{width:74px;padding:6px 8px}.storage-safety-card p{margin-bottom:0;line-height:1.55}
.event-composer{padding:18px 20px}.composer-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.composer-intro h2{margin:1px 0 0}.composer-intro p{max-width:620px;margin:0}.composer-actions{display:flex;gap:9px;align-items:flex-start;flex-wrap:wrap;margin-top:15px}.compose-panel{position:relative}.compose-panel>summary{list-style:none}.compose-panel>summary::-webkit-details-marker{display:none}.compose-panel[open]{width:min(760px,100%)}.compose-panel.wide[open]{width:100%}.compose-panel[open]>summary{display:none}.compose-body{border:1px solid var(--line);background:#fafcfd;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}.compose-body textarea{min-height:150px}.dropzone{position:relative;border:2px dashed #bfd0d6;border-radius:12px;background:#fff;min-height:140px;display:grid;place-items:center;text-align:center;transition:.15s}.dropzone.dragover{border-color:var(--brand);background:var(--brand-soft)}.dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.dropzone-copy{display:flex;flex-direction:column;gap:3px;pointer-events:none}.dropzone-copy strong{font-size:15px}.dropzone-copy span,.dropzone-copy small{color:var(--muted)}.file-batch-editor{display:flex;flex-direction:column;gap:8px}.file-edit-row{display:grid;grid-template-columns:minmax(180px,1.1fr) minmax(220px,1.5fr) minmax(180px,1fr);gap:10px;align-items:end;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px}.file-edit-name{min-width:0}.file-edit-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-edit-name small{color:var(--muted)}
.event-feed-section{margin:24px 0}.event-feed{display:flex;flex-direction:column;gap:12px;max-width:980px;margin:0 auto}.event-post{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 1px 2px rgba(16,24,40,.025);overflow:hidden}.event-post-meta{display:flex;gap:10px;align-items:center;padding:9px 14px;background:#f8fafb;border-bottom:1px solid #edf0f3;color:var(--muted);font-size:11px}.legacy-chip{padding:2px 6px;border-radius:999px;background:#fff2cc;color:#7a5b00;font-weight:700}.event-post-text{padding:17px 18px;white-space:pre-wrap;font-size:15px;line-height:1.62}.event-post-files{padding:11px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.feed-file{display:grid;grid-template-columns:50px 1fr;gap:10px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:9px;color:inherit;background:#fbfcfd}.feed-file:hover{text-decoration:none;background:var(--brand-soft)}.feed-file>span:last-child{display:flex;min-width:0;flex-direction:column}.feed-file strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed-file small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-type-icon{width:46px;height:42px;border-radius:8px;display:grid;place-items:center;background:#eaf3f6;color:#315866;font-size:10px;font-weight:800}.mini-tags{font-size:10px;color:var(--brand);margin-top:2px}.blank-event{border:2px dashed var(--line);background:#fafbfc;border-radius:14px;padding:44px 20px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:5px}.blank-event strong{color:#475467;font-size:16px}
.gallery-section{margin-top:22px}.gallery-filters{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 15px}.chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 10px;cursor:pointer;color:#475467;font-size:12px}.chip.active,.chip:hover{background:var(--brand-soft);border-color:#b9d6df;color:var(--brand-strong)}.media-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.media-card{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#fff;min-width:0}.media-card[hidden]{display:none}.media-preview{height:150px;display:grid;place-items:center;background:#eef2f4;overflow:hidden}.media-preview:hover{text-decoration:none}.media-preview img,.media-preview video{width:100%;height:100%;object-fit:cover}.document-preview{font-weight:850;font-size:20px;color:#60717a;letter-spacing:.04em}.media-caption{padding:9px 10px;display:flex;flex-direction:column;min-width:0}.media-caption strong,.media-caption small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-caption small{font-size:10px;color:var(--muted)}.media-caption .mini-tags{display:flex;gap:4px;flex-wrap:wrap}.audit-card{margin-top:22px}.imported-log{margin-top:3px;color:#7a6a40}
@media(max-width:1000px){.patient-sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.event-index-head,.event-index-row{grid-template-columns:150px minmax(220px,1.5fr) minmax(150px,1fr) 100px}.event-metadata-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.event-metadata-bar>div:nth-child(2){border-right:0}.event-metadata-bar>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.media-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.patient-sheet-grid{grid-template-columns:1fr}.event-index-head{display:none}.event-index-row{grid-template-columns:1fr;gap:5px}.event-header-top{flex-direction:column}.event-header-top .actions{width:100%}.event-metadata-bar{grid-template-columns:1fr}.event-metadata-bar>div{border-right:0!important;border-bottom:1px solid var(--line)}.event-metadata-bar>div:last-child{border-bottom:0}.event-team-member{flex-direction:column}.event-team-flags{align-items:flex-start;max-width:none;text-align:left}.event-team-form{grid-template-columns:1fr}.event-team-form .actions{grid-column:auto}.storage-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.inline-form{width:100%}.inline-form .btn{flex:1}.composer-intro{align-items:flex-start;flex-direction:column}.composer-actions,.compose-panel,.compose-panel[open]{width:100%}.compose-panel>summary{width:100%}.file-edit-row{grid-template-columns:1fr}.event-post-files{grid-template-columns:1fr}.media-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.validation-inline-form{align-items:stretch;flex-direction:column}.validation-inline-form select{max-width:none}}

/* -------------------------------------------------------------------------
   SIGO v0.4 · AI Hub + edición de metadatos en galería
   Componentes compartidos; no se crean estilos específicos por proveedor.
   ------------------------------------------------------------------------- */
.notice.neutral{background:#f6f8fa;color:#475467;border-color:var(--line)}.compact-notice{margin:0;padding:9px 11px;font-size:12px}
.dropzone.compact{min-height:118px}.ai-source-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}.ai-source-grid .field textarea{min-height:118px}
.ai-status-field{display:flex;flex-direction:column;gap:7px}.status-line{display:flex;align-items:center;gap:7px;font-size:12px}.status-dot{width:8px;height:8px;border-radius:50%;background:#98a2b3;flex:0 0 auto}.status-dot.ok{background:var(--ok)}.status-dot.off{background:#98a2b3}.small-link{font-size:12px;font-weight:700}
.ai-usage-mini{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 0}.ai-usage-mini span{display:inline-flex;align-items:center;padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:#f8fafb;color:#475467;font-size:11px}
.duplicate-box{margin-top:16px;border:1px solid #fed7aa;background:#fffbf5;border-radius:12px;padding:14px}.duplicate-box h3{margin-bottom:4px}.candidate-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}.candidate-row{display:flex;justify-content:space-between;gap:14px;align-items:center;background:#fff;border:1px solid #f1d4af;border-radius:10px;padding:10px 11px}.candidate-row>div{min-width:0}.candidate-reasons{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.candidate-reasons span{font-size:10px;border-radius:999px;padding:2px 6px;background:#fff4e5;color:#8a3f0c}.ai-detected-context{margin-top:13px;padding:11px 12px;border:1px dashed var(--line);border-radius:10px;background:#fafbfc}.ai-detected-context .grid{margin-top:7px}
.media-meta-edit{margin-top:8px;border-top:1px solid #edf0f3;padding-top:7px}.media-meta-edit>summary{cursor:pointer;color:var(--brand);font-size:11px;font-weight:700;list-style:none}.media-meta-edit>summary::-webkit-details-marker{display:none}.media-meta-edit>summary:before{content:'✎ ';font-size:10px}.media-meta-form{display:flex;flex-direction:column;gap:7px;margin-top:8px}.media-meta-form .field{gap:3px}.media-meta-form label{font-size:10px}.media-meta-form input{padding:7px 8px;font-size:12px}
.ai-hub-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}.hub-stat{border:1px solid var(--line);border-radius:11px;background:#fff;padding:12px}.hub-stat strong{display:block;font-size:20px}.hub-stat span{font-size:11px;color:var(--muted)}
.provider-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.provider-card{border:1px solid var(--line);border-radius:12px;background:#fbfcfd;padding:14px}.provider-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.provider-head h3{margin:0}.provider-url{font-size:11px;color:var(--muted);overflow-wrap:anywhere;margin-top:4px}.inline-secret-form{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:7px;margin-top:11px}.compact-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.error-text{color:var(--danger);font-size:11px}
.ai-model-table{min-width:980px}.table-details{font-size:11px;color:var(--muted);margin-top:3px}.price-form{display:grid;grid-template-columns:90px 90px 90px minmax(150px,1fr) auto;gap:6px;align-items:end;margin-top:7px}.price-form input{padding:7px 8px;font-size:11px}.price-form label{font-size:10px;color:var(--muted)}
.task-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.task-card{border:1px solid var(--line);border-radius:11px;background:#fbfcfd;padding:12px}.task-card h3{margin-bottom:3px}.task-card form{margin-top:10px}.check-line{display:flex;gap:15px;align-items:center;flex-wrap:wrap;margin:8px 0}.check-line label{display:flex;gap:6px;align-items:center;font-size:12px}.check-line input{width:auto}
.activity-user-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}.activity-user-card{border:1px solid var(--line);border-radius:11px;background:#fbfcfd;padding:11px}.activity-user-card strong{display:block}.activity-user-card .activity-numbers{display:flex;gap:9px;flex-wrap:wrap;margin-top:5px;color:var(--muted);font-size:11px}.activity-user-card .activity-cost{font-size:18px;font-weight:800;color:var(--ink);margin-top:4px}
@media(max-width:1000px){.ai-hub-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.provider-grid,.task-grid{grid-template-columns:1fr}.activity-user-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.price-form{grid-template-columns:repeat(3,minmax(80px,1fr));}.price-form .price-note,.price-form .price-save{grid-column:1/-1}}
@media(max-width:680px){.ai-source-grid{grid-template-columns:1fr}.ai-hub-overview,.activity-user-grid{grid-template-columns:1fr}.inline-secret-form{grid-template-columns:1fr}.candidate-row{align-items:flex-start;flex-direction:column}.candidate-row .btn{width:100%}.price-form{grid-template-columns:1fr}.price-form>*{grid-column:auto!important}}

/* SIGO v0.5 */
.selected-file-card{margin-top:.7rem;border:1px solid #b7d6df;background:#f4fbfd;border-radius:12px;padding:.8rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.selected-file-card[hidden]{display:none}.selected-file-card strong,.selected-file-card small{display:block}.selected-file-card small{color:#5c7180;margin-top:.2rem}.audit-timeline{display:grid;gap:.55rem}.audit-row{display:grid;grid-template-columns:170px minmax(120px,220px) 1fr;gap:1rem;padding:.65rem 0;border-bottom:1px solid #e6edf0}.assistant-shell{max-width:980px;margin-inline:auto;padding:0;overflow:hidden}.assistant-thread{min-height:360px;max-height:62vh;overflow:auto;padding:1.2rem;display:grid;gap:.8rem;background:#f8fafb}.assistant-message{max-width:82%;padding:.8rem 1rem;border-radius:14px;white-space:pre-wrap;line-height:1.45}.assistant-message.user{justify-self:end;background:#dff2f7}.assistant-message.assistant{justify-self:start;background:white;border:1px solid #dfe8ec}.assistant-role{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:#607784;margin-bottom:.25rem;font-weight:700}.assistant-empty{display:grid;place-items:center;align-content:center;min-height:280px;color:#71828d;text-align:center}.assistant-compose{border-top:1px solid #dfe8ec;padding:1rem;background:white}.assistant-compose textarea{width:100%;resize:vertical}.assistant-actions{display:flex;align-items:center;gap:.7rem;margin-top:.6rem}.assistant-actions [data-voice-status]{flex:1}@media(max-width:700px){.audit-row{grid-template-columns:1fr;gap:.15rem}.assistant-message{max-width:95%}}

/* SIGO v0.6 · lista compacta de archivos + visor ------------------------- */
.compact-file-list{display:flex!important;flex-direction:column;gap:4px;padding:8px 10px!important}
.feed-file.compact{width:100%;border:0;border-bottom:1px solid #e8eef1;border-radius:0;background:transparent;text-align:left;cursor:pointer;padding:7px 4px;display:grid;grid-template-columns:42px minmax(0,1fr);gap:9px;align-items:center;color:inherit}
.feed-file.compact:last-child{border-bottom:0}.feed-file.compact:hover{background:#f6fafb}
.feed-file.compact .file-type-icon{width:38px;height:34px}.feed-file.compact strong{font-size:13px}.feed-file.compact small{font-size:10px}
.text-entry-edit{border-top:1px solid #edf0f3;background:#fbfcfd;padding:7px 14px 10px}.text-entry-edit>summary{font-size:11px;color:var(--brand);cursor:pointer;font-weight:700}.text-entry-edit textarea{width:100%;margin-top:8px}
.event-batch-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px 8px}.event-batch-head>div{display:flex;flex-direction:column;gap:2px}.event-batch-head strong{font-size:15px}.batch-caption-edit>summary{cursor:pointer;color:var(--brand);font-size:11px;font-weight:700}.batch-caption-edit[open]{min-width:min(360px,100%)}.batch-caption-edit form{margin-top:7px}.batch-caption-edit input{width:100%}
.event-batch-collapse>summary{list-style:none}.event-batch-collapse>summary::-webkit-details-marker{display:none}.event-batch-summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px}.event-batch-summary>span:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}.event-batch-summary strong{font-size:15px;overflow:hidden;text-overflow:ellipsis}.event-batch-summary:before{content:'›';font-size:22px;color:var(--brand);transition:transform .15s}.event-batch-collapse[open]>.event-batch-summary:before{transform:rotate(90deg)}.event-batch-collapse[open]>.event-batch-summary{border-bottom:1px solid var(--line)}
.media-file-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#fff}
.bulk-files-summary{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;align-items:center;margin:14px 0;padding:18px;border:1px solid #bedbe3;border-radius:14px;background:linear-gradient(135deg,#f4fbfc,#edf5f7)}.bulk-files-icon{width:64px;height:64px;border-radius:14px;background:var(--brand);color:#fff;display:grid;place-items:center;font-size:11px;font-weight:850;letter-spacing:.08em}.bulk-files-summary>div:last-child{display:flex;flex-direction:column;gap:4px}.bulk-files-summary strong{font-size:17px}.bulk-files-summary small{color:var(--muted)}.technical-file-panel{margin-top:10px;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.technical-file-panel>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:12px;padding:14px 16px;font-weight:750;color:#344054}.technical-file-panel>summary::-webkit-details-marker{display:none}.technical-file-panel[open]>summary{border-bottom:1px solid var(--line);background:#f8fafb}.technical-file-panel .gallery-filters{padding:0 14px}.technical-file-panel .media-file-list{border:0;border-radius:0}.institution-item{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.institution-item>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px}.institution-item>summary::-webkit-details-marker{display:none}.institution-item>summary span:first-child{display:flex;flex-direction:column;gap:3px}.institution-item>summary small{color:var(--muted);font-weight:500}.institution-edit{padding:14px;border-top:1px solid var(--line);background:#f8fafb}
.media-file-row{display:grid;grid-template-columns:44px minmax(260px,1fr) minmax(120px,.7fr) auto auto;gap:10px;align-items:center;width:100%;padding:9px 11px;border:0;border-bottom:1px solid #e7edf0;background:#fff;text-align:left;color:inherit;cursor:pointer}
.media-file-row:last-child{border-bottom:0}.media-file-row:hover{background:#f7fafb}.media-file-row[hidden]{display:none}.media-file-row.is-hidden{opacity:.62;background:#fafafa}
.media-file-main{display:flex;flex-direction:column;min-width:0}.media-file-main strong,.media-file-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-file-main small{color:var(--muted);font-size:10px}
.media-file-tags{display:flex;gap:4px;flex-wrap:wrap;font-size:10px;color:var(--brand)}.media-file-open{font-weight:700;color:var(--brand);font-size:12px;white-space:nowrap}
.file-viewer[hidden]{display:none}

.file-viewer{
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:18px;
}

.file-viewer-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,30,.58);
  backdrop-filter:blur(2px);
}

.file-viewer-panel{
  position:relative;
  z-index:1;
  width:min(1320px,96vw);
  max-height:94vh;
  background:#fff;
  border-radius:16px;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.file-viewer-head{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.file-viewer-title{
  min-width:0;
}

.file-viewer-head h2{
  margin:2px 0 0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.file-viewer-body{
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.file-viewer-top{
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  border-bottom:1px solid var(--line);
}

.file-viewer-stage{
  position:relative;
  min-width:0;
  min-height:440px;
  background:#10171b;
  overflow:hidden;
}

.file-viewer-preview{
  width:100%;
  height:100%;
  min-height:440px;
  display:grid;
  place-items:center;
  background:#10171b;
  overflow:auto;
}

.file-viewer-preview img,
.file-viewer-preview video{
  max-width:100%;
  max-height:68vh;
  object-fit:contain;
}

.file-viewer-preview iframe{
  width:100%;
  height:68vh;
  border:0;
  background:#fff;
}

.file-viewer-placeholder{
  color:#d9e2e6;
  text-align:center;
  padding:30px;
}

.file-viewer-meta{
  min-width:0;
  padding:18px;
  overflow-y:auto;
  max-height:68vh;
  background:#fff;
}

.file-viewer-meta input[type=text],
.file-viewer-meta input:not([type]){
  width:100%;
}

.viewer-save-actions{
  align-items:center;
  flex-wrap:wrap;
}

.viewer-nav{
  position:absolute;
  z-index:3;
  top:50%;
  translate:0 -50%;
  width:46px;
  height:64px;
  border:0;
  border-radius:12px;
  background:rgba(255,255,255,.9);
  color:#173d49;
  font-size:38px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 18px rgba(0,0,0,.22);
}

.viewer-nav.previous{left:14px}
.viewer-nav.next{right:14px}
.viewer-nav:hover{background:#fff}
.viewer-nav:disabled{opacity:.24;cursor:default}

.viewer-batch-context{
  border:1px solid #cfe1e7;
  background:#f3fafc;
  border-radius:10px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.viewer-batch-context[hidden]{display:none}


/* Lista inferior */

.file-viewer-filelist{
  flex:0 0 auto;
  min-width:0;
  background:#f8fafb;
}

.file-viewer-filelist-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 14px;
  border-bottom:1px solid var(--line);
  background:#fff;
}

.file-viewer-filelist-head strong{
  font-size:12px;
}

.file-viewer-filelist-head small{
  color:var(--muted);
  font-size:10px;
}

.file-viewer-filelist-scroll{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
  padding:7px;
  max-height:165px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
}

.viewer-file-item{
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  gap:7px;
  align-items:center;

  min-width:0;
  width:100%;

  padding:7px 8px;

  border:1px solid #e3eaed;
  border-radius:8px;

  background:#fff;
  color:inherit;

  text-align:left;
  cursor:pointer;
}

.viewer-file-item:hover{
  background:#f0f6f8;
  border-color:#cbdde2;
}

.viewer-file-item.active{
  background:#dceef3;
  border-color:#99c6d2;
  color:var(--brand-strong);
  box-shadow:inset 3px 0 var(--brand);
}

.viewer-file-number{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-align:right;
}

.viewer-file-item.active .viewer-file-number{
  color:var(--brand);
}

.viewer-file-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:650;
}


/* Responsive */

@media(max-width:900px){

  .file-viewer{
    padding:8px;
  }

  .file-viewer-panel{
    width:98vw;
    max-height:97vh;
  }

  .file-viewer-top{
    grid-template-columns:1fr;
  }

  .file-viewer-stage,
  .file-viewer-preview{
    min-height:320px;
  }

  .file-viewer-meta{
    max-height:none;
  }

  .file-viewer-filelist-scroll{
    grid-template-columns:1fr;
    max-height:150px;
  }

  .viewer-nav{
    width:40px;
    height:54px;
    font-size:32px;
  }

  .viewer-nav.previous{left:8px}
  .viewer-nav.next{right:8px}
}

body.viewer-open{
  overflow:hidden;
}

.patient-summary-card textarea{width:100%;resize:vertical;min-height:110px}
.connection-badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;background:#eef1f3;color:#66747c}.connection-badge.ok{background:#e9f9ee;color:#087a38}.connection-badge.error{background:#fff0ef;color:#a52a22}.connection-badge.warn{background:#fff7df;color:#8a6515}.connection-badge.off{background:#f0f2f3;color:#6f777d}
.connection-inline{font-size:10px;font-weight:700}.connection-inline.ok{color:#087a38}.connection-inline.error{color:#a52a22}.connection-inline.warn{color:#8a6515}.connection-inline.off{color:#747d83}
.metric-profile{font-size:17px!important}.provider-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.provider-url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-profile-selector{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}.ai-profile-choice{border:1px solid var(--line);border-radius:12px;padding:11px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px}.ai-profile-choice.selected{border-color:#9bc8d4;background:#f3fbfd}.ai-profile-choice div{display:flex;flex-direction:column}.ai-profile-choice small{color:var(--muted);margin-top:2px}
.profile-routing{border:1px solid var(--line);border-radius:11px;margin-top:9px;background:#fff}.profile-routing>summary{cursor:pointer;padding:11px 13px;display:flex;justify-content:space-between;gap:12px}.profile-routing>summary span{font-size:11px;color:var(--muted)}.profile-route-list{border-top:1px solid var(--line)}.profile-route-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(280px,1.2fr) auto auto;gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid #edf0f3}.profile-route-row:last-child{border-bottom:0}.profile-route-row>div{display:flex;flex-direction:column}.profile-route-row small{color:var(--muted)}
.log-batch-detail{margin-top:4px}.log-batch-detail>summary{cursor:pointer;color:var(--brand);font-size:11px}
@media(max-width:850px){.file-viewer-body{grid-template-columns:1fr}.file-viewer-preview{min-height:300px}.viewer-nav{width:40px;height:54px;font-size:32px}.viewer-nav.previous{left:8px}.viewer-nav.next{right:8px}.event-batch-head{align-items:flex-start;flex-direction:column}.media-file-row{grid-template-columns:42px minmax(0,1fr) auto}.media-file-tags{grid-column:2}.media-file-open{display:none}.ai-profile-selector{grid-template-columns:1fr}.profile-route-row{grid-template-columns:1fr}}

/* SIGO alpha.11 · imágenes clave, pantalla completa y trabajos ----------- */
.key-image-filter{color:#876500}.key-image-badge{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff5c2;color:#9a7100;font-size:18px}.media-file-row.is-key-image{box-shadow:inset 3px 0 #e3b51b}.key-image-toggle{padding:11px 12px;border:1px solid #ead996;border-radius:10px;background:#fffdf3}.key-image-star{color:#d39b00;font-size:20px;line-height:1}
.institution-logo-preview{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff}.institution-logo-preview img{width:84px;height:64px;object-fit:contain}.institution-logo-preview span{font-size:12px;color:var(--muted)}
.file-viewer-panel:fullscreen{width:100vw;height:100vh;max-height:none;border-radius:0;display:flex;flex-direction:column}.file-viewer-panel:fullscreen .file-viewer-body{flex:1;min-height:0}.file-viewer-panel:fullscreen .file-viewer-stage,.file-viewer-panel:fullscreen .file-viewer-preview{height:100%;min-height:0}.file-viewer-panel:fullscreen .file-viewer-preview img,.file-viewer-panel:fullscreen .file-viewer-preview video{max-height:calc(100vh - 78px)}.file-viewer-panel:fullscreen .file-viewer-preview iframe{height:calc(100vh - 78px)}
.prefetch-popup{position:fixed;right:20px;bottom:20px;z-index:1200;width:min(390px,calc(100vw - 28px));padding:15px;border:1px solid #b9d6df;border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(17,41,52,.24)}.prefetch-popup[hidden]{display:none}.prefetch-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.prefetch-head>div{display:flex;flex-direction:column}.prefetch-head span{font-size:10px;font-weight:850;letter-spacing:.09em;color:var(--muted)}.prefetch-head a{font-size:12px;font-weight:700}.prefetch-current{font-size:12px;color:var(--muted);margin:9px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prefetch-progress{height:8px;border-radius:999px;background:#e7eef1;overflow:hidden}.prefetch-progress span{display:block;width:0;height:100%;background:var(--brand);transition:width .25s}.prefetch-count{font-size:11px;color:var(--muted);margin-top:6px}.prefetch-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}
.jobs-list{display:flex;flex-direction:column;gap:12px}.job-card{display:grid;grid-template-columns:minmax(180px,1fr) 2fr auto;gap:16px;align-items:center}.job-progress{height:8px;border-radius:999px;background:#e7eef1;overflow:hidden}.job-progress span{display:block;height:100%;background:var(--brand)}
@media(max-width:680px){.file-viewer-head{align-items:stretch;flex-direction:column}.file-viewer-head .actions{width:100%}.file-viewer-head .actions .btn{flex:1}.prefetch-popup{right:14px;bottom:14px}.job-card{grid-template-columns:1fr}.job-card .right{text-align:left}}

#classification [hidden]{display:none!important}.summary-count{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}#classification form{margin-top:16px}fieldset{border:1px solid var(--line);border-radius:10px;padding:12px;min-width:0}progress{accent-color:var(--brand)}
.check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px;margin-top:8px}.check-grid .check-line{margin:0}.check-grid input{width:auto}
@media(max-width:680px){.check-grid{grid-template-columns:1fr}}

/* DICOM viewer v1 */
.dicom-shell{display:grid;gap:14px}.dicom-topbar{display:flex;justify-content:space-between;align-items:center}.dicom-layout{display:grid;grid-template-columns:260px minmax(0,1fr) 300px;gap:12px;min-height:72vh}.dicom-series-list,.dicom-meta,.dicom-main{background:var(--card,#fff);border:1px solid var(--border,#dce3ea);border-radius:14px;padding:12px}.dicom-series-list{overflow:auto}.dicom-series-item{display:grid;gap:4px;padding:10px;border-radius:10px;text-decoration:none;color:inherit;border:1px solid transparent}.dicom-series-item:hover,.dicom-series-item.active{background:#eef6f8;border-color:#b9d6dd}.dicom-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.dicom-toolbar input{width:88px}.dicom-stage{height:62vh;background:#050708;border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab}.dicom-stage:active{cursor:grabbing}.dicom-image-wrap{transform-origin:center center;will-change:transform}.dicom-image-wrap img{display:block;max-width:100%;max-height:60vh;object-fit:contain;user-select:none;pointer-events:none}.dicom-actions{display:flex;gap:16px;flex-wrap:wrap;margin-top:12px}.dicom-actions form{display:grid;gap:4px}.dicom-meta dl{display:grid;grid-template-columns:100px 1fr;gap:7px 9px;font-size:.9rem}.dicom-meta dt{font-weight:700;color:var(--muted,#5d6873)}.dicom-meta dd{margin:0;overflow-wrap:anywhere}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.75rem}@media(max-width:1050px){.dicom-layout{grid-template-columns:1fr}.dicom-series-list{max-height:220px}.dicom-meta{order:3}.dicom-stage{height:55vh}}

/* SIGO_EVENT_VISUAL_DOMAINS_V1
   Acentos por dominio clínico.
   Se evita colorear completamente las tarjetas para mantener
   una interfaz clínica sobria.
*/

.event-domain-card {
  position: relative;
  overflow: hidden;
  border-left-width: 5px !important;
  border-left-style: solid !important;
}

.event-domain-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  opacity: .12;
  pointer-events: none;
}

/* Clasificación */
.event-domain-classification {
  border-left-color: #7666a8 !important;
}

.event-domain-classification::before {
  background: #7666a8;
}

.event-domain-classification .eyebrow {
  color: #65568f;
}

/* Equipo */
.event-domain-team {
  border-left-color: #3b78a8 !important;
}

.event-domain-team::before {
  background: #3b78a8;
}

.event-domain-team .eyebrow {
  color: #32698f;
}

/* Materiales */
.event-domain-materials {
  border-left-color: #258574 !important;
}

.event-domain-materials::before {
  background: #258574;
}

.event-domain-materials .eyebrow {
  color: #217363;
}

/* Contenido / archivos */
.event-domain-files {
  border-left-color: #b67a28 !important;
}

.event-domain-files::before {
  background: #b67a28;
}

.event-domain-files .eyebrow {
  color: #94621f;
}

/* Contadores más reconocibles */
.event-domain-classification .badge,
.event-domain-team .badge,
.event-domain-materials .badge,
.event-domain-files .badge {
  font-weight: 700;
}

/* Estado de subida */
.sigo-background-upload-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(37, 133, 116, .07);
  border: 1px solid rgba(37, 133, 116, .18);
  font-size: .92rem;
}

.sigo-background-upload-note strong {
  display: block;
  margin-bottom: 2px;
}


/* SIGO_EVENT_VISUAL_DOMAINS_V2 */

/*
   El cuerpo sigue blanco.
   El dominio se identifica por:
   - borde izquierdo grueso
   - halo superior suave
   - eyebrow coloreado
*/

.event-domain-card {
  border-left-width: 7px !important;
  border-left-style: solid !important;
  position: relative;
}

.event-domain-card.event-domain-classification {
  border-left-color: #7661a8 !important;
  box-shadow:
    inset 0 4px 0 rgba(118,97,168,.13),
    0 1px 3px rgba(0,0,0,.04);
}

.event-domain-card.event-domain-team {
  border-left-color: #397aa9 !important;
  box-shadow:
    inset 0 4px 0 rgba(57,122,169,.13),
    0 1px 3px rgba(0,0,0,.04);
}

.event-domain-card.event-domain-materials {
  border-left-color: #2e8974 !important;
  box-shadow:
    inset 0 4px 0 rgba(46,137,116,.13),
    0 1px 3px rgba(0,0,0,.04);
}

.event-domain-card.event-domain-files {
  border-left-color: #b97b2e !important;
  box-shadow:
    inset 0 4px 0 rgba(185,123,46,.13),
    0 1px 3px rgba(0,0,0,.04);
}

.event-domain-classification > .eyebrow,
.event-domain-classification .eyebrow {
  color: #665192 !important;
  font-weight: 800;
}

.event-domain-team > .eyebrow,
.event-domain-team .eyebrow {
  color: #316d98 !important;
  font-weight: 800;
}

.event-domain-materials > .eyebrow,
.event-domain-materials .eyebrow {
  color: #257562 !important;
  font-weight: 800;
}

.event-domain-files > .eyebrow,
.event-domain-files .eyebrow {
  color: #9a6423 !important;
  font-weight: 800;
}

/* MULTI EXPORT */

.patient-export-selection {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.patient-export-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border, #d8e0e6);
  border-radius: 10px;
  background: #fff;
}

.patient-export-row:hover {
  background: rgba(24,112,130,.035);
}

.patient-export-progress {
  margin-top: 18px;
}

.patient-export-progress progress {
  width: 100%;
  height: 14px;
}


/* SIGO_LARGE_CHECKBOXES_V1 */

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  cursor: pointer;
  vertical-align: middle;
}

.check-line {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.patient-export-row {
  min-height: 58px;
}

.patient-export-row > input[type="checkbox"] {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
}

/* fila seleccionada mucho más evidente */
.patient-export-row:has(input[type="checkbox"]:checked) {
  border-color: rgba(20, 112, 130, .55);
  background: rgba(20, 112, 130, .07);
  box-shadow: inset 4px 0 0 rgba(20,112,130,.75);
}


/* SIGO_GALLERY_BATCH_GROUPING_V1 */

.sigo-file-batch-label {
  margin: 16px 0 8px;
  padding: 11px 14px;
  border-left: 5px solid #b97b2e;
  border-radius: 8px;
  background: rgba(185,123,46,.08);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.sigo-file-batch-member {
  margin-left: 12px;
  border-left: 3px solid rgba(185,123,46,.28) !important;
}


/* SIGO_PATIENT_LIST_MULTIEXPORT_V1 */

.patient-multiexport-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.patient-multiexport-toolbar input[type="checkbox"],
table input[type="checkbox"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
}

.patient-export-progress {
  margin: 8px 0 16px;
}

.patient-export-progress progress {
  width: 100%;
  height: 14px;
}

tbody tr:has(
  input[data-patient-export-check]:checked
) {
  background: rgba(20,112,130,.07);
}


/* SIGO_CLICKABLE_ROWS_V1 */

.sigo-clickable-row {
  cursor: pointer;
  transition:
    background-color .12s ease,
    box-shadow .12s ease;
}

.sigo-clickable-row:hover {
  background:
    rgba(20, 112, 130, .055) !important;
}

.sigo-clickable-row:focus-visible {
  outline:
    3px solid rgba(20, 112, 130, .30);

  outline-offset:
    -3px;
}

.sigo-clickable-row:active {
  background:
    rgba(20, 112, 130, .10) !important;
}

/*
  Controles dentro de la fila siguen sintiéndose independientes.
*/

.sigo-clickable-row button,
.sigo-clickable-row input,
.sigo-clickable-row select,
.sigo-clickable-row textarea,
.sigo-clickable-row a {
  cursor: pointer;
}



/* SIGO_FILE_ADMIN_V2 */

.file-admin-group {
  border-left: 4px solid #1b7889;
}

.file-admin-list {
  margin-top: 12px;
}

.manage-file-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;

  min-height: 58px;
  margin-top: 7px;
  padding: 9px 11px;

  border: 1px solid #d9e2e6;
  border-radius: 9px;

  background: #fff;
}

.manage-file-row:hover {
  background: #f7fbfc;
}

.manage-file-row:has(.file-select:checked) {
  border-color: #1b7889;
  background: #eef8fa;
}

.file-select {
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.group-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;

  padding-top: 12px;
  margin-top: 12px;

  border-top: 1px solid #e2e8eb;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.file-admin-destination {
  display: grid;
  grid-template-columns:
    minmax(260px,1fr)
    minmax(260px,1fr);

  gap: 16px;
  margin-top: 15px;
}

.file-admin-checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.file-admin-checkline input[type="checkbox"] {
  width: 24px;
  height: 24px;
}

.btn.danger {
  background: #a43d3d;
  border-color: #a43d3d;
  color: #fff;
}

.btn.danger:hover {
  background: #8b3030;
  border-color: #8b3030;
}

.btn.compact {
  padding: 7px 10px;
}

@media (max-width: 800px) {

  .file-admin-destination {
    grid-template-columns: 1fr;
  }

  .manage-file-row {
    grid-template-columns: 34px minmax(0,1fr);
  }

  .manage-file-row form {
    grid-column: 2;
  }
}



/* ====================================================================
   SIGO_EVENT_SUMMARY_V1
   ==================================================================== */

.event-summary-page {
  display: grid;
  gap: 16px;
}

.event-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.event-summary-header h1 {
  margin-bottom: 4px;
}

.event-summary-section {
  padding: 18px;
}

.event-summary-section > h2 {
  margin-top: 4px;
}


/* --------------------------------------------------------------------
   RESUMEN
   -------------------------------------------------------------------- */

.period-summary-cards {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.summary-stat {
  border: 1px solid #dce5e9;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafb;
}

.summary-stat span {
  display: block;
  color: #617282;
  font-size: .86rem;
}

.summary-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 1.6rem;
}


.summary-procedure-counts {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 24px;
  margin-top: 14px;
}

.summary-procedure-counts > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f3;
}


/* --------------------------------------------------------------------
   FILTROS
   -------------------------------------------------------------------- */

.event-summary-filters {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.period-mode-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.filter-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.event-summary-filters label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.event-summary-filters input[type="date"],
.event-summary-filters input[type="month"],
.event-summary-filters select {
  width: 100%;
}

.event-summary-filters small {
  display: block;
  margin-top: 5px;
  color: #71808c;
}


.multi-filter {
  border: 1px solid #dce5e9;
  border-radius: 10px;
  overflow: hidden;
}

.multi-filter summary {
  cursor: pointer;
  padding: 11px 13px;
  font-weight: 650;
  background: #f6f9fa;
}

.multi-filter-body {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 12px;
}

.multi-check {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #e1e8eb;
  border-radius: 8px;
  background: white;
  font-weight: 500 !important;
}

.multi-check input,
.show-other-events input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.show-other-events {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #dae4e8;
  border-radius: 9px;
  background: #f8fafb;
}


/* --------------------------------------------------------------------
   CALENDARIO
   -------------------------------------------------------------------- */

.event-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}


.procedure-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.legend-item,
.legend-urgent {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 650;
  border: 1px solid transparent;
}


.calendar-weekdays,
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays {
  text-align: center;
  font-size: .8rem;
  font-weight: 650;
  color: #657583;
}

.calendar-weekdays span {
  padding: 7px;
}


.calendar-day {
  min-height: 145px;
  border-right: 1px solid #dae3e7;
  border-bottom: 1px solid #dae3e7;
  padding: 7px;
  background: white;
}

.calendar-week:first-of-type .calendar-day {
  border-top: 1px solid #dae3e7;
}

.calendar-day:first-child {
  border-left: 1px solid #dae3e7;
}

.calendar-day-outside {
  opacity: .4;
  background: #f7f9fa;
}

.calendar-day-number {
  font-weight: 650;
  font-size: .82rem;
  margin-bottom: 6px;
}

.calendar-day-events {
  display: grid;
  gap: 5px;
}


.calendar-event {
  display: block;
  position: relative;
  padding: 7px 7px 7px 9px;
  border-radius: 7px;
  border-left: 4px solid;
  text-decoration: none;
  color: #172b37;
  font-size: .75rem;
  line-height: 1.25;
}

.calendar-event:hover {
  filter: brightness(.97);
}

.calendar-event strong,
.calendar-event span,
.calendar-event em {
  display: block;
}

.calendar-event span {
  margin-top: 2px;
  opacity: .8;
}

.calendar-event em {
  margin-top: 4px;
  font-style: normal;
  font-weight: 750;
  color: #a54800;
}


/* COLORES DE PROCEDIMIENTO */

.procedure-angiography {
  --procedure-color: #3178a4;
  --procedure-bg: #eaf4fa;
}

.procedure-aneurysm {
  --procedure-color: #7356a5;
  --procedure-bg: #f1edf8;
}

.procedure-thrombectomy {
  --procedure-color: #a94442;
  --procedure-bg: #faeded;
}

.procedure-mav {
  --procedure-color: #9a4776;
  --procedure-bg: #faedf5;
}

.procedure-angioplasty {
  --procedure-color: #3f7f5a;
  --procedure-bg: #eaf6ee;
}

.procedure-vertebroplasty {
  --procedure-color: #98672f;
  --procedure-bg: #f8f0e5;
}

.procedure-other {
  --procedure-color: #607783;
  --procedure-bg: #eef3f5;
}


/* aplicar variable a calendario/lista/leyenda */

.calendar-event.procedure-angiography,
.calendar-event.procedure-aneurysm,
.calendar-event.procedure-thrombectomy,
.calendar-event.procedure-mav,
.calendar-event.procedure-angioplasty,
.calendar-event.procedure-vertebroplasty,
.calendar-event.procedure-other,
.legend-item,
.period-procedure-row {
  border-color: var(--procedure-color);
  background: var(--procedure-bg);
}


/* urgente NO reemplaza color de procedimiento */

.calendar-event-urgent::after {
  content: "!";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d96616;
  color: white;
  font-size: .7rem;
  font-weight: 800;
}

.legend-urgent {
  border-color: #e5a069;
  background: #fff1e6;
  color: #9c4506;
}


/* --------------------------------------------------------------------
   RANGO DE FECHAS
   -------------------------------------------------------------------- */

.range-calendar {
  display: grid;
  gap: 8px;
}

.range-calendar-day {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e5ebee;
}

.range-calendar-date {
  font-weight: 700;
}

.range-calendar-events {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
}


/* --------------------------------------------------------------------
   PACIENTES
   -------------------------------------------------------------------- */

.period-patients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 13px;
}

.period-patient-column {
  border: 1px solid #dce5e9;
  border-radius: 10px;
  overflow: hidden;
}

.patient-state-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f7f9fa;
  border-bottom: 1px solid #e2e8eb;
}

.patient-state-title h3 {
  margin: 0;
  flex: 1;
}

.patient-state-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.patient-state-dot.hospitalized {
  background: #d66b25;
}

.patient-state-dot.discharged {
  background: #47866a;
}

.period-patient-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f3;
  text-decoration: none;
  color: inherit;
}

.period-patient-row:last-child {
  border-bottom: 0;
}

.period-patient-row:hover {
  background: #f6fafb;
}


/* --------------------------------------------------------------------
   PROCEDIMIENTOS DEL PERÍODO
   -------------------------------------------------------------------- */

.period-procedure-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.period-procedure-row {
  display: grid;
  grid-template-columns:
    115px
    minmax(260px, 1fr)
    minmax(160px, .6fr)
    auto;
  align-items: center;
  gap: 14px;

  padding: 11px 12px;

  border-left: 5px solid
    var(--procedure-color);

  border-top: 1px solid #e1e7ea;
  border-right: 1px solid #e1e7ea;
  border-bottom: 1px solid #e1e7ea;

  border-radius: 8px;

  text-decoration: none;
  color: inherit;
}

.period-procedure-row:hover {
  filter: brightness(.98);
}

.procedure-date span,
.procedure-main span,
.procedure-main small {
  display: block;
}

.procedure-date span,
.procedure-main small {
  color: #657583;
  font-size: .8rem;
}

.procedure-main > strong {
  font-size: .96rem;
}

.procedure-flags {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.urgency-chip {
  background: #fff0e4;
  color: #9f4708;
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 700;
  font-size: .76rem;
}

.status-chip {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .76rem;
}


.empty-state.compact {
  margin: 12px;
}


/* --------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------- */

@media (max-width: 900px) {

  .period-mode-grid,
  .filter-grid,
  .period-patients-grid {
    grid-template-columns: 1fr;
  }

  .period-procedure-row {
    grid-template-columns: 1fr;
  }

  .procedure-flags {
    justify-content: flex-start;
  }

  .clinical-calendar {
    overflow-x: auto;
  }

  .calendar-weekdays,
  .calendar-week {
    min-width: 850px;
  }

}


/* ====================================================================
   SIGO_PATIENT_PRESENTATION_V1
   ==================================================================== */

.patient-presentation {
  display: grid;
  gap: 16px;
}

.presentation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.presentation-section {
  padding: 18px;
}

.presentation-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.presentation-summary {
  font-size: 1.04rem;
  line-height: 1.55;
  white-space: pre-wrap;
}


/* imágenes */

.presentation-image-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.presentation-image-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid #dde5e8;
  border-radius: 10px;
  background: #fff;
}

.presentation-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #101416;
}

.presentation-image-placeholder {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #edf3f5;
  font-size: 2.4rem;
}

.presentation-image-card figcaption {
  padding: 10px;
}

.presentation-image-card figcaption strong,
.presentation-image-card figcaption span,
.presentation-image-card figcaption small {
  display: block;
}

.presentation-image-card figcaption span,
.presentation-image-card figcaption small {
  margin-top: 3px;
  color: #657581;
}


/* timeline */

.presentation-timeline {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.presentation-timeline-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 14px;

  border: 1px solid #dde5e8;
  border-radius: 9px;

  padding: 11px 12px;

  text-decoration: none;
  color: inherit;
}

.presentation-timeline-row:hover {
  background: #f7fafb;
}

.presentation-date strong,
.presentation-date span,
.presentation-event strong,
.presentation-event span {
  display: block;
}

.presentation-date span,
.presentation-event span {
  color: #687984;
  font-size: .84rem;
}


/* videos */

.presentation-video-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.presentation-video-card {
  overflow: hidden;
  border: 1px solid #dde5e8;
  border-radius: 10px;
  background: #fff;
}

.presentation-video-card video {
  display: block;
  width: 100%;
  max-height: 390px;
  background: #000;
}

.presentation-video-caption {
  padding: 10px;
}

.presentation-video-caption strong,
.presentation-video-caption span,
.presentation-video-caption small {
  display: block;
}

.presentation-video-caption span,
.presentation-video-caption small {
  margin-top: 3px;
  color: #687984;
}


@media (max-width: 700px) {

  .presentation-header {
    display: block;
  }

  .presentation-header .actions {
    margin-top: 12px;
  }

  .presentation-timeline-row {
    grid-template-columns: 1fr;
  }

}


/* SIGO_PATIENT_LAST_PROCEDURE_V1 */

.patient-last-procedure-header {
  min-width: 175px;
}

.patient-last-procedure-sort {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-align: left;
}

.patient-last-procedure-sort:hover {
  text-decoration: underline;
}

.patient-last-procedure-sort:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 3px;
}

.patient-last-procedure-sort-indicator {
  display: inline-block;
  min-width: 12px;
  font-size: 12px;
  opacity: .7;
}

.patient-last-procedure-cell strong {
  display: block;
  font-weight: 700;
}

.patient-last-procedure-center {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.patient-last-procedure-empty {
  color: var(--muted);
}


/* ==========================================================
   SIGO_EVENT_TEAM_MATERIALS_COMPACT_V1

   Escritorio:
   Equipo clínico | Materiales

   Móvil:
   se apilan nuevamente.
   ========================================================== */

.event-procedure-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.event-procedure-grid > .card {
  margin: 0;
  height: 100%;
  padding: 18px 20px;
}


/* ----------------------------------------------------------
   CABECERAS MÁS COMPACTAS
   ---------------------------------------------------------- */

#equipo .section-head,
#materiales .section-head {
  margin-bottom: 10px;
}

#equipo .section-head h2,
#materiales .section-head h2 {
  margin-bottom: 3px;
}

#equipo .section-head .muted,
#materiales .section-head .muted {
  margin-top: 2px;
}


/* ----------------------------------------------------------
   EQUIPO CLÍNICO
   ---------------------------------------------------------- */

#equipo .event-team-list {
  margin-top: 10px;
}

#equipo .event-team-member {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 10px;

  min-height: 0;
  padding: 9px 12px;
}


/*
  El primer div contiene actualmente:
  Nombre
  Rol

  Los ponemos en la misma línea.
*/
#equipo .event-team-member > div:first-child {
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(110px, .9fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#equipo .event-team-member > div:first-child strong {
  display: block;
  margin: 0;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#equipo .event-team-member > div:first-child span {
  display: block;
  margin: 0;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#equipo .event-team-flags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

#equipo .event-team-flags .badge,
#equipo .event-team-member .badge {
  margin: 0;
  white-space: nowrap;
}

#equipo .event-team-add {
  margin-top: 12px;
}


/* ----------------------------------------------------------
   MATERIALES
   ---------------------------------------------------------- */

#materiales .field {
  margin-top: 8px;
}

#materiales textarea[name="materials_text"] {
  width: 100%;
  min-height: 150px;
  resize: vertical;
}

#materiales .autosave-indicator {
  margin-top: 5px;
}


/* ----------------------------------------------------------
   TABLET / MOBILE
   ---------------------------------------------------------- */

@media (max-width: 1050px) {
  .event-procedure-grid {
    grid-template-columns: 1fr;
  }

  .event-procedure-grid > .card {
    height: auto;
  }
}

@media (max-width: 650px) {
  #equipo .event-team-member {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  #equipo .event-team-member > div:first-child {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  #equipo .event-team-member > div:first-child strong,
  #equipo .event-team-member > div:first-child span {
    white-space: normal;
  }
}


/* SIGO_CLINICAL_COMPACT_LAYOUT_V2 */

.event-procedure-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
  align-items:stretch;
  margin-bottom:16px;
}

.event-procedure-grid > .card{
  margin:0;
  height:100%;
}

#equipo .event-team-member{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:8px 12px;
}

#equipo .event-team-member > div:first-child{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(100px,.8fr);
  gap:10px;
  align-items:center;
}

#equipo .event-team-member > div:first-child strong,
#equipo .event-team-member > div:first-child span{
  margin:0;
}

#equipo .event-team-flags{
  margin:0;
  display:flex;
  align-items:center;
  gap:6px;
}

#materiales textarea[name="materials_text"]{
  min-height:145px;
}

[data-global-autosave-status]{
  min-height:18px;
}

@media(max-width:1050px){
  .event-procedure-grid{
    grid-template-columns:1fr;
  }

  .event-procedure-grid > .card{
    height:auto;
  }
}

@media(max-width:650px){
  #equipo .event-team-member > div:first-child{
    grid-template-columns:1fr;
    gap:2px;
  }
}

/* SIGO_PARTICIPANT_MANAGEMENT_V1 */

.participant-manage-row{
  position:relative;
  grid-template-columns:
    minmax(0,1fr)
    auto
    34px !important;
}

.participant-actions{
  position:relative;
}

.participant-actions > summary{
  list-style:none;
}

.participant-actions > summary::-webkit-details-marker{
  display:none;
}

.participant-menu-button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:8px;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  color:var(--text);
  user-select:none;
}

.participant-menu-button:hover{
  background:rgba(0,0,0,.05);
}

.participant-action-panel{
  position:absolute;
  z-index:30;
  right:0;
  top:38px;
  width:min(360px,calc(100vw - 48px));
  padding:14px;
  background:var(--surface,#fff);
  border:1px solid var(--border,#d7dee7);
  border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.14);
}

.participant-delete{
  margin-top:8px;
}

@media(max-width:650px){
  .participant-action-panel{
    position:fixed;
    left:16px;
    right:16px;
    top:auto;
    bottom:16px;
    width:auto;
  }
}

/* SIGO_GALLERY_ACTIONS_COMPACT_V1 */

.gallery-actions-overflow{
  position:relative;
  display:inline-block;
}

.gallery-actions-overflow > summary{
  list-style:none;
}

.gallery-actions-overflow > summary::-webkit-details-marker{
  display:none;
}

.gallery-actions-more{
  min-width:38px;
  padding-left:11px;
  padding-right:11px;
  font-size:20px;
  line-height:1;
}

.gallery-actions-menu{
  position:absolute;
  z-index:40;
  right:0;
  top:calc(100% + 6px);
  min-width:190px;
  padding:7px;
  border:1px solid var(--border,#d7dee7);
  border-radius:10px;
  background:var(--surface,#fff);
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}

.gallery-actions-menu .btn{
  display:flex;
  width:100%;
  justify-content:flex-start;
  white-space:nowrap;
}


/* SIGO_PARTICIPANT_MENU_OVERFLOW_FIX_V1 */

/*
  El listado de integrantes antes recortaba el menú flotante ⋮.
  Permitimos que el panel salga fuera de la caja sin alterar
  el tamaño de las filas.
*/
#equipo,
#equipo .event-team-list,
#equipo .event-team-member,
#equipo .participant-manage-row,
#equipo .participant-actions {
  overflow: visible !important;
}

#equipo {
  position: relative;
  z-index: 2;
}

/*
  Cuando un menú está abierto, esa fila queda por encima
  del resto de los integrantes.
*/
#equipo .participant-manage-row {
  position: relative;
  z-index: 1;
}

#equipo .participant-manage-row:has(
  .participant-actions[open]
) {
  z-index: 80;
}

#equipo .participant-actions {
  position: relative;
  z-index: 90;
}

#equipo .participant-actions[open] {
  z-index: 100;
}

#equipo .participant-action-panel {
  z-index: 110;
  right: 0;
  top: calc(100% + 6px);

  width: min(390px, calc(100vw - 48px));
  max-height: min(540px, calc(100vh - 80px));

  overflow-y: auto !important;
  overflow-x: hidden !important;

  background: var(--surface, #fff);
  border: 1px solid var(--border, #d7dee7);
  border-radius: 12px;

  box-shadow:
    0 16px 42px rgba(0, 0, 0, .18);
}

/*
  El botón ⋮ debe verse siempre como una acción,
  no sólo al hacer hover.
*/
#equipo .participant-menu-button {
  background: transparent;
  border: 0;
  color: var(--text, #172033);
  opacity: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border-radius: 9px;
  cursor: pointer;
}

#equipo .participant-menu-button:hover,
#equipo .participant-actions[open]
  > .participant-menu-button {
  background: rgba(0, 0, 0, .055);
}

/*
  Evitar que la tarjeta hermana (Materiales) tape el popup
  cuando ambas están en el grid de escritorio.
*/
.event-procedure-grid {
  overflow: visible !important;
}

.event-procedure-grid > .card {
  overflow: visible;
}

/*
  En móvil usamos el panel como hoja inferior para que
  nunca quede fuera de pantalla.
*/
@media (max-width: 650px) {
  #equipo .participant-action-panel {
    position: fixed;

    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;

    width: auto;
    max-height: calc(100vh - 40px);

    z-index: 1000;
  }
}


/* SIGO_CALENDAR_PENDING_FILTER_V1 */

.calendar-memory-filters{
  display:grid;
  grid-template-columns:
    minmax(270px,1.25fr)
    minmax(210px,.9fr)
    minmax(160px,.65fr);
  gap:12px;
  margin:14px 0;
  align-items:end;
}

.calendar-pending-toggle{
  min-height:58px;

  display:flex;
  align-items:center;
  gap:12px;

  padding:10px 14px;

  border:1px solid
    var(--border,#d7dee7);

  border-radius:10px;

  background:
    rgba(245,158,11,.06);

  cursor:pointer;
}

.calendar-pending-toggle input{
  width:20px;
  height:20px;
  margin:0;
}

.calendar-pending-toggle span{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.calendar-pending-toggle small{
  color:var(--muted,#64748b);
}

.calendar-pending-toggle:has(
  input:checked
){
  border-color:#d97706;
  background:
    rgba(245,158,11,.14);
}

@media(max-width:800px){
  .calendar-memory-filters{
    grid-template-columns:1fr;
  }
}


/* SIGO_EVENT_FILTERS_MULTI_V3 */

.event-filter-date-grid {
  display:grid;
  grid-template-columns:
    repeat(3,minmax(180px,1fr));
  gap:14px;
}

.event-center-urgency-grid {
  display:grid;
  grid-template-columns:
    minmax(0,2fr)
    minmax(220px,1fr);
  gap:18px;
  padding:14px;
}

.event-center-multiselect {
  display:grid;
  grid-template-columns:
    repeat(auto-fit,minmax(230px,1fr));
  gap:8px;
  margin-top:8px;
  margin-bottom:8px;
}

.event-filter-secondary-grid {
  display:grid;
  grid-template-columns:
    repeat(2,minmax(180px,1fr));
  gap:14px;
}

.event-filter-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

@media (max-width:900px) {

  .event-filter-date-grid,
  .event-center-urgency-grid,
  .event-filter-secondary-grid {
    grid-template-columns:1fr;
  }

}



/* SIGO_PATIENT_UX_SUMMARY_V3 */

.sigo-patient-primary-actions-v3 {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.sigo-patient-primary-actions-v3
.sigo-canonical-menu-v4 {
  margin:0;
}

.sigo-patient-visibility-dialog-v3 {
  width:min(960px,94vw);
  max-height:90vh;
  overflow:auto;
  border:0;
  border-radius:16px;
  padding:18px;
  box-shadow:
    0 24px 72px rgba(15,35,45,.30);
}

.sigo-patient-visibility-dialog-v3::backdrop {
  background:
    rgba(15,35,45,.42);
}

.sigo-patient-visibility-dialog-head-v3 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:14px;
}

.sigo-patient-visibility-dialog-v3
#patient-visibility {
  margin:0;
  box-shadow:none;
}

.sigo-generated-at-v3 {
  color:#687b86;
  font-size:.82rem;
  margin-bottom:14px;
}

.sigo-patient-event-summary {
  border:
    1px solid #dae4e8;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  margin-top:10px;
}

.sigo-patient-event-summary > summary {
  cursor:pointer;
  padding:13px 15px;
  background:#f7fafb;
  user-select:none;
}

.sigo-patient-event-summary[open] > summary {
  border-bottom:
    1px solid #e2e9ed;
}

.sigo-patient-event-body {
  padding:15px;
}

.sigo-patient-event-section {
  padding-top:14px;
  margin-top:14px;
  border-top:
    1px solid #edf1f3;
}

.sigo-patient-event-section h4 {
  margin:
    4px 0 9px;
}

.sigo-patient-event-line {
  padding:4px 0;
}

.sigo-patient-dicom-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
}

.sigo-patient-event-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}

@media (max-width:720px) {

  .sigo-patient-dicom-row {
    flex-direction:column;
    align-items:flex-start;
  }

}

@media print {

  .sigo-generated-at-v3 {
    display:block !important;
  }

  .sigo-patient-event-summary {
    break-inside:avoid;
  }

}



/* SIGO_PATIENT_HEADER_UX_V4 */

.page-head
.sigo-patient-header-actions-v4 {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-direction:row;
  flex-wrap:nowrap;
  gap:8px;
}

.page-head
.sigo-patient-header-actions-v4
.sigo-canonical-menu-v4 {
  display:block;
  position:relative;
  margin:0;
  flex:0 0 auto;
}

.page-head
.sigo-patient-header-actions-v4
> a {
  margin:0;
  flex:0 0 auto;
}

.page-head
.sigo-patient-header-actions-v4
.sigo-canonical-menu-v4
summary {
  margin:0;
}

.sigo-patient-visibility-dialog-v4 {
  width:min(980px,94vw);
  max-height:90vh;
  overflow:auto;
  border:0;
  border-radius:16px;
  padding:18px;
  box-shadow:
    0 24px 72px rgba(15,35,45,.30);
}

.sigo-patient-visibility-dialog-v4::backdrop {
  background:
    rgba(15,35,45,.42);
}

.sigo-patient-visibility-dialog-head-v4 {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.sigo-patient-visibility-dialog-v4
#patient-visibility {
  margin:0;
  box-shadow:none;
}

@media (max-width:700px) {

  .page-head
  .sigo-patient-header-actions-v4 {
    flex-wrap:wrap;
  }

}



/* SIGO_ACTIONS_GALLERY_SHARE_V5 */

.sigo-primary-actions-v5 {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}


/* -----------------------------------------------------------
   MENÚ ⋮ V5
----------------------------------------------------------- */

.sigo-canonical-menu-v5 {
  position:relative;
  flex:0 0 auto;
}

.sigo-canonical-menu-v5 > summary {
  list-style:none;
  cursor:pointer;

  width:44px;
  height:42px;

  display:flex;
  align-items:center;
  justify-content:center;

  border:
    1px solid #d7e0e5;

  border-radius:12px;

  background:#fff;

  font-size:23px;
  line-height:1;

  user-select:none;
}

.sigo-canonical-menu-v5 > summary::-webkit-details-marker {
  display:none;
}

.sigo-canonical-panel-v5 {
  position:absolute;

  top:48px;
  right:0;

  z-index:120;

  min-width:290px;

  padding:7px;

  border:
    1px solid #dbe4e8;

  border-radius:13px;

  background:#fff;

  box-shadow:
    0 18px 42px
    rgba(20,35,45,.15);
}

.sigo-canonical-panel-v5 a,
.sigo-canonical-panel-v5 button {
  width:100%;

  display:block;

  border:0;
  border-radius:9px;

  padding:10px 11px;

  background:#fff;
  color:inherit;

  font:inherit;
  text-align:left;
  text-decoration:none;

  cursor:pointer;
}

.sigo-canonical-panel-v5 a:hover,
.sigo-canonical-panel-v5 button:hover {
  background:#f1f6f8;
}


/* -----------------------------------------------------------
   GALERÍA
----------------------------------------------------------- */

#gallery > .section-head {
  align-items:center;
}

#gallery
.sigo-gallery-toggle-v5 {
  min-width:42px;
  font-size:20px;
  line-height:1;
}

#gallery
.sigo-gallery-technical-v5[hidden] {
  display:none !important;
}

#gallery
.sigo-gallery-technical-v5 {
  margin-top:14px;
}


/* En una ficha con miles de archivos,
   nada de la lista técnica salta visualmente
   mientras esté cerrada. */
#gallery[data-collapsible-v5="1"]
.sigo-gallery-technical-v5 {
  contain:layout;
}


@media (max-width:850px) {

  .sigo-primary-actions-v5 {
    justify-content:flex-start;
  }

  .sigo-canonical-panel-v5 {
    right:auto;
    left:0;
  }

}



/* SIGO_CASE_HEADER_GALLERY_V6 */

.event-header-top
.sigo-case-header-actions-v6 {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.event-header-top
.sigo-case-menu-v6 {
  margin:0;
}


/* La flecha de Galería representa expandir/plegar,
   no un menú contextual. */

#gallery
.sigo-gallery-toggle-v5 {
  width:38px;
  min-width:38px;
  height:34px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:0;

  font-size:18px;
  line-height:1;

  font-weight:700;
}


/* Evitar cualquier mini-menú viejo del caso. */

body
> .sigo-page-minihead-v3 {
  display:none !important;
}


@media (max-width:900px) {

  .event-header-top
  .sigo-case-header-actions-v6 {
    justify-content:flex-start;
  }

}



/* SIGO_CASE_HEADER_CANONICAL_V7 */

.event-header-top
.sigo-case-actions-canonical-v7 {
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}


/* ============================================================
   ÚNICO ⋮ DEL CASO
============================================================ */

.sigo-case-menu-canonical-v7 {
  position:relative;
  flex:0 0 auto;
  margin:0;
}


.sigo-case-menu-canonical-v7
> summary {
  list-style:none;

  width:44px;
  height:42px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:0;

  cursor:pointer;

  border:
    1px solid #d5e0e5;

  border-radius:12px;

  background:#fff;

  color:#173c4b;

  font-size:23px;
  font-weight:700;

  line-height:1;

  user-select:none;
}


.sigo-case-menu-canonical-v7
> summary::-webkit-details-marker {
  display:none;
}


.sigo-case-menu-panel-v7 {
  position:absolute;

  top:48px;
  right:0;

  z-index:500;

  width:max-content;
  min-width:285px;
  max-width:360px;

  padding:7px;

  border:
    1px solid #dbe4e8;

  border-radius:13px;

  background:#fff;

  box-shadow:
    0 18px 50px
    rgba(15,35,45,.17);
}


.sigo-case-menu-panel-v7
a,
.sigo-case-menu-panel-v7
button {
  display:block;

  width:100%;

  padding:11px 12px;

  border:0;

  border-radius:9px;

  background:#fff;

  color:#172f3b;

  font:inherit;

  text-align:left;
  text-decoration:none;

  cursor:pointer;
}


.sigo-case-menu-panel-v7
a:hover,
.sigo-case-menu-panel-v7
button:hover {
  background:#f1f6f8;
}


@media (max-width:900px) {

  .event-header-top
  .sigo-case-actions-canonical-v7 {
    justify-content:flex-start;
  }


  .sigo-case-menu-panel-v7 {
    right:0;
  }

}



/* SIGO_ADMIN_NAV_CANONICAL_V3 */

.sigo-admin-nav-v3 {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;

  margin:
    14px 0
    18px;
}


.sigo-admin-nav-v3 a {
  display:inline-flex;
  align-items:center;

  min-height:34px;

  padding:
    7px 11px;

  border:
    1px solid #d8e1e6;

  border-radius:9px;

  background:#fff;

  color:#263e49;

  text-decoration:none;

  font-size:.92rem;
  font-weight:500;
}


.sigo-admin-nav-v3 a:hover {
  background:#f3f7f8;
}


.sigo-admin-nav-v3 a.active {
  background:#e2f0f3;

  border-color:#b8d6dd;

  color:#0b6074;

  font-weight:700;
}


/* -----------------------------------------------------------
   PORTADA ADMINISTRACIÓN
----------------------------------------------------------- */

.sigo-admin-home-grid-v3 {
  display:grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:16px;
}


.sigo-admin-module-card-v3 {
  min-height:185px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;

  gap:10px;
}


.sigo-admin-module-card-v3 h2 {
  margin:
    0;
}


.sigo-admin-module-card-v3 p {
  flex:1;

  margin:
    0;
}


.sigo-admin-module-card-v3
.btn
+
.btn {
  margin-left:6px;
}


@media (max-width:900px) {

  .sigo-admin-home-grid-v3 {
    grid-template-columns:
      1fr;
  }

}


@media print {

  .sigo-admin-nav-v3 {
    display:none;
  }

}



/* SIGO_ADMIN_NAV_UNIFY_V4 */

/* Subsección administrativa activa */

.sigo-admin-nav-v3 a.active,
.sigo-admin-nav-v3 a[aria-current="page"] {
  background:#dceef2;
  border-color:#a9ccd5;
  color:#075f73;
  font-weight:700;
}


/* Administración permanece activa
   en cualquier subpágina administrativa */

.sigo-admin-main-active-v4 {
  background:
    rgba(255,255,255,.09);

  border-radius:8px;
}


/* Mantener toda la navegación en orden,
   pero permitir wrap si la pantalla no alcanza. */

.sigo-admin-nav-v3 {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}


@media (max-width:900px) {

  .sigo-admin-nav-v3 {
    gap:6px;
  }

}
/* SIGO_STROKE_REGISTRY_V1 */
.stroke-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.stroke-summary-grid .card{display:flex;flex-direction:column;gap:.35rem}
.stroke-summary-grid strong{font-size:1.8rem}
.stroke-distributions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}
.stroke-stat-row{display:flex;justify-content:space-between;gap:1rem;padding:.4rem 0;border-bottom:1px solid #dce3ec}
.stroke-tabs{display:flex;gap:.5rem;overflow-x:auto;position:sticky;top:0;z-index:5;background:var(--bg,#f5f7fa);padding:.7rem 0;margin:1rem 0}
.stroke-tabs a{white-space:nowrap;padding:.55rem .8rem;border-radius:999px;background:#e8eef7;color:#173b67;text-decoration:none;font-weight:700}
.stroke-stage{scroll-margin-top:5rem;margin-bottom:1rem}
.stroke-stage>summary{cursor:pointer;list-style:none}
.stroke-stage>summary::-webkit-details-marker{display:none}
.stroke-stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.stroke-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.stroke-time-grid{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:1rem}
.stroke-time-grid .card{display:flex;flex-direction:column;gap:.25rem}
.stroke-time-grid strong{font-size:1.45rem}
.stroke-field-saved{background:#fff4bf!important;transition:background .9s ease}
.stroke-toast{position:fixed;right:1rem;bottom:1rem;z-index:1000;background:#173b67;color:#fff;padding:.7rem 1rem;border-radius:.55rem;box-shadow:0 8px 24px #0003;opacity:0;transform:translateY(.5rem);pointer-events:none;transition:.2s}
.stroke-toast.visible{opacity:1;transform:translateY(0)}
.stroke-toast.error{background:#9b1c1c}
.compact-field{min-width:12rem}
@media(max-width:800px){.stroke-summary-grid,.stroke-form-grid,.stroke-time-grid,.stroke-distributions{grid-template-columns:1fr}.stroke-stage-head{display:block}.stroke-tabs{top:0}}
