/* Apariencia del portal MaxControl y navegación compartida por los módulos. */
.journey-side, .journey-crumb, .journey-lab { display:none; }
:root {
    --ink:#0f172a; --mute:#526176; --muted:#526176; --line:#dbe2ea;
    --deep:#173458; --green:#1d4ed8; --primary:#2563eb; --fog:#f8fafc;
    --lime:#c7deff; --canvas:#f8fafc; --mc-active:#eff6ff;
    --mc-height:66px; --mc-rail:clamp(225px,17vw,276px);
    --mc-shadow:0 1px 2px rgb(15 23 42 / .045),0 6px 18px rgb(15 23 42 / .025);
    color:var(--ink); background:var(--canvas); font-family:Inter,"Segoe UI",Arial,sans-serif;
}
body {background:var(--canvas);}
.app-header {position:sticky;top:0;z-index:12;background:#fff;border-bottom:1px solid var(--line);}
.topbar.frame {width:100%;max-width:none;margin:0;display:flex;align-items:center;justify-content:flex-start;gap:18px;min-height:var(--mc-height);padding:0 clamp(16px,2.5vw,38px);}
.topbar .brand {display:inline-flex;min-width:0;align-items:center;gap:0;text-decoration:none;color:#23344b;font-size:1rem;letter-spacing:0;font-weight:650;}
.topbar .brand img {display:block;object-fit:contain;width:142px;height:auto;max-height:34px;margin:0;}
.topbar .module-label {display:inline-flex;align-items:center;min-height:25px;margin-left:18px;padding-left:18px;border-left:1px solid #d4dce6;line-height:1.23;color:#45556b;font-size:.9rem;font-weight:600;}
#identity {margin-left:auto;display:flex;align-items:center;flex:none;}
.topbar .public-return {margin-left:auto;}
.topbar .public-return + #identity {margin-left:0;}
.mc-session .public-return {display:none;}
.mc-session .public-return + #identity {margin-left:auto;}
.mc-lab {color:#566578;font-size:.8rem;display:inline-flex;align-items:center;gap:8px;white-space:nowrap;}
.mc-lab::before {content:"";width:7px;height:7px;border-radius:100%;background:#c06316;}
.mc-icon {display:inline-block;flex:none;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;}
.mc-account {position:relative;font-size:.88rem;z-index:2;}
.mc-account summary,.mc-nav-toggle,.mc-close {color:#334155;background:transparent;border:1px solid transparent;border-radius:8px;cursor:pointer;}
.mc-account summary {display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 5px;list-style:none;font-weight:550;}
.mc-account summary::-webkit-details-marker {display:none;}
.mc-account summary:hover,.mc-nav-toggle:hover,.mc-close:hover {background:#f1f5f9;}
.mc-account summary > .mc-icon {width:15px;height:15px;color:#64748b;}
.mc-avatar {display:grid;place-items:center;width:36px;height:36px;background:#eaf1ff;border:1px solid #d8e5fd;border-radius:50%;color:#264eb0;font-size:.76rem;font-weight:750;}
.mc-person {display:grid;gap:1px;max-width:180px;line-height:1.25;}
.mc-person strong {font-size:.83rem;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650;}
.mc-person small {font-size:.73rem;color:#64748b;}
.mc-account-list {position:absolute;right:0;top:calc(100% + 6px);width:min(220px,75vw);border:1px solid var(--line);border-radius:8px;background:white;padding:5px;box-shadow:0 8px 20px #17264021;}
.mc-account-list a,.mc-account-list button {display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:43px;border:0;background:#fff;color:#24344a;text-align:left;padding:8px 10px;line-height:1.3;font-family:inherit;font-size:.87rem;font-weight:600;border-radius:5px;text-decoration:none;}
.mc-account-list :is(a,button):hover {background:#eff6ff;color:#1d4ed8;}
.mc-account-list p {margin:5px;padding:3px;color:#8b301d;font-size:.8rem;}
.mc-nav-toggle,.mc-close {width:44px;height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0;}
.mc-sidebar {background:#fff;color:#334155;padding:20px 14px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;}
.mc-sidebar-head {display:none;}
.mc-filter {display:flex;align-items:center;min-height:42px;gap:9px;border:1px solid #cfd9e5;border-radius:8px;color:#64748b;padding:0 11px;background:#fff;}
.mc-filter:focus-within {outline:2px solid #2563eb;outline-offset:2px;}
.mc-filter .mc-icon {width:16px;height:16px;}
.mc-filter input {border:0;outline:none;background:transparent;width:100%;min-width:0;min-height:40px;padding:0;font-family:inherit;font-size:.83rem;font-weight:450;color:#24344a;box-shadow:none;}
.mc-filter input:focus-visible {outline:none;}
.mc-filter input::placeholder {color:#637187;}
.mc-sidebar nav {display:grid;gap:21px;margin-top:22px;}
.mc-group-title {margin:0 0 6px 12px;color:#67768a;font-weight:700;font-size:.68rem;letter-spacing:.075em;line-height:1.4;text-transform:uppercase;}
.mc-group a {display:flex;align-items:center;min-height:42px;gap:11px;width:100%;padding:7px 12px;border-radius:7px;color:#34455b;font-size:.88rem;font-weight:550;line-height:1.25;text-decoration:none;}
.mc-group a .mc-icon {color:#6a7a90;}
.mc-group a:hover {color:#1d4ed8;background:#f4f7fd;}
.mc-group a[aria-current=page] {background:#eff6ff;color:#1d4ed8;box-shadow:inset 3px 0 0 #2563eb;font-weight:700;}
.mc-group a[aria-current=page] .mc-icon {color:inherit;}
.mc-nav-empty {font-size:.85rem;margin:0 12px;color:var(--mute);}
.mc-sidebar [hidden],.mc-overlay[hidden] {display:none!important;}
.mc-overlay {position:fixed;inset:0;background:#17294266;z-index:25;}
.mc-session footer {background:#fff;}
.foot {color:#637187;}
.foot span:first-child {color:#3e4e62;}
body:not([data-portal-secondary]) .workspace > .view h1, .home-heading h1 {font-size:clamp(1.65rem,2.5vw,2.05rem);font-weight:700;letter-spacing:-.035em;line-height:1.16;}
.mc-session .workspace {min-width:0;}
.dashboard {gap:18px;padding-block:27px 36px;}
.home-heading {padding:0 0 3px;margin:0;}
.today {color:#50617a;font-weight:500;}
.home-heading .today {display:inline-flex;align-items:center;min-height:34px;border:1px solid var(--line);background:white;border-radius:7px;padding:5px 10px;}
.panel,.view>article,.view>form,.view .paper,.table-scroll,.metric {border-radius:8px;box-shadow:var(--mc-shadow);}
.dashboard .panel,.clock-card.shift-card {padding:21px 22px;background:white;border:1px solid var(--line);border-radius:9px;box-shadow:var(--mc-shadow);}
.dashboard .section-heading {gap:9px;}
.dashboard .section-heading h2 {font-size:1.08rem;letter-spacing:-.018em;font-weight:680;color:#14243b;}
.dashboard .section-heading>.ico {width:31px;height:31px;padding:6px;background:#eff6ff;border:1px solid #e2ecfc;border-radius:7px;color:#2563eb;}
.dashboard .panel-head {gap:9px;flex-wrap:wrap;}
.dashboard .schedule-link,.dashboard .text-btn {display:inline-flex;align-items:center;min-height:42px;color:#1d4ed8;font-size:.84rem;font-weight:650;text-decoration:none;padding:6px 9px;border:0;border-radius:6px;}
.dashboard .schedule-link:hover,.dashboard .text-btn:hover {background:#eff6ff;color:#163fba;}
.dashboard .metrics {gap:14px;}
.dashboard .metric {padding:18px 19px;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:7px 10px;border:1px solid var(--line);background:white;}
.dashboard .metric>.ico {display:grid;grid-row:1/3;grid-column:2;width:37px;height:37px;border-radius:8px;padding:8px;color:#2658c7;background:#eef4ff;}
.dashboard .metric strong {grid-column:1;grid-row:2;font-size:1.95rem;font-weight:710;color:#18283e;line-height:1;font-variant-numeric:tabular-nums;}
.dashboard .metric>span:last-child {grid-column:1;grid-row:1;margin:0;color:#58697f;font-weight:600;font-size:.83rem;}
.dashboard .metric:hover {border-color:#a6c0ef;box-shadow:0 4px 14px #1e4a8810;}
.dashboard .attendance-summary,.dashboard .recent-panel {align-self:stretch;}
.shift-counts {gap:8px;margin-top:15px;}
.shift-counts>div {border:1px solid #dfe6ee;background:#f8fafc;border-radius:6px;padding:10px 12px;}
.shift-counts .late dd {color:#a34516;}.shift-counts .review dd {color:#5e52a2;}
.shift-counts dt {color:#526176;font-weight:600;}
.shift-cases {margin-top:15px;}
.shift-cases a {padding:11px 4px;gap:6px 9px;line-height:1.35;}
.shift-case-copy {gap:4px;}
.shift-case-copy strong {color:#14243b;}
.shift-case-copy small {color:#526176;}
.shift-status {letter-spacing:0;}
.clock-card.shift-card {position:relative;align-items:stretch;gap:14px;color:#1e293b;overflow:visible;border-top:3px solid #2563eb;}
.clock-card.shift-card::before {display:none;}
.shift-card .shift-range {color:#173c86;font-size:clamp(2rem,3.15vw,2.85rem);font-weight:650;letter-spacing:-.055em;}
.shift-card .shift-entry span,.shift-card .shift-detail,.shift-card .shift-night,.shift-card .shift-message,.shift-card .shift-meta {color:#526176;}
.shift-card .shift-entry strong {color:#1c304e;}
.shift-card .shift-meta {border-top:1px solid var(--line);padding-top:10px;}
.shift-card .shift-meta>span {display:inline-flex;align-items:baseline;gap:5px;}
.shift-card .time-value {color:#253b5c;}
.mark-grid .mark {border:1px solid #cbd8e7;background:#fff;color:#243954;border-radius:7px;font-weight:640;min-height:55px;}
.mark-grid .mark .ico {color:#3566bf;}
.mark-grid .mark:hover {background:#eff6ff;border-color:#a6c0ef;}
.mark-grid .mark.main-action {background:#2563eb;color:#fff;border-color:#2563eb;}
.mark-grid .mark.main-action:hover {background:#1d4ed8;}
.mark-grid .mark.main-action .ico {color:white;}
.extra summary,.receipt-detail summary {color:#1d4ed8;}
.recent-panel {min-width:0;}
.activity-table {width:100%;border-collapse:collapse;text-align:left;font-size:.86rem;margin-top:14px;}
.activity-table th {background:#f8fafc;color:#536479;font-size:.73rem;font-weight:650;}
.activity-table :is(th,td) {padding:10px 8px;border-bottom:1px solid #e6ebf1;vertical-align:middle;line-height:1.3;}
.activity-table tr:last-child td {border-bottom:0;}
.activity-table td {overflow-wrap:anywhere;color:#43566e;}
.activity-table td:nth-last-child(-n+2) {white-space:nowrap;font-variant-numeric:tabular-nums;}
.activity-table td:last-child {color:#23344d;font-weight:620;}
.activity-kind .ico {vertical-align:middle;margin-right:7px;color:#3d6ec4;width:17px;height:17px;}
.activity-kind strong {font-weight:640;color:#263a53;}
.empty {background:#f8fafc;border-color:#cdd9e5;}
.empty>.ico {color:#6c829b;}
.view .back {color:#335879;text-decoration:none;font-weight:600;}
.view .shortcut>.ico:first-child {color:#2859ae;border-color:#d9e6fa;background:#eef4ff;}
.view .shortcut>.ico:last-child {color:#687d97;}
.view .shortcut:hover,.view .back:hover {background:#eff6ff;}
input,select,textarea {border-color:#bdcbdc;}
.table-scroll th,.paper th {background:#f2f5fa;}
#message:not(.error):not(:empty) {background:#eef5ff;border-color:#c3d8f7;color:#22416a;}
@media (min-width:1024px) {
    body.mc-session {display:grid;grid-template-columns:var(--mc-rail) minmax(0,1fr);grid-template-rows:var(--mc-height) 1fr auto;min-height:100vh;align-content:start;}
    .mc-session .app-header {grid-column:1/-1;grid-row:1;}
    .mc-session .mc-sidebar {grid-column:1;grid-row:2/4;position:sticky;top:var(--mc-height);align-self:start;height:calc(100vh - var(--mc-height));border-right:1px solid var(--line);}
    .mc-session .workspace {grid-column:2;grid-row:2;margin:0 auto;padding-inline:clamp(20px,2.35vw,40px);width:100%;max-width:1580px;}
    .mc-session footer {grid-column:2;grid-row:3;}
    .mc-session.rail-collapsed {grid-template-columns:0 minmax(0,1fr);}
    .rail-collapsed .mc-sidebar {visibility:hidden;padding:0;border:0;}
    .mc-session .foot {max-width:1580px;width:100%;padding-inline:clamp(20px,2.35vw,40px);}
    .dashboard .duty-grid {grid-template-columns:minmax(260px,.9fr) minmax(0,1.2fr);gap:16px;}
}
@media (min-width:1380px) {
    .manager-home {grid-template-columns:minmax(0,.93fr) minmax(0,1.13fr);align-content:start;}
    .manager-home .home-heading,.manager-home .metrics {grid-column:1/-1;}
}
@media (max-width:1023px) {
    :root {--mc-height:60px;}
    .mc-sidebar {position:fixed;inset:0 auto 0 0;z-index:30;width:min(300px,calc(100vw - 35px));transform:translateX(-105%);visibility:hidden;transition:transform .16s ease,visibility .16s;padding:12px 15px 26px;}
    .drawer-open {overflow:hidden;}
    .drawer-open .mc-sidebar {transform:translateX(0);visibility:visible;}
    .mc-sidebar-head {display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;padding-left:5px;color:#172a43;}
    .mc-group a {min-height:44px;}
    .mc-session .workspace {width:100%;max-width:none;padding-inline:clamp(14px,3.2vw,27px);}
    .dashboard {gap:13px;padding-top:20px;}
}
@media (max-width:680px) {
    .topbar.frame {gap:8px;padding:0 12px;}
    .topbar .brand img {width:106px;max-height:29px;}
    .topbar .module-label {font-size:.76rem;max-width:77px;padding-left:9px;margin-left:9px;}
    .mc-account summary {gap:5px;padding:0 2px;}
    .mc-person {max-width:calc(22vw - 4px);}
    .mc-person strong {font-size:.73rem;}
    .mc-person small {font-size:.64rem;}
    .mc-avatar {display:none;}
    .mc-account summary>.mc-icon {width:13px;}
    .mc-session .public-return {display:none;}
    .mc-lab {font-size:.69rem;gap:5px;}
    .dashboard .panel,.clock-card.shift-card {padding:14px 15px;}
    .home-heading .today {min-height:24px;background:none;border:0;padding:0;font-size:.81rem;}
    .home-heading {gap:5px;}
    .dashboard .section-heading>.ico {width:25px;height:25px;padding:4px;}
    .dashboard .metrics {gap:6px;}
    .dashboard .metric {padding:10px 8px;gap:6px;grid-template-columns:auto;}
    .dashboard .metric>.ico {display:none;}
    .dashboard .metric>span:last-child {font-size:.74rem;line-height:1.2;}
    .dashboard .metric strong {font-size:1.5rem;}
    .dashboard .schedule-link,.dashboard .text-btn {padding:4px;min-height:44px;}
    .dashboard .duty-grid {gap:12px;}
    .mark-grid .mark {min-height:51px;}
    .shift-counts>div {padding:8px;}
    .activity-table, .activity-table tbody {display:block;}
    .activity-table thead {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;}
    .activity-table tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:10px 0;border-bottom:1px solid var(--line);}
    .activity-table tr:last-child {border:0;}
    .activity-table :is(th,td) {padding:0;border:0;}
    .activity-table td:nth-child(1) {grid-row:1;grid-column:1;}
    .activity-table td:nth-child(2) {grid-row:2;grid-column:1;color:#566980;font-size:.76rem;}
    .activity-table td:nth-child(3) {grid-row:2;grid-column:2;font-size:.76rem;text-align:right;}
    .activity-table td:nth-child(4) {grid-row:1;grid-column:2;text-align:right;}
}
@media (max-width:365px) {
    .topbar.frame {padding:0 8px;gap:4px;}
    .topbar .brand img {width:85px;}
    .topbar .module-label {font-size:.7rem;max-width:61px;padding-left:7px;margin-left:7px;}
    .mc-person {max-width:70px;}
    .mc-nav-toggle {width:38px;min-width:38px;}
}
@media (prefers-reduced-motion:reduce) {.mc-sidebar {transition:none;}}
@media print {.app-header,.mc-sidebar,.mc-overlay,footer{display:none!important;}body.mc-session{display:block!important;}.mc-session .workspace{padding:0!important;max-width:none;}}
.mark-workplace {margin-top:14px;color:#354760;}
.mark-workplace input {min-height:41px;}
.mark-location-choice {display:flex;align-items:center;gap:9px;margin-top:9px;min-height:38px;font-weight:600;color:#33465e;}
.mark-location-choice input {width:18px;height:18px;min-height:18px;margin:0;accent-color:#2563eb;flex:none;}
.mark-location-help,.mark-location-state,.mark-position {font-size:.82rem;line-height:1.45;color:#526176;}
.mark-location-help {margin:0 0 6px;}
.mark-location-state:not(:empty) {margin-top:12px;}
.mark-location-state:empty,.mark-skip[hidden] {display:none;}
.mark-skip {margin-top:5px;color:#1d4ed8;background:#eff6ff;border-color:#c9d9ef;}
.mark-position {margin:3px 0 0;}
.mark-position summary {color:#1d4ed8;text-decoration:underline;text-underline-offset:2px;}
.mark-position span {display:block;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;}
.mark-filters {display:flex;flex-wrap:wrap;gap:10px;align-items:end;}
.mark-filters label {flex:1 1 150px;}
.mark-history-results {min-width:0;max-width:100%;margin-top:14px;}


/* Directorio de trabajadores y activación personal del laboratorio. */
.staff-title {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;}
.staff-title h1 {margin:0;}
.staff-title .primary,.staff-form-actions .primary {width:auto;margin:0;}
.staff-editor-slot:empty,.staff-notice:empty {display:none;}
.staff-editor,.staff-directory {padding:clamp(16px,2.5vw,26px);min-width:0;}
.staff-editor {display:grid;gap:18px;}
.staff-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;}
.staff-form-actions {display:flex;gap:9px;flex-wrap:wrap;}
.staff-editor :is(input,select),.staff-search input {border-color:#cbd5e1;border-radius:7px;min-height:44px;}
.staff-notice:not(:empty) {display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:12px 16px;border:1px solid #c7dfd1;background:#f3faf6;color:#215b3b;border-radius:8px;font-size:.9rem;}
.staff-directory {display:grid;gap:16px;}
.staff-search {max-width:370px;}
.staff-results {min-width:0;}
.staff-table {width:100%;min-width:0;table-layout:fixed;}
.staff-table th {font-weight:650;color:#475569;}
.staff-table th:first-child {width:32%;}
.staff-table th:nth-child(3) {width:17%;}
.staff-table :is(td,th) {white-space:normal;overflow-wrap:anywhere;padding:11px 8px;vertical-align:top;}
.staff-table td:first-child :is(strong,small) {display:block;}
.staff-table small,.staff-hint {font-size:.83rem;color:#526176;line-height:1.5;}
.staff-status {display:inline-block;border-radius:5px;background:#fef3c7;color:#78350f;padding:3px 7px;font-size:.77rem;font-weight:650;}
.staff-status.active {background:#ecfdf5;color:#166534;}
.staff-action {display:inline-flex;align-items:center;min-height:44px;padding:4px 6px;border:0;border-radius:5px;font-size:.84rem;font-weight:650;background:transparent;color:#1d4ed8;text-underline-offset:3px;}
button.staff-action {text-decoration:underline;}
.staff-action:hover,.staff-login-link:hover {background:#eff6ff;}
.staff-login-link {display:inline-flex;align-items:center;min-height:44px;font-weight:650;font-size:.86rem;color:#1d4ed8;margin-top:7px;}
.staff-otp {display:block;user-select:all;overflow-wrap:anywhere;padding:12px;border:1px solid #cbd5e1;border-radius:7px;background:#f8fafc;margin:12px 0;font-size:.95rem;}
.staff-otp-steps {padding-left:20px;font-size:.9rem;color:#334155;}
.staff-otp-steps li+li {margin-top:6px;}
@media(max-width:700px){
    .staff-fields {grid-template-columns:minmax(0,1fr);}
    .staff-table,.staff-table tbody {display:block;}
    .staff-table thead {position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;}
    .staff-table tr {display:grid;gap:4px;border-bottom:1px solid #dbe2ea;padding:12px 0;}
    .staff-table td {border:0;padding:0;}
    .staff-table td[data-label]::before {content:attr(data-label) " · ";color:#526176;font-size:.8rem;}
    .staff-table td:last-child {display:flex;flex-wrap:wrap;gap:4px;}
}


.terminal-pair-code {display:block;font-size:clamp(1.5rem,4vw,2.35rem);line-height:1.25;letter-spacing:.14em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;user-select:all;}

.mc-sidebar nav {gap:10px;margin-top:16px}
.mc-group>summary {min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:5px;margin:0;padding:8px 10px;list-style:none;cursor:pointer;color:#475569;font-weight:650;font-size:.79rem;letter-spacing:0;text-transform:none;border-radius:6px}
.mc-group>summary::-webkit-details-marker {display:none}
.mc-group>summary .mc-icon {width:15px;height:15px;transform:rotate(-90deg)}
.mc-group[open]>summary .mc-icon {transform:none}
.mc-group>summary:hover {background:#f1f5f9}
.mc-group>summary:focus-visible,.mc-group a:focus-visible {outline:2px solid #245edb;outline-offset:-2px}
.mc-group+.mc-group {border-top:1px solid #e6ebf1;padding-top:5px}
.mc-person small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:650px){#identity .staff-action{max-width:120px;line-height:1.1;min-height:40px;font-size:.75rem;white-space:normal}}

.mc-company {margin:0 8px 13px;color:#354963;font-weight:650;font-size:.87rem;overflow-wrap:anywhere}
