:root{
  --purple:#7137cf;--purple-dark:#4d1ea6;--purple-soft:#eee7ff;
  --pink:#df8fc5;--mint:#23a97c;--mint-soft:#e8faf4;
  --rose:#e75469;--rose-soft:#fff0f2;--amber:#d88a25;--amber-soft:#fff5e6;
  --blue:#1687e8;--blue-soft:#eaf4ff;--ink:#231b35;--muted:#766d84;
  --line:#ece5f5;--surface:#fff;--bg:#faf8fd;--gold:#c8912f;
  --shadow:0 12px 34px rgba(65,37,103,.10);--shadow-soft:0 5px 16px rgba(65,37,103,.07)
}
*{box-sizing:border-box}html{font-size:16px;scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(180deg,#fbf9ff 0%,#fff 70%);color:var(--ink);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}.hidden{display:none!important}button{touch-action:manipulation}.app-shell{min-height:100vh;max-width:1280px;margin:auto;padding-bottom:96px}.container{padding:18px 18px 28px}.topbar{min-height:112px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;background-image:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.91) 32%,rgba(255,255,255,.35) 63%,rgba(255,255,255,.05) 100%),url("assets/header-home-care.webp");background-size:cover;background-position:right center;border-bottom:1px solid var(--line);box-shadow:0 8px 24px rgba(67,37,105,.10)}
.brand-card{display:flex;align-items:center;gap:11px;padding:8px 12px;border-radius:22px;background:rgba(255,255,255,.88);box-shadow:0 4px 18px rgba(62,32,98,.10);backdrop-filter:blur(9px)}.brand-logo{width:54px;height:54px;border-radius:18px;object-fit:contain;background:#fff;box-shadow:0 5px 16px rgba(72,37,116,.14)}.brand-copy h1{margin:0;font-size:1.32rem;line-height:1;font-weight:900;background:linear-gradient(90deg,#5a2dbb 0%,#8b3fd0 48%,#e34b9b 100%);-webkit-background-clip:text;background-clip:text;color:transparent}.product-name{margin-top:1px;font-family:Georgia,"Times New Roman",serif;font-size:1.5rem;line-height:1;color:var(--gold);letter-spacing:-.03em}.topbar-actions{display:flex;align-items:center;gap:9px}.btn{border:0;border-radius:14px;padding:10px 14px;font-size:.9rem;font-weight:850;cursor:pointer}.alerts{background:#fff;color:#13825f;border:1px solid #a4dfcd;box-shadow:var(--shadow-soft)}.alerts .dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#18a16f;margin-right:9px;vertical-align:-1px}.logout{background:rgba(255,255,255,.94);color:var(--purple-dark);box-shadow:var(--shadow-soft)}
.admin-welcome{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(105deg,#5922bd 0%,#8d5bda 58%,#d690c6 100%);color:#fff;border-radius:27px;padding:25px 30px;box-shadow:0 18px 38px rgba(91,39,176,.23)}.admin-welcome:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;right:-80px;top:-100px;background:rgba(255,255,255,.12)}.eyebrow{display:block;font-size:.76rem;letter-spacing:.16em;font-weight:900;color:#eadfff;margin-bottom:8px}.admin-welcome h2{font-size:1.82rem;margin:0 0 7px;letter-spacing:-.03em}.admin-welcome p{margin:0;color:#f6efff;line-height:1.4;font-size:1rem;max-width:720px}.admin-mark{position:relative;z-index:1;width:72px;height:72px;border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.14);padding:16px}.admin-mark svg{width:100%;height:100%;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.admin-stat{display:flex;align-items:center;gap:13px;text-align:left;border:1px solid var(--line);background:#fff;border-radius:22px;padding:16px 17px;box-shadow:var(--shadow-soft);cursor:pointer;min-height:104px;transition:.18s ease}.admin-stat:hover,.quick-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.stat-icon,.quick-icon{display:grid;place-items:center;flex:0 0 auto;width:46px;height:46px;border-radius:15px;padding:11px}.stat-icon svg,.quick-icon svg,.nav-icon svg,.priority-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.lilac{background:var(--purple-soft);color:var(--purple)}.mint{background:var(--mint-soft);color:var(--mint)}.rose{background:var(--rose-soft);color:var(--rose)}.amber{background:var(--amber-soft);color:var(--amber)}.blue{background:var(--blue-soft);color:var(--blue)}.admin-stat>div{flex:1;min-width:0}.admin-stat small{display:block;color:var(--muted);font-size:.85rem;font-weight:800}.admin-stat strong{display:block;font-size:1.45rem;line-height:1.1;margin-top:3px;color:#1687e8}.admin-stat p{margin:5px 0 0;color:var(--muted);font-size:.82rem;line-height:1.3}.chevron{color:var(--muted);font-size:1.8rem;font-weight:700}
.quick-section{margin-top:16px}.quick-heading{padding:9px 14px;border:1px solid #dac9f3;border-radius:16px;background:linear-gradient(90deg,#f1e8ff,#fbf8ff)}.quick-heading h2{margin:0;color:var(--purple-dark);font-size:1.16rem}.quick-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:10px}.quick-card{display:flex;align-items:center;gap:11px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px;text-align:left;box-shadow:var(--shadow-soft);cursor:pointer;min-height:90px;transition:.18s ease}.quick-icon{width:42px;height:42px;border-radius:13px;padding:10px}.quick-card div{flex:1;min-width:0}.quick-card strong{display:block;font-size:.88rem}.quick-card small{display:block;color:var(--muted);font-size:.74rem;line-height:1.3;margin-top:3px}
.priority-card{margin-top:18px;border-radius:20px;overflow:hidden;box-shadow:0 12px 26px rgba(201,29,89,.17)}.priority-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 21px;background:linear-gradient(100deg,#c91d59,#f05284);color:#fff}.priority-head span{display:block;color:#ffe3ee;font-size:.68rem;font-weight:950;letter-spacing:.14em;margin-bottom:3px}.priority-head h2{margin:0;font-size:1.18rem}.priority-head b{background:#fff;color:#b41850;padding:7px 14px;border-radius:999px;font-size:.78rem;white-space:nowrap}.priority-body{width:100%;display:flex;align-items:center;gap:15px;padding:16px 21px;border:1px solid #f0b6c9;border-top:0;background:#fff;text-align:left;cursor:pointer}.priority-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;padding:9px;background:#fff0f4;color:#db285e;flex:0 0 auto}.priority-body div{flex:1}.priority-body strong{display:block;font-size:.83rem}.priority-body small{display:block;color:var(--muted);font-size:.76rem;margin-top:4px}.priority-body em{font-style:normal;color:var(--purple);font-weight:850;font-size:.78rem;white-space:nowrap}
.bottom-nav{position:fixed;left:50%;transform:translateX(-50%);bottom:0;z-index:30;width:min(1280px,100%);display:grid;grid-template-columns:repeat(5,1fr);background:rgba(255,255,255,.97);backdrop-filter:blur(18px);border-top:1px solid var(--line);padding:9px 8px calc(9px + env(safe-area-inset-bottom));box-shadow:0 -8px 25px rgba(57,31,89,.07)}.nav-item{border:0;background:transparent;color:#7a7287;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:.73rem;font-weight:760;padding:3px}.nav-icon{width:25px;height:25px}.nav-icon svg{stroke-width:1.8}.nav-item.active{color:var(--purple)}.nav-item.active:after{content:"";width:28px;height:4px;border-radius:4px;background:var(--purple);margin-top:2px}.toast{position:fixed;left:50%;bottom:112px;transform:translateX(-50%);z-index:100;background:#241b35;color:#fff;padding:12px 16px;border-radius:14px;box-shadow:var(--shadow);max-width:calc(100% - 32px);text-align:center}
@media(max-width:980px){.admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.app-shell{padding-bottom:92px}.topbar{min-height:178px;padding:12px 12px 10px;align-items:flex-start;flex-wrap:wrap;background-image:linear-gradient(180deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.78) 44%,rgba(255,255,255,.14) 100%),url("assets/header-home-care.webp");background-position:right center}.brand-card{padding:7px 9px}.brand-logo{width:48px;height:48px}.brand-copy h1{font-size:1.08rem}.product-name{font-size:1.28rem}.topbar-actions{width:100%;align-self:flex-end;justify-content:flex-end;gap:8px}.btn{padding:9px 12px;font-size:.82rem}.container{padding:14px}.admin-welcome{padding:23px 22px;border-radius:25px}.admin-welcome h2{font-size:1.72rem}.admin-welcome p{font-size:.98rem}.admin-mark{width:66px;height:66px;padding:15px}.admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.admin-stat{padding:14px 12px;min-height:126px}.stat-icon{width:43px;height:43px;padding:10px}.admin-stat small{font-size:.78rem}.admin-stat strong{font-size:1.35rem}.admin-stat p{font-size:.75rem}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.quick-card{min-height:104px;padding:12px;align-items:flex-start}.quick-icon{width:40px;height:40px}.quick-card strong{font-size:.82rem}.quick-card small{font-size:.7rem}.priority-head{padding:14px 15px}.priority-head h2{font-size:1.02rem}.priority-body{padding:14px 15px;align-items:flex-start}.priority-body em{display:none}.priority-body strong{font-size:.79rem}.bottom-nav{font-size:.7rem}}
@media(max-width:390px){.brand-copy h1{font-size:1.14rem}.product-name{font-size:1.4rem}.admin-welcome p{font-size:.9rem}.admin-mark{width:58px;height:58px}.admin-stat{gap:9px}.stat-icon{width:39px;height:39px}.chevron{display:none}.quick-grid{grid-template-columns:1fr 1fr}}
.page-head{display:flex;align-items:flex-start;gap:12px;padding:18px 20px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(105deg,#f6f0ff,#fff);margin-bottom:16px}.page-head span{font-size:.7rem;letter-spacing:.13em;font-weight:900;color:var(--purple)}.page-head h2{margin:3px 0 4px;font-size:1.55rem}.page-head p{margin:0;color:var(--muted)}.back-btn{width:42px;height:42px;border:0;border-radius:13px;background:var(--purple-soft);color:var(--purple);padding:10px}.back-btn svg,.primary-btn svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.toolbar,.filter-row{display:flex;gap:12px;align-items:center;margin-bottom:16px}.searchbox{flex:1;display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:11px 13px}.searchbox svg{width:20px;fill:none;stroke:var(--muted);stroke-width:2}.searchbox input{border:0;outline:0;width:100%;background:transparent}.primary-btn,.secondary-btn,.mini-btn{border:0;border-radius:13px;padding:11px 15px;font-weight:850;cursor:pointer}.primary-btn{background:linear-gradient(90deg,var(--purple-dark),var(--purple));color:#fff;display:inline-flex;align-items:center;gap:8px}.primary-btn svg{width:18px;height:18px}.secondary-btn{background:var(--purple-soft);color:var(--purple-dark)}.mini-btn{padding:8px 10px;background:var(--purple-soft);color:var(--purple-dark);font-size:.76rem}.full{width:100%;justify-content:center;margin-top:14px}.resident-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.resident-card{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:#fff;border-radius:19px;padding:14px;text-align:left;box-shadow:var(--shadow-soft)}.resident-card>div:nth-child(2){flex:1}.resident-card strong,.resident-card span,.resident-card small{display:block}.resident-card span,.resident-card small{color:var(--muted);margin-top:3px}.resident-card b{font-size:1.5rem;color:var(--muted)}.avatar{width:48px;height:48px;border-radius:15px;background:linear-gradient(135deg,var(--purple-soft),#f7e8ff);color:var(--purple);display:grid;place-items:center;font-weight:900}.avatar.large{width:78px;height:78px;border-radius:23px;font-size:1.35rem}.status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.67rem;font-weight:900;white-space:nowrap}.status.ok{background:#e9f8f2;color:#15805f}.status.warn{background:#fff4df;color:#a66b13}.status.danger{background:#fff0f2;color:#c93856}.profile-hero{display:flex;align-items:center;gap:16px;padding:18px;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow-soft)}.profile-hero h3{margin:0;font-size:1.3rem}.profile-hero p{margin:5px 0;color:var(--muted)}.tag-row{display:flex;gap:7px;flex-wrap:wrap}.info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin:14px 0}.info-grid article,.summary-strip article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}.info-grid span,.summary-strip span{display:block;color:var(--muted);font-size:.74rem}.info-grid strong,.summary-strip strong{display:block;margin-top:5px}.module-grid,.more-grid,.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.module-card,.report-grid button{display:flex;align-items:center;gap:11px;border:1px solid var(--line);background:#fff;border-radius:17px;padding:13px;text-align:left;box-shadow:var(--shadow-soft)}.module-card div,.report-grid button div{flex:1}.module-card strong,.module-card small,.report-grid strong,.report-grid small{display:block}.module-card small,.report-grid small{color:var(--muted);margin-top:3px}.module-card b,.report-grid b{color:var(--muted);font-size:1.4rem}.form-card,.history-card,.procedure-card,.handoff-card{background:#fff;border:1px solid var(--line);border-radius:21px;padding:18px;box-shadow:var(--shadow-soft)}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.form-grid label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:.78rem;font-weight:800}.form-grid input,.form-grid select,.form-grid textarea,.filter-row select{border:1px solid var(--line);border-radius:13px;padding:12px;background:#fff;color:var(--ink);outline:none}
.form-grid select,.filter-row select,.care-controls select,.report-resident-select select{appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:42px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%236a2dcc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:16px;border-color:#dfd2f1;box-shadow:0 6px 16px rgba(77,42,150,.05);font-weight:800;color:#412d61}
.form-grid select:focus,.filter-row select:focus,.care-controls select:focus,.report-resident-select select:focus,.form-grid input:focus,.form-grid textarea:focus{border-color:#7a3ed1;box-shadow:0 0 0 3px rgba(122,62,209,.10)}
#careShiftSelect{min-width:190px;background-color:#faf7ff;border-color:#d9cbf0;color:#5d2ab8;font-weight:900}
input[type="file"]{width:100%;padding:10px 12px;border:1px dashed #d7c8ee;border-radius:16px;background:#fcfaff;color:#5f566d;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
input[type="file"]::file-selector-button{border:0;border-radius:12px;padding:10px 15px;margin-right:12px;background:linear-gradient(90deg,#5b28b8,#8548dc);color:#fff;font-weight:850;cursor:pointer;box-shadow:0 8px 18px rgba(91,40,184,.20)}
input[type="file"]::-webkit-file-upload-button{border:0;border-radius:12px;padding:10px 15px;margin-right:12px;background:linear-gradient(90deg,#5b28b8,#8548dc);color:#fff;font-weight:850;cursor:pointer;box-shadow:0 8px 18px rgba(91,40,184,.20)}.wide{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.segmented{display:flex;gap:8px;margin-bottom:14px}.segmented button{border:0;background:var(--purple-soft);color:var(--purple-dark);padding:9px 14px;border-radius:999px;font-weight:800}.segmented .active{background:var(--purple);color:#fff}.list-stack{display:grid;gap:10px}.data-row,.incident-card{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:13px;box-shadow:var(--shadow-soft)}.row-main,.incident-card>div:nth-child(2){flex:1}.row-main strong,.row-main span,.row-main small,.incident-card strong,.incident-card span,.incident-card small{display:block}.row-main span,.row-main small,.incident-card span,.incident-card small{color:var(--muted);margin-top:3px}.time-badge{min-width:58px;padding:9px;border-radius:12px;background:var(--amber-soft);color:var(--amber);font-weight:900;text-align:center}.blue-bg{background:var(--blue-soft);color:var(--blue)}.floating-action{position:fixed;right:22px;bottom:98px;width:54px;height:54px;border:0;border-radius:50%;background:var(--purple);color:#fff;padding:15px;box-shadow:var(--shadow)}.floating-action svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.summary-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:14px}.summary-strip strong{font-size:1.12rem;color:var(--purple-dark)}.history-card{margin-top:14px}.history-card h3{margin-top:0}.history-line{display:flex;justify-content:space-between;gap:15px;padding:11px 0;border-top:1px solid var(--line)}.history-line span{color:var(--muted);text-align:right}.checklist{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.check-item{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}.check-item input{display:none}.checkmark{width:35px;height:35px;border-radius:10px;background:#f3eff8;color:#b7aec4;padding:8px}.check-item input:checked+.checkmark{background:var(--mint-soft);color:var(--mint)}.checkmark svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.check-item div{flex:1}.check-item strong,.check-item small{display:block}.check-item small{color:var(--muted);margin-top:3px}.procedure-top{display:flex;align-items:center;gap:12px}.procedure-top>div{flex:1}.procedure-top strong,.procedure-top small{display:block}.procedure-top small{color:var(--muted);margin-top:3px}.procedure-details,.handoff-stats{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.procedure-details span,.handoff-stats span{padding:7px 10px;background:#f7f3fb;border-radius:10px;color:var(--muted);font-size:.75rem}.timeline article{padding:10px 0;border-top:1px solid var(--line)}.timeline p{margin:4px 0;color:var(--muted)}.date-strip{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid var(--line);border-radius:17px;padding:12px 15px;margin-bottom:14px}.date-strip button{border:0;background:var(--purple-soft);color:var(--purple);width:36px;height:36px;border-radius:10px}.date-strip strong,.date-strip span{display:block;text-align:center}.date-strip span{color:var(--muted);margin-top:3px}.incident-icon{width:45px;height:45px;border-radius:14px;padding:11px;background:var(--rose-soft);color:var(--rose)}.incident-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.alert-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:14px}.alert-summary article{border-radius:17px;padding:15px;color:#fff}.alert-summary strong,.alert-summary span{display:block}.alert-summary strong{font-size:1.6rem}.danger-box{background:linear-gradient(135deg,#c92b55,#ed5b7e)}.warn-box{background:linear-gradient(135deg,#ba761f,#e7a846)}.ok-box{background:linear-gradient(135deg,#188461,#34b58d)}.staff-grid,.inventory-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.staff-grid article,.inventory-grid article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:var(--shadow-soft)}.staff-grid strong,.staff-grid span{display:block}.staff-grid span{color:var(--muted);margin:5px 0}.inventory-grid article{display:flex;align-items:center;gap:11px}.inventory-grid article>div{flex:1}.inventory-grid strong,.inventory-grid small{display:block}.inventory-grid small{color:var(--muted);margin-top:3px}.inventory-grid b{font-size:1.25rem;color:var(--purple)}.empty-state{display:grid;place-items:center;text-align:center;padding:35px;background:#fff;border:1px solid var(--line);border-radius:20px}.empty-state svg{width:45px;height:45px;fill:none;stroke:var(--purple);stroke-width:1.8}.empty-state span{color:var(--muted);margin-top:5px}
@media(max-width:760px){.resident-grid,.module-grid,.more-grid,.report-grid,.checklist{grid-template-columns:1fr}.info-grid{grid-template-columns:repeat(2,1fr)}.staff-grid,.inventory-grid{grid-template-columns:1fr}.summary-strip,.alert-summary{grid-template-columns:1fr}.toolbar,.filter-row{align-items:stretch;flex-direction:column}.primary-btn{justify-content:center}.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.data-row,.incident-card{align-items:flex-start;flex-wrap:wrap}.history-line{flex-direction:column}.history-line span{text-align:left}.responsive-inactive-card{grid-template-columns:1fr;align-items:flex-start}.inactive-card-side{width:100%;justify-content:space-between}.inactive-card-actions{width:100%;justify-content:flex-start}.inactive-card-actions .mini-btn{flex:1 1 100%;min-width:0}}

/* SeniorCare V0.3.2: navegación, edición y refinamiento visual */
.page-head{position:relative;display:flex;align-items:center;gap:18px;margin-bottom:18px;padding:22px 24px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(100deg,#f6f0ff 0%,#fff 68%);box-shadow:var(--shadow-soft)}
.page-head>div{min-width:0}.page-head>div>span{display:block;color:var(--purple);font-size:.72rem;font-weight:900;letter-spacing:.14em}.page-head h2{margin:5px 0 3px;font-size:1.65rem;letter-spacing:-.03em}.page-head p{margin:0;color:var(--muted)}
.back-btn{display:flex;align-items:center;gap:7px;flex:0 0 auto;border:1px solid #dccdf2;background:#fff;color:var(--purple-dark);border-radius:14px;padding:10px 13px;font-weight:850;cursor:pointer;box-shadow:0 4px 12px rgba(65,37,103,.06)}.back-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.toolbar{display:flex;align-items:center;gap:14px;margin-bottom:16px}.toolbar-copy{display:flex;flex-direction:column;gap:3px;flex:1}.toolbar-copy span{color:var(--muted);font-size:.82rem}.searchbox{display:flex;align-items:center;gap:9px;flex:1;border:1px solid var(--line);background:#fff;border-radius:16px;padding:0 14px;box-shadow:var(--shadow-soft)}.searchbox svg{width:21px;height:21px;fill:none;stroke:var(--muted);stroke-width:2}.searchbox input{width:100%;border:0;outline:0;padding:14px 0;background:transparent}
.resident-card,.data-row,.incident-card,.staff-card{transition:.18s ease}.resident-card:hover,.data-row:hover,.staff-card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.inactive-card{opacity:.94}.muted-avatar{background:#f0edf4!important;color:#81768e!important}.inactive-resident-grid{gap:14px}.responsive-inactive-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;overflow:hidden}.inactive-card-head{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;min-width:0}.inactive-card-copy{min-width:0}.inactive-card-copy strong{display:block;line-height:1.16;word-break:break-word}.inactive-card-copy span,.inactive-card-copy small{display:block;overflow-wrap:anywhere}.inactive-card-side{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.inactive-pill-wrap{display:flex;align-items:center}.inactive-card-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.inactive-card-actions .mini-btn{display:inline-flex;align-items:center;justify-content:center;min-width:118px;white-space:nowrap}
.resident-context{display:flex;align-items:center;gap:12px;margin-bottom:15px;padding:14px 16px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-soft)}.resident-context>div:nth-child(2){flex:1}.resident-context span{display:block;color:var(--muted);font-size:.8rem;margin-top:3px}.compact{padding:9px 12px!important}
.editable-task{display:flex!important;align-items:center;justify-content:space-between;gap:10px}.editable-task>label{display:flex;align-items:center;gap:12px;flex:1;cursor:pointer}.icon-delete{width:34px;height:34px;border:0;border-radius:10px;background:#fff0f2;color:#d43f59;font-size:1.35rem;line-height:1;cursor:pointer}.icon-delete:hover{background:#ffe1e6}.card-actions{display:flex;gap:7px;align-items:center}.staff-card{display:grid!important;grid-template-columns:auto 1fr auto auto;align-items:center;gap:12px}.staff-info{display:flex;flex-direction:column;min-width:0}.staff-info span,.staff-info small{color:var(--muted);margin-top:3px}.staff-info small{font-size:.75rem}
.primary-btn svg,.secondary-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;vertical-align:-4px}.resident-grid,.staff-grid{gap:14px}
@media(max-width:640px){.page-head{padding:17px 16px;border-radius:20px;align-items:flex-start}.page-head h2{font-size:1.35rem}.back-btn span{display:none}.back-btn{padding:10px}.toolbar{align-items:stretch;flex-direction:column}.toolbar .primary-btn{width:100%;justify-content:center}.staff-card{grid-template-columns:auto 1fr}.staff-card>.status,.staff-card>.card-actions{grid-column:2}.resident-context{align-items:flex-start;flex-wrap:wrap}.resident-context .compact{width:100%}.editable-task{padding-right:8px}.page-head p{font-size:.86rem}}

.inventory-toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;margin:14px 0}.inventory-table{display:grid;gap:10px}.inventory-row{display:grid;grid-template-columns:1.4fr .8fr .7fr .8fr auto;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px 14px;box-shadow:var(--shadow-soft)}.inventory-row strong,.inventory-row span,.inventory-row small{display:block}.inventory-row span,.inventory-row small{color:var(--muted);margin-top:3px}.stock-low{color:var(--rose);font-weight:900}.stock-ok{color:var(--mint);font-weight:900}.inventory-actions{display:flex;gap:7px}.inventory-actions button{border:0;border-radius:10px;padding:8px 10px;font-weight:800;cursor:pointer}.inventory-actions .edit{background:var(--purple-soft);color:var(--purple-dark)}.inventory-actions .delete{background:var(--rose-soft);color:var(--rose)}@media(max-width:760px){.inventory-row{grid-template-columns:1fr 1fr}.inventory-actions{grid-column:1/-1}.inventory-toolbar{align-items:stretch;flex-direction:column}}

/* SeniorCare V0.3.4 refinamiento final */
.topbar{min-height:118px;background-position:center right;padding:14px 18px}
.brand-card{padding:10px 14px;border-radius:24px}
.btn{padding:11px 16px;border-radius:16px}
.enhanced-head{display:block;padding:20px 22px;border-radius:26px;background:linear-gradient(135deg,#faf5ff 0%,#ffffff 56%,#f5eefc 100%);border:1px solid #e6daf7;box-shadow:0 10px 24px rgba(72,41,121,.08)}
.page-head-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.section-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 13px;border-radius:999px;background:#f1e9ff;color:var(--purple-dark);font-size:.78rem;font-weight:900;letter-spacing:.04em}
.page-head-body{display:flex;align-items:center;justify-content:space-between;gap:20px}
.page-copy{min-width:0}.page-kicker{display:block;color:#6d3ed2;font-size:.76rem;font-weight:900;letter-spacing:.18em;margin-bottom:8px}.page-copy h2{margin:0;font-size:2rem;line-height:1.02;color:#261c3a;letter-spacing:-.04em}.page-copy p{margin:8px 0 0;color:#746b84;font-size:1.02rem;max-width:720px}
.page-icon-shell{width:76px;height:76px;flex:0 0 auto;display:grid;place-items:center;border-radius:24px;background:linear-gradient(135deg,#7d43dd 0%,#dca1cb 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 12px 22px rgba(122,68,205,.18)}
.page-icon-shell svg{width:38px;height:38px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.back-btn{display:inline-flex;align-items:center;gap:9px;border:1px solid #d9c9f5;background:#fff;color:var(--purple-dark);border-radius:999px;padding:10px 14px;font-weight:850;cursor:pointer;box-shadow:0 8px 18px rgba(65,37,103,.08)}
.back-btn:hover{transform:translateY(-1px)}
.back-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#f2ebff;color:var(--purple)}
.back-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.toolbar-actions{display:flex;gap:10px;flex-wrap:wrap}
.compact-toolbar{align-items:flex-start}
.compact-toolbar .toolbar-copy{padding-top:2px}
.incident-list .incident-card{align-items:flex-start}
.incident-list .card-actions{margin-left:auto}
.form-card textarea{resize:vertical}
@media(max-width:760px){
  .topbar{min-height:165px;background-image:linear-gradient(180deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.80) 44%,rgba(255,255,255,.18) 100%),url("assets/header-home-care.webp");background-position:center right;padding:12px}
  .brand-card{padding:8px 10px}
  .page-head-top,.page-head-body{flex-direction:column;align-items:flex-start}
  .page-icon-shell{width:62px;height:62px;border-radius:20px}
  .page-icon-shell svg{width:30px;height:30px}
  .page-copy h2{font-size:1.6rem}
  .page-copy p{font-size:.92rem}
  .section-chip{font-size:.72rem}
  .back-btn span:last-child{display:inline}
  .toolbar-actions{width:100%}
  .toolbar-actions .primary-btn,.toolbar-actions .secondary-btn{flex:1;justify-content:center}
}

/* SeniorCare V0.3.5 módulos editables */
.note-card{display:flex;align-items:flex-start;gap:14px;padding:14px 0;border-top:1px solid var(--line)}
.note-card>div{flex:1}.note-card b,.note-card span{display:block}.note-card span{color:var(--muted);font-size:.82rem;margin-top:3px}.note-card p{margin:9px 0 0;line-height:1.5;color:#463b57}
.appointment-row .card-actions{margin-left:auto}.appointment-row small{line-height:1.35}
#appointmentForm,#movementForm{margin-bottom:16px;border-color:#dac9f3;background:linear-gradient(135deg,#fff,#fbf8ff)}
.staff-card .card-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:760px){.appointment-row .card-actions{width:100%;margin-left:0}.appointment-row .card-actions .mini-btn{flex:1}.note-card{align-items:flex-start}.staff-card .card-actions{grid-column:1/-1;justify-content:flex-start}.staff-card>.status{grid-column:auto}#careShiftSelect,.care-controls select,.report-resident-select select{width:100%}.medical-note-card .card-actions,.record-actions{width:100%;justify-content:flex-start}}

/* V0.3.6 refinamientos funcionales */
.topbar{min-height:104px;background-image:linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.93) 28%,rgba(255,255,255,.42) 58%,rgba(255,255,255,.08) 100%),url("assets/header-home-care.webp");background-size:cover;background-position:center right}
@media(max-width:640px){.topbar{min-height:152px;background-image:linear-gradient(180deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.83) 42%,rgba(255,255,255,.18) 100%),url("assets/header-home-care.webp");}}
.enhanced-head{overflow:hidden;position:relative;border:none}
.enhanced-head::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(125,67,221,.12),rgba(255,255,255,0) 38%,rgba(220,161,203,.12));pointer-events:none}
.enhanced-head .page-copy h2{font-size:1.88rem;color:#23193a}
.enhanced-head .page-copy p{font-size:1rem}
.enhanced-head.tone-purple{background:linear-gradient(135deg,#f6f0ff 0%,#fff 58%,#f4ebff 100%);box-shadow:0 10px 26px rgba(119,66,199,.10)}
.enhanced-head.tone-fuchsia{background:linear-gradient(135deg,#fff0f7 0%,#fff 58%,#fff3fa 100%);box-shadow:0 10px 26px rgba(215,79,157,.09)}
.enhanced-head.tone-cyan{background:linear-gradient(135deg,#eef7ff 0%,#fff 58%,#eefbff 100%);box-shadow:0 10px 26px rgba(55,138,225,.09)}
.enhanced-head.tone-mint{background:linear-gradient(135deg,#edfdf6 0%,#fff 58%,#f0fff8 100%);box-shadow:0 10px 26px rgba(37,165,126,.10)}
.enhanced-head.tone-amber{background:linear-gradient(135deg,#fff7ea 0%,#fff 58%,#fffaf0 100%);box-shadow:0 10px 26px rgba(209,145,33,.09)}
.enhanced-head.tone-purple .page-kicker,.enhanced-head.tone-purple .section-chip{color:#6f35cf}.enhanced-head.tone-purple .section-chip{background:#f0e6ff}
.enhanced-head.tone-fuchsia .page-kicker,.enhanced-head.tone-fuchsia .section-chip{color:#c93b79}.enhanced-head.tone-fuchsia .section-chip{background:#ffe4f0}
.enhanced-head.tone-cyan .page-kicker,.enhanced-head.tone-cyan .section-chip{color:#2e79d2}.enhanced-head.tone-cyan .section-chip{background:#e6f2ff}
.enhanced-head.tone-mint .page-kicker,.enhanced-head.tone-mint .section-chip{color:#12825d}.enhanced-head.tone-mint .section-chip{background:#dff8ee}
.enhanced-head.tone-amber .page-kicker,.enhanced-head.tone-amber .section-chip{color:#bc7b12}.enhanced-head.tone-amber .section-chip{background:#fff1d9}
.enhanced-head.tone-purple .page-icon-shell{background:linear-gradient(135deg,#7d43dd 0%,#dca1cb 100%)}
.enhanced-head.tone-fuchsia .page-icon-shell{background:linear-gradient(135deg,#ca3d7c 0%,#ef8db8 100%)}
.enhanced-head.tone-cyan .page-icon-shell{background:linear-gradient(135deg,#2f80e3 0%,#79c3ff 100%)}
.enhanced-head.tone-mint .page-icon-shell{background:linear-gradient(135deg,#1d9b72 0%,#8ce1c3 100%)}
.enhanced-head.tone-amber .page-icon-shell{background:linear-gradient(135deg,#d18b1f 0%,#f1cd7b 100%)}
.back-btn{padding:10px 15px;border-radius:999px;background:#fff;border:1px solid rgba(112,63,206,.12);box-shadow:0 8px 18px rgba(71,36,116,.08);width:auto;height:auto}
.back-btn .back-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#f1e8ff;color:#6d37cf}
.back-btn svg{width:18px;height:18px}
.history-record,.timeline-view{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;background:none;border:0;text-align:left;cursor:pointer;color:inherit}
.history-record>div,.timeline-view>div{min-width:0}
.history-record span,.timeline-view span,.timeline-view p{display:block;color:var(--muted);margin-top:4px}
.history-record em,.timeline-view em{font-style:normal;font-weight:800;color:var(--purple)}
.history-record.active,.timeline-record.active .timeline-view{background:linear-gradient(90deg,rgba(118,64,214,.06),rgba(118,64,214,0));border-radius:14px;padding:14px}
.detail-card{background:linear-gradient(135deg,#fff 0%,#faf7ff 100%)}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.detail-grid article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:13px}.detail-grid span{display:block;color:var(--muted);font-size:.78rem}.detail-grid strong{display:block;margin-top:5px;line-height:1.4}
.timeline-record{display:flex;gap:10px;align-items:flex-start;border-top:1px solid var(--line)}
.timeline-record .icon-delete{margin-top:12px}
.icon-delete{border:0;background:#fff0f2;color:#cb3b58;border-radius:10px;width:34px;height:34px;font-size:1.1rem;cursor:pointer}
.history-card .empty-state{margin-top:8px}
.procedure-card{margin-bottom:14px}
.form-card .primary-btn,.history-card .primary-btn{justify-content:center}
@media(max-width:760px){.detail-grid{grid-template-columns:1fr}.timeline-record{flex-direction:column}.timeline-record .icon-delete{margin-top:0}.history-record,.timeline-view{padding:12px 0}.enhanced-head .page-copy h2{font-size:1.55rem}}

/* V0.3.7 alertas y escritorio */
.topbar{display:grid;grid-template-columns:minmax(260px,1fr) auto minmax(90px,1fr);align-items:center;column-gap:18px}
.topbar .brand-card{justify-self:start}.topbar .alerts{justify-self:center}.topbar .logout{justify-self:end}
.alerts.has-alerts{color:#0f7f5d;border-color:#78d5b7;box-shadow:0 8px 20px rgba(35,169,124,.14)}
.alert-row.vista{opacity:.82}.alert-row.resuelta{opacity:.62;background:#f8fbfa}.alert-row.nueva{border-color:#f1c7d4}
.report-grid button{cursor:pointer}.report-grid button:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
@media(max-width:640px){.topbar{display:grid;grid-template-columns:1fr auto;grid-template-areas:"brand brand" "alerts logout";row-gap:10px}.topbar .brand-card{grid-area:brand}.topbar .alerts{grid-area:alerts;justify-self:start}.topbar .logout{grid-area:logout;justify-self:end}}
@media print{.topbar,.bottom-nav,.back-btn,.form-actions,.toolbar{display:none!important}.app-shell{max-width:none;padding:0}.container{padding:0}.history-card{box-shadow:none;border:0}}

/* V0.3.8 Personal y turnos rediseñado */
.staff-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:4px 0 16px}.staff-toolbar>div{display:flex;flex-direction:column;gap:4px}.staff-toolbar span{color:var(--muted);font-size:.88rem}
.staff-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.staff-summary article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px 17px;box-shadow:var(--shadow-soft)}.staff-summary span{display:block;color:var(--muted);font-size:.78rem}.staff-summary strong{display:block;margin-top:5px;font-size:1.45rem;color:var(--purple-dark)}
.clean-staff-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.clean-staff-card{display:block!important;padding:18px!important;border-radius:22px!important;min-width:0}.staff-card-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;padding-bottom:14px;border-bottom:1px solid var(--line)}.staff-name{min-width:0}.staff-name strong{display:block;font-size:1.05rem;line-height:1.2}.staff-name span{display:block;color:var(--muted);margin-top:4px}.staff-meta{display:grid;grid-template-columns:.8fr 1.5fr .8fr;gap:12px;padding:15px 0}.staff-meta div{min-width:0}.staff-meta span{display:block;color:var(--muted);font-size:.72rem;margin-bottom:4px}.staff-meta strong{display:block;font-size:.86rem;line-height:1.35;word-break:normal;overflow-wrap:anywhere}.staff-actions{display:flex;align-items:center;gap:9px;padding-top:13px;border-top:1px solid var(--line)}.staff-actions .secondary-btn{flex:1;justify-content:center}.staff-actions .mini-btn{padding:10px 14px}.staff-actions .icon-delete{margin-left:auto}.staff-turn-summary{margin-top:18px}
@media(max-width:900px){.clean-staff-grid{grid-template-columns:1fr}.staff-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.staff-toolbar{align-items:stretch;flex-direction:column}.staff-toolbar .primary-btn{width:100%;justify-content:center}.staff-summary{grid-template-columns:1fr}.staff-card-head{grid-template-columns:auto 1fr}.staff-card-head>.status{grid-column:2;justify-self:start}.staff-meta{grid-template-columns:1fr}.staff-actions{flex-wrap:wrap}.staff-actions .secondary-btn{width:100%;flex-basis:100%}.staff-actions .mini-btn{flex:1}.staff-actions .icon-delete{margin-left:0}}

/* V0.3.8: personal más claro y banner más amplio */
.topbar{min-height:150px;padding:18px 22px;background-size:cover;background-position:center right}
.brand-card{padding:12px 16px}
.brand-logo{width:62px;height:62px}.brand-copy h1{font-size:1.48rem}.product-name{font-size:1.66rem}
.staff-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:stretch;margin-bottom:18px}
.staff-summary>div{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px 18px;box-shadow:var(--shadow-soft)}
.staff-summary strong,.staff-summary span{display:block}.staff-summary strong{font-size:1.55rem;color:var(--purple-dark)}.staff-summary span{margin-top:4px;color:var(--muted);font-size:.82rem}.staff-summary .primary-btn{align-self:stretch;justify-content:center}
.staff-grid.redesigned{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.staff-card.redesigned-card{display:block!important;padding:18px;border-radius:22px;min-width:0}
.staff-card-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center}
.staff-title{min-width:0}.staff-title strong,.staff-title span{display:block}.staff-title strong{font-size:1.05rem;line-height:1.2}.staff-title span{margin-top:4px;color:var(--muted);font-size:.84rem}
.staff-meta{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin:16px 0 14px}.staff-meta span{display:block;padding:11px 12px;border-radius:14px;background:#faf8fd;color:var(--muted);font-size:.8rem;line-height:1.35}.staff-meta b{display:block;margin-bottom:4px;color:var(--ink);font-size:.72rem;text-transform:uppercase;letter-spacing:.06em}
.staff-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.staff-actions .secondary-btn{flex:1}.staff-actions .mini-btn{min-width:82px}.staff-actions .icon-delete{margin-left:auto}
@media(max-width:900px){.staff-summary{grid-template-columns:repeat(3,1fr)}.staff-summary .primary-btn{grid-column:1/-1}.staff-grid.redesigned{grid-template-columns:1fr}}
@media(max-width:640px){.topbar{min-height:205px;padding:14px}.brand-logo{width:54px;height:54px}.brand-copy h1{font-size:1.2rem}.product-name{font-size:1.4rem}.staff-summary{grid-template-columns:1fr 1fr}.staff-summary>div:first-child{grid-column:1/-1}.staff-summary .primary-btn{grid-column:1/-1}.staff-meta{grid-template-columns:1fr}.staff-card-head{grid-template-columns:auto 1fr}.staff-card-head .status{grid-column:2}.staff-actions{align-items:stretch}.staff-actions .secondary-btn{flex:1 1 100%}.staff-actions .mini-btn{flex:1}.staff-actions .icon-delete{margin-left:0}}

/* V0.3.9: botón compacto de cuidados pendientes */
.compact-priority{margin-top:18px;border-radius:18px;overflow:hidden;box-shadow:0 12px 26px rgba(201,29,89,.17)}
.priority-button{width:100%;display:flex;align-items:center;justify-content:flex-end;gap:12px;border:0;padding:14px 18px;background:linear-gradient(100deg,#c91d59,#f05284);color:#fff;cursor:pointer;text-align:left}
.priority-button:hover{filter:brightness(1.02)}
.priority-button-label{margin-right:auto;font-weight:900;font-size:1rem}
.priority-count{display:grid;place-items:center;min-width:34px;height:34px;padding:0 10px;border-radius:999px;background:#fff;color:#b41850;font-size:.88rem;font-weight:950}
.priority-arrow{font-size:1.7rem;font-weight:700;line-height:1}
@media(max-width:640px){.priority-button{padding:13px 15px}.priority-button-label{font-size:.92rem}.priority-count{min-width:32px;height:32px}}

/* Revisión final del banner principal V0.3.9.1 */
.topbar{
  min-height:132px;
  height:132px;
  padding:14px 20px;
  background-size:cover;
  background-position:center center;
  overflow:hidden;
}
.brand-card{max-width:310px}
@media(max-width:640px){
  .topbar{
    min-height:180px;
    height:180px;
    padding:12px;
    background-size:cover;
    background-position:center center;
  }
}

/* SeniorCare V0.3.9.1 — banner auditado */
.topbar{
  min-height:132px !important;
  height:132px !important;
  padding:14px 20px !important;
  background-size:cover !important;
  background-position:center right !important;
  background-repeat:no-repeat !important;
}
@media(max-width:640px){
  .topbar{
    min-height:180px !important;
    height:180px !important;
    padding:12px !important;
    background-size:auto 100% !important;
    background-position:right center !important;
    background-color:#fbf8ff !important;
  }
}

/* V0.4.0 banner final aprobado */
.topbar{
  display:grid !important;
  grid-template-columns:auto 1fr auto !important;
  grid-template-areas:
    "brand spacer logout"
    "alerts spacer logout" !important;
  align-items:start !important;
  row-gap:14px !important;
  min-height:188px !important;
  height:188px !important;
  padding:18px 22px 16px !important;
  background-image:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.94) 28%,rgba(255,255,255,.38) 58%,rgba(255,255,255,.08) 78%),url("assets/header-home-care.webp") !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-position:center center !important;
}
.topbar .brand-card{grid-area:brand;justify-self:start;align-self:start;max-width:400px;padding:12px 16px;border-radius:28px;background:rgba(255,255,255,.92)}
.topbar .alerts{grid-area:alerts;justify-self:start;align-self:end}
.topbar .logout{grid-area:logout;justify-self:end;align-self:end}
.brand-logo{width:60px;height:60px}.brand-copy h1{font-size:1.44rem}.product-name{font-size:1.62rem}
.btn{padding:12px 18px;border-radius:18px}.alerts{font-size:1rem}.logout{font-size:1rem}
@media(max-width:640px){
  .topbar{
    grid-template-columns:1fr auto !important;
    grid-template-areas:"brand brand" "alerts logout" !important;
    row-gap:12px !important;
    min-height:194px !important;
    height:194px !important;
    padding:14px 14px 12px !important;
    background-image:linear-gradient(180deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.86) 40%,rgba(255,255,255,.24) 72%,rgba(255,255,255,.08) 100%),url("assets/header-home-care.webp") !important;
    background-size:cover !important;
    background-position:center center !important;
  }
  .topbar .brand-card{max-width:270px;padding:10px 12px;border-radius:24px}
  .brand-logo{width:52px;height:52px}.brand-copy h1{font-size:1.16rem}.product-name{font-size:1.36rem}
  .btn{padding:10px 14px;border-radius:18px;font-size:.86rem}
}

/* V0.4.1 ajuste fino del banner: imagen más pequeña */
.topbar{
  background-size:auto 82% !important;
  background-position:right 14px center !important;
  background-color:#faf7fd !important;
}
@media(max-width:640px){
  .topbar{
    background-size:auto 62% !important;
    background-position:right 10px bottom !important;
    min-height:186px !important;
    height:186px !important;
  }
}

/* V0.4.2 optimización móvil general */
@media (max-width: 640px) {
  html{font-size:14px !important}
  body{font-size:14px !important}
  .app-shell,.shell,.main-shell,.main-container,.content,.page{max-width:100% !important}
  .topbar{
    min-height:166px !important;
    height:166px !important;
    padding:12px 12px 10px !important;
    row-gap:10px !important;
  }
  .topbar .brand-card{
    max-width:240px !important;
    padding:9px 11px !important;
    border-radius:22px !important;
    gap:10px !important;
  }
  .brand-logo{width:46px !important;height:46px !important}
  .brand-copy h1{font-size:1.03rem !important;line-height:1.02 !important}
  .product-name{font-size:1.18rem !important;line-height:1 !important}
  .btn,.alerts,.logout{
    padding:9px 13px !important;
    font-size:.84rem !important;
    border-radius:16px !important;
  }

  .container,.app-content,main,.main{padding-left:12px !important;padding-right:12px !important}

  .hero,.dashboard-hero,.welcome-card,.hero-card{
    border-radius:24px !important;
    padding:16px 16px 18px !important;
    min-height:auto !important;
  }
  .hero .eyebrow,.dashboard-hero .eyebrow,.welcome-card .eyebrow{font-size:.78rem !important;letter-spacing:.14em !important}
  .hero h2,.dashboard-hero h2,.welcome-card h2{font-size:2.15rem !important;line-height:1.04 !important;margin:10px 0 8px !important}
  .hero p,.dashboard-hero p,.welcome-card p{font-size:1rem !important;line-height:1.35 !important;max-width:82% !important}
  .hero-icon,.welcome-icon{width:58px !important;height:58px !important;border-radius:18px !important}

  .stats-grid,.metrics,.summary-grid,.dashboard-grid{
    gap:12px !important;
    grid-template-columns:1fr 1fr !important;
  }
  .stat-card,.metric-card,.summary-card,.dashboard-card,.mini-card{
    min-height:auto !important;
    padding:14px 14px !important;
    border-radius:20px !important;
  }
  .stat-card h3,.metric-card h3,.summary-card h3,.dashboard-card h3{font-size:1.05rem !important;line-height:1.08 !important}
  .stat-card .value,.metric-card .value,.summary-card .value,.dashboard-card .value{font-size:2rem !important;line-height:1 !important}
  .stat-card p,.metric-card p,.summary-card p,.dashboard-card p{font-size:.88rem !important;line-height:1.2 !important}
  .stat-icon,.metric-icon,.summary-icon,.dashboard-icon{width:48px !important;height:48px !important;border-radius:15px !important}

  .section-header,.section-title,.strip-title,.quick-header{
    margin:14px 0 10px !important;
    padding:0 !important;
  }
  .section-header h3,.section-title h3,.strip-title h3,.quick-header h3{font-size:1.35rem !important}

  .quick-grid,.shortcuts,.action-grid,.menu-grid{
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }
  .quick-card,.shortcut,.action-card,.module-card{
    padding:13px 12px !important;
    border-radius:18px !important;
    min-height:108px !important;
  }
  .quick-card strong,.shortcut strong,.action-card strong,.module-card strong{font-size:.98rem !important;line-height:1.12 !important}
  .quick-card small,.shortcut small,.action-card small,.module-card small{font-size:.82rem !important;line-height:1.2 !important}
  .quick-icon,.action-icon,.shortcut .si{width:42px !important;height:42px !important;border-radius:14px !important}

  .enhanced-head{
    padding:15px 15px !important;
    border-radius:22px !important;
  }
  .page-head-top{margin-bottom:10px !important}
  .page-copy h2{font-size:1.42rem !important;line-height:1.05 !important}
  .page-copy p{font-size:.92rem !important;line-height:1.28 !important;margin-top:7px !important}
  .page-kicker{font-size:.68rem !important;letter-spacing:.14em !important;margin-bottom:6px !important}
  .section-chip{font-size:.68rem !important;padding:7px 10px !important}
  .page-icon-shell{width:50px !important;height:50px !important;border-radius:16px !important}
  .page-icon-shell svg{width:24px !important;height:24px !important}
  .back-btn{padding:8px 11px !important;font-size:.8rem !important}
  .back-btn .back-icon{width:24px !important;height:24px !important}

  .toolbar,.compact-toolbar,.filter-row,.resident-context,.summary-strip,.alert-summary{
    gap:10px !important;
  }
  .toolbar,.compact-toolbar{padding:12px !important;border-radius:18px !important}
  .toolbar-copy strong{font-size:1rem !important}
  .toolbar-copy span{font-size:.84rem !important}
  .filter-row{grid-template-columns:1fr !important}
  input,select,textarea,button{font-size:16px}
  .form-card{padding:14px !important;border-radius:20px !important}
  .form-grid{grid-template-columns:1fr !important;gap:11px !important}
  .form-actions{gap:10px !important}
  .primary-btn,.secondary-btn,.mini-btn{padding:10px 14px !important;font-size:.88rem !important;border-radius:14px !important}

  .resident-list,.list-stack,.checklist,.timeline,.records-list{gap:10px !important}
  .resident-card,.list-card,.incident-card,.check-item,.timeline-record,.history-card,.procedure-card,.note-card{
    border-radius:18px !important;
  }
  .resident-card,.incident-card,.list-card{padding:13px !important}
  .resident-card strong,.incident-card strong,.list-card strong{font-size:1rem !important}
  .resident-card span,.incident-card span,.list-card span,.resident-card small,.incident-card small,.list-card small{font-size:.84rem !important;line-height:1.24 !important}

  .bottom-nav,.nav-bottom,nav.bottom{
    height:74px !important;
    padding:8px 8px 10px !important;
  }
  .nav-item,.nav,.bottom-nav a,.bottom-nav button{
    font-size:.8rem !important;
    gap:3px !important;
  }
  .nav-item svg,.nav svg,.bottom-nav svg{width:24px !important;height:24px !important}
}

/* V0.4.3 ajustes finos móvil y banner */
.topbar{
  background-image:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.92) 25%,rgba(255,255,255,.28) 52%,rgba(255,255,255,.06) 72%),url("assets/header-home-care.webp") !important;
  background-size:cover !important;
  background-position:center top !important;
}
@media(max-width:640px){
  .topbar{
    background-image:linear-gradient(180deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.82) 34%,rgba(255,255,255,.20) 66%,rgba(255,255,255,.05) 100%),url("assets/header-home-care.webp") !important;
    background-size:cover !important;
    background-position:center top !important;
    min-height:172px !important;
    height:172px !important;
  }

  /* Encabezados internos más compactos */
  .page-head,
  .enhanced-head{
    padding:12px 12px !important;
    border-radius:18px !important;
    margin-bottom:12px !important;
  }
  .page-head-top{margin-bottom:8px !important}
  .page-copy h2,
  .enhanced-head .page-copy h2{font-size:1.22rem !important;line-height:1.04 !important;letter-spacing:-.02em !important}
  .page-copy p,
  .enhanced-head .page-copy p{font-size:.84rem !important;line-height:1.22 !important;margin-top:5px !important}
  .page-kicker{font-size:.62rem !important;letter-spacing:.12em !important;margin-bottom:4px !important}
  .section-chip{font-size:.62rem !important;padding:6px 9px !important}
  .page-icon-shell{width:42px !important;height:42px !important;border-radius:14px !important}
  .page-icon-shell svg{width:20px !important;height:20px !important}
  .back-btn{padding:7px 10px !important;font-size:.76rem !important;border-radius:999px !important}
  .back-btn .back-icon{width:22px !important;height:22px !important}

  /* Módulos y tarjetas un poco más compactos */
  .form-card,.history-card,.procedure-card,.handoff-card{padding:14px !important;border-radius:18px !important}
  .resident-card,.admin-stat,.module-card,.report-grid button,.quick-card{border-radius:16px !important}
}

/* Botón rojo más grande */
.compact-priority,.priority-card{margin-top:20px !important;border-radius:22px !important}
.priority-button{
  padding:18px 22px !important;
  gap:14px !important;
  border-radius:20px !important;
  min-height:64px !important;
}
.priority-button-label{font-size:1.08rem !important;letter-spacing:.01em !important}
.priority-count{min-width:42px !important;height:42px !important;font-size:1rem !important;padding:0 12px !important}
.priority-arrow{font-size:1.95rem !important}
@media(max-width:640px){
  .priority-button{padding:16px 18px !important;min-height:60px !important}
  .priority-button-label{font-size:1rem !important}
  .priority-count{min-width:40px !important;height:40px !important;font-size:.96rem !important}
}

/* V0.4.4 ajuste final del banner: menos opacidad y más centrado */
.topbar{
  background-image:linear-gradient(90deg,rgba(255,255,255,.90) 0%,rgba(255,255,255,.72) 22%,rgba(255,255,255,.14) 48%,rgba(255,255,255,0) 68%),url("assets/header-home-care.webp") !important;
  background-position:72% top !important;
}
@media(max-width:640px){
  .topbar{
    background-image:linear-gradient(180deg,rgba(255,255,255,.92) 0%,rgba(255,255,255,.62) 28%,rgba(255,255,255,.10) 58%,rgba(255,255,255,0) 86%),url("assets/header-home-care.webp") !important;
    background-position:68% top !important;
  }
}

/* V0.4.5 módulo Residentes profesional */
.residents-pro-head{position:relative;overflow:hidden;margin-bottom:16px;padding:18px 20px 16px;border-radius:22px;background:linear-gradient(115deg,#f2e9ff 0%,#fff 56%,#f8efff 100%);border:1px solid #e4d7f4;box-shadow:0 12px 28px rgba(76,36,139,.10)}
.residents-pro-head::after{content:"";position:absolute;width:150px;height:150px;border-radius:50%;right:-55px;top:-70px;background:linear-gradient(145deg,rgba(113,55,207,.16),rgba(223,143,197,.18))}
.residents-head-top{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px}
.residents-module-tag{padding:7px 11px;border-radius:999px;background:#fff;color:#6d35c8;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;border:1px solid #eadff8}
.residents-back{padding:8px 12px!important;font-size:.8rem!important}
.residents-head-main{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px}
.residents-head-copy h2{margin:0;color:#261b3d;font-size:1.8rem;line-height:1;letter-spacing:-.04em}.residents-head-copy p{margin:7px 0 0;color:#6f667d;font-size:.95rem}
.residents-head-icon{display:grid;place-items:center;width:62px;height:62px;flex:0 0 auto;border-radius:19px;background:linear-gradient(145deg,#6f35cf,#d98cc8);color:#fff;box-shadow:0 10px 22px rgba(112,55,207,.22)}
.residents-head-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.residents-head-stats{position:relative;z-index:2;display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.residents-head-stats span{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:11px;background:rgba(255,255,255,.78);border:1px solid #eadff6;color:#6f667d;font-size:.76rem}.residents-head-stats b{color:#5a27b5;font-size:.9rem}
.residents-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;margin-bottom:16px}.residents-search{min-height:50px;border-radius:16px;padding:0 14px}.residents-search input{font-size:.95rem}.residents-new{min-height:50px;padding:0 18px!important;border-radius:16px!important}
.professional-resident-grid{gap:12px}.professional-resident-card{min-height:94px;padding:15px 16px;border-radius:20px;border-color:#e8dff2;box-shadow:0 7px 18px rgba(60,35,91,.07);transition:.18s ease}.professional-resident-card:hover{transform:translateY(-2px);box-shadow:0 13px 28px rgba(60,35,91,.12)}
.resident-card-copy{flex:1;min-width:0}.resident-card-copy strong{font-size:1.02rem;color:#231833}.resident-card-copy span{font-size:.86rem}.resident-card-copy small{font-size:.8rem}.resident-arrow{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:#f5f0fb;color:#6f35cf!important;font-size:1.35rem!important}
@media(max-width:640px){
  .residents-pro-head{padding:12px 13px 12px;border-radius:17px;margin-bottom:12px}
  .residents-pro-head::after{width:105px;height:105px;right:-40px;top:-48px}
  .residents-head-top{gap:8px}.residents-module-tag{padding:5px 8px;font-size:.59rem;letter-spacing:.06em}
  .residents-back{padding:6px 9px!important;font-size:.72rem!important}.residents-back .back-icon{width:21px!important;height:21px!important}
  .residents-head-main{margin-top:10px;gap:12px}.residents-head-copy h2{font-size:1.35rem}.residents-head-copy p{margin-top:4px;font-size:.82rem;line-height:1.2}
  .residents-head-icon{width:46px;height:46px;border-radius:14px}.residents-head-icon svg{width:23px;height:23px}
  .residents-head-stats{gap:6px;margin-top:10px}.residents-head-stats span{padding:5px 8px;border-radius:9px;font-size:.67rem}.residents-head-stats b{font-size:.77rem}
  .residents-actions{grid-template-columns:1fr;gap:9px;margin-bottom:12px}.residents-search{min-height:44px;border-radius:14px}.residents-new{min-height:44px!important;width:100%;justify-content:center;border-radius:14px!important}
  .professional-resident-grid{gap:10px}.professional-resident-card{min-height:82px;padding:12px 13px;border-radius:17px}.professional-resident-card .avatar{width:44px;height:44px;border-radius:13px}.resident-card-copy strong{font-size:.96rem}.resident-card-copy span{font-size:.8rem}.resident-card-copy small{font-size:.74rem}.resident-arrow{width:27px;height:27px;border-radius:9px}
}

/* V0.4.6 encabezados pro unificados */
.module-pro-head{
  position:relative;
  overflow:hidden;
  margin-bottom:16px;
  padding:18px 20px 16px;
  border-radius:22px;
  border:1px solid #e4d7f4;
  background:linear-gradient(115deg,#f2e9ff 0%,#fff 56%,#f8efff 100%);
  box-shadow:0 12px 28px rgba(76,36,139,.10);
}
.module-pro-head::after{
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  border-radius:50%;
  right:-55px;
  top:-70px;
  background:linear-gradient(145deg,rgba(113,55,207,.16),rgba(223,143,197,.18));
}
.module-head-top{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px}
.module-module-tag{
  display:inline-flex;align-items:center;justify-content:center;
  padding:9px 14px;border-radius:999px;background:#fff;border:1px solid #e6d9f7;
  color:#6b39c9;font-size:.78rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase;
}
.module-head-main{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px}
.module-head-copy{min-width:0}
.module-head-copy h2{margin:0;color:#261b3d;font-size:1.82rem;line-height:1.02;letter-spacing:-.04em}
.module-head-copy p{margin:7px 0 0;color:#6f667d;font-size:.96rem;line-height:1.35;max-width:520px}
.module-head-icon{display:grid;place-items:center;width:62px;height:62px;flex:0 0 auto;border-radius:19px;background:linear-gradient(145deg,#6f35cf,#d98cc8);color:#fff;box-shadow:0 10px 22px rgba(112,55,207,.22)}
.module-head-icon svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.module-tone-purple{background:linear-gradient(115deg,#f2e9ff 0%,#fff 56%,#f8efff 100%);border-color:#e4d7f4}
.module-tone-purple::after{background:linear-gradient(145deg,rgba(113,55,207,.16),rgba(223,143,197,.18))}
.module-tone-purple .module-module-tag{color:#6b39c9}
.module-tone-purple .module-head-icon{background:linear-gradient(145deg,#6f35cf,#d98cc8)}

.module-tone-fuchsia{background:linear-gradient(115deg,#fff0f6 0%,#fff 56%,#fff4f8 100%);border-color:#f2d6e5}
.module-tone-fuchsia::after{background:linear-gradient(145deg,rgba(203,59,121,.16),rgba(244,160,186,.2))}
.module-tone-fuchsia .module-module-tag{color:#bf3c75;border-color:#f0d2e1}
.module-tone-fuchsia .module-head-icon{background:linear-gradient(145deg,#cb3b79,#f09cbc)}

.module-tone-cyan{background:linear-gradient(115deg,#eef7ff 0%,#fff 56%,#f1fbff 100%);border-color:#d7e8f8}
.module-tone-cyan::after{background:linear-gradient(145deg,rgba(48,122,210,.14),rgba(125,200,248,.18))}
.module-tone-cyan .module-module-tag{color:#2f7ad2;border-color:#d9eafb}
.module-tone-cyan .module-head-icon{background:linear-gradient(145deg,#2f7ad2,#7dc8f8)}

.module-tone-amber{background:linear-gradient(115deg,#fff7ea 0%,#fff 56%,#fffaf1 100%);border-color:#f3e1bf}
.module-tone-amber::after{background:linear-gradient(145deg,rgba(201,134,29,.14),rgba(241,202,118,.18))}
.module-tone-amber .module-module-tag{color:#be7a10;border-color:#f3e3c2}
.module-tone-amber .module-head-icon{background:linear-gradient(145deg,#cf891d,#f1c76d)}

.module-tone-mint{background:linear-gradient(115deg,#eefcf6 0%,#fff 56%,#f3fff9 100%);border-color:#d8efe5}
.module-tone-mint::after{background:linear-gradient(145deg,rgba(24,133,96,.15),rgba(127,216,182,.18))}
.module-tone-mint .module-module-tag{color:#188560;border-color:#d7eee4}
.module-tone-mint .module-head-icon{background:linear-gradient(145deg,#188560,#7fd8b6)}

.module-tone-rose{background:linear-gradient(115deg,#fff3f6 0%,#fff 56%,#fff8fa 100%);border-color:#f3dce3}
.module-tone-rose::after{background:linear-gradient(145deg,rgba(204,91,120,.14),rgba(239,175,194,.18))}
.module-tone-rose .module-module-tag{color:#c25273;border-color:#f0dae2}
.module-tone-rose .module-head-icon{background:linear-gradient(145deg,#cb5b78,#efafc2)}

/* make generic headers match approved residents header on mobile */
@media(max-width:640px){
  .module-pro-head{
    padding:12px 13px 12px !important;
    border-radius:17px !important;
    margin-bottom:12px !important;
  }
  .module-pro-head::after{width:105px;height:105px;right:-40px;top:-48px}
  .module-head-top{gap:8px}
  .module-module-tag{padding:5px 8px;font-size:.59rem;letter-spacing:.06em}
  .module-head-main{margin-top:10px;gap:12px}
  .module-head-copy h2{font-size:1.35rem !important}
  .module-head-copy p{margin-top:4px;font-size:.82rem !important;line-height:1.2 !important}
  .module-head-icon{width:46px;height:46px;border-radius:14px}
  .module-head-icon svg{width:23px;height:23px}
}

/* V0.4.7 coherencia clínica y legibilidad */
.form-grid label,.form-card label{font-size:.9rem!important;line-height:1.3!important;color:#5f556f!important}
.form-grid input,.form-grid select,.form-grid textarea,.filter-row select,.searchbox input{font-size:1rem!important;line-height:1.35!important}
.form-card h3,.history-card h3{font-size:1.18rem!important}
.status.ok{background:#e5f8ef!important;color:#147a57!important}
.status.warn{background:#fff1cf!important;color:#9b6812!important}
.status.danger{background:#ffe5e9!important;color:#bc2948!important}
.history-record{cursor:pointer;border:0;background:transparent;width:100%}
.history-record:hover{background:#faf7ff}
.resident-context{margin-bottom:12px}
.resident-context strong{display:block;margin-bottom:4px;line-height:1.25}
.resident-context>div:nth-child(2){min-width:0}
.resident-context .status{margin-left:auto;align-self:flex-start}
@media(max-width:640px){
  .form-grid label,.form-card label{font-size:.92rem!important}
  .form-grid input,.form-grid select,.form-grid textarea,.filter-row select,.searchbox input{font-size:16px!important;padding:12px!important}
  .form-actions{display:grid!important;grid-template-columns:1fr!important}
  .form-actions .primary-btn,.form-actions .secondary-btn{width:100%!important;justify-content:center!important}
}

/* V0.4.8 historial como fuente única de detalle */
.record-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.record-row:first-of-type{border-top:0}
.record-main{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:14px;border:0;background:transparent;padding:8px 6px;text-align:left;color:inherit;cursor:pointer;border-radius:14px}
.record-main:hover{background:#faf7ff}
.record-main div{min-width:0}.record-main b,.record-main span{display:block}.record-main span{margin-top:4px;color:var(--muted);font-size:.84rem;line-height:1.35}.record-main em{font-style:normal;color:var(--purple);font-weight:850;font-size:.78rem;white-space:nowrap}
.record-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.archive-btn{background:#fff4df;color:#a66b13}.record-row.archived{opacity:.78;background:#fafafa;border-radius:14px;padding-left:8px;padding-right:8px}.archived-history{background:#fbfbfc}
.history-card,.record-row,.note-card,.medical-note-card{overflow:hidden}
.record-row,.note-card,.medical-note-card,.history-line,.access-code-card,.user-access-card{overflow-wrap:anywhere;word-break:break-word}
.record-main{align-items:flex-start}
.record-main div{display:flex;flex-direction:column;gap:4px;min-width:0}
.record-main b,.record-main span,.note-card b,.note-card span,.note-card p,.medical-note-card strong,.medical-note-card span,.medical-note-card small,.history-line b,.history-line span{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.record-actions,.card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.note-card,.medical-note-card{padding:16px 0;border-top:1px solid var(--line);margin:0}
.note-card:first-of-type,.medical-note-card:first-of-type{border-top:0;padding-top:6px}
.note-card p,.medical-note-card span{line-height:1.55}
.medical-note-card{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.medical-note-card>div:first-child,.note-card>div,.user-access-card>div:nth-child(2),.access-code-card>div:first-child{min-width:0}
.history-line{align-items:flex-start}

.record-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px}.record-modal-backdrop{position:absolute;inset:0;background:rgba(25,15,42,.48);backdrop-filter:blur(5px)}
.record-modal-card{position:relative;width:min(720px,100%);max-height:min(86vh,760px);overflow:auto;background:#fff;border-radius:24px;box-shadow:0 28px 70px rgba(35,22,58,.28);border:1px solid #eadff6}
.record-modal-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid var(--line);background:linear-gradient(115deg,#f4edff,#fff)}
.record-modal-head span{display:block;color:var(--purple);font-size:.7rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.record-modal-head h3{margin:4px 0 0;font-size:1.35rem}.modal-close{width:38px;height:38px;border:0;border-radius:12px;background:#f1e8ff;color:var(--purple);font-size:1.35rem;cursor:pointer}
.record-modal-body{padding:20px}.record-modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:0 20px 20px}
@media(max-width:640px){
  .record-row{align-items:stretch;flex-direction:column;gap:8px;padding:10px 0}
  .record-main{width:100%;padding:10px 8px}.record-main em{font-size:.72rem}
  .record-actions{width:100%;justify-content:flex-end;flex-wrap:wrap;padding:0 6px}
  .record-actions .mini-btn{flex:1;justify-content:center;min-width:88px}
  .record-modal{padding:10px}.record-modal-card{border-radius:20px;max-height:90vh}.record-modal-head{padding:14px 15px}.record-modal-body{padding:15px}.record-modal-head h3{font-size:1.18rem}
}

/* V0.4.9 horarios de medicación e incidentes editables */
#medTimesWrap small{display:block;margin-top:6px;color:var(--muted);font-size:.78rem;font-weight:600}
.medication-row .row-main span{line-height:1.35}
.incident-action{margin:8px 0 0;padding:9px 11px;border-radius:12px;background:#faf7fd;color:#514660;font-size:.82rem;line-height:1.4}
.incident-action b{color:#2e2340}
.incident-card .card-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
@media(max-width:640px){
  #medTimesWrap small{font-size:.82rem}
  .medication-row{align-items:flex-start}
  .medication-row .card-actions{width:100%;margin-left:0}
  .incident-card .card-actions{width:100%;margin-left:0}
  .incident-card .card-actions .mini-btn{flex:1}
  .incident-action{font-size:.84rem}
}

/* V0.5.0 Personal y reportes profesionales */
.staff-dashboard-pro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:stretch;margin-bottom:16px}
.staff-dashboard-pro article,.staff-add-pro{border-radius:18px}
.staff-dashboard-pro article{background:#fff;border:1px solid var(--line);padding:15px 17px;box-shadow:var(--shadow-soft)}
.staff-dashboard-pro span,.staff-dashboard-pro small{display:block;color:var(--muted)}
.staff-dashboard-pro strong{display:block;margin:5px 0 2px;font-size:1.5rem;color:var(--purple-dark)}
.staff-add-pro{align-self:stretch;justify-content:center}
.staff-form{margin-bottom:16px}
.staff-grid-pro{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.staff-card-pro{background:#fff;border:1px solid var(--line);border-radius:22px;padding:17px;box-shadow:var(--shadow-soft)}
.staff-card-pro-head{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding-bottom:13px;border-bottom:1px solid var(--line)}
.staff-card-pro-head strong,.staff-card-pro-head span{display:block}.staff-card-pro-head span{color:var(--muted);margin-top:3px}
.staff-avatar{width:50px;height:50px}
.staff-card-pro-body{display:grid;grid-template-columns:.8fr 1.4fr .8fr;gap:10px;padding:14px 0}
.staff-card-pro-body div{background:#faf8fd;border-radius:14px;padding:11px 12px}
.staff-card-pro-body span{display:block;color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.05em}
.staff-card-pro-body strong{display:block;margin-top:4px;font-size:.86rem;line-height:1.35}
.staff-card-pro-actions{display:flex;align-items:center;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.staff-card-pro-actions .secondary-btn{flex:1}.staff-card-pro-actions .icon-delete{margin-left:auto}
.report-intro{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;margin-bottom:14px;box-shadow:var(--shadow-soft)}
.report-intro strong,.report-intro span{display:block}.report-intro>div span{color:var(--muted);margin-top:4px}.report-intro>span{color:var(--purple-dark);font-weight:850;background:var(--purple-soft);padding:8px 12px;border-radius:999px}
.report-grid-pro button{cursor:pointer;transition:.18s ease}.report-grid-pro button:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.report-preview-card{margin-top:18px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:var(--shadow)}
.report-preview-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.report-preview-head span{display:block;color:var(--purple);font-size:.72rem;font-weight:900;letter-spacing:.12em}.report-preview-head h3{margin:5px 0 3px;font-size:1.35rem}.report-preview-head p{margin:0;color:var(--muted)}
.report-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:15px 0}.report-kpis article{background:#faf8fd;border-radius:15px;padding:13px}.report-kpis span{display:block;color:var(--muted);font-size:.76rem}.report-kpis strong{display:block;margin-top:5px;font-size:1.35rem;color:var(--purple-dark)}
.report-table-wrap{overflow:auto;margin-top:15px;border:1px solid var(--line);border-radius:16px}.report-table{width:100%;border-collapse:collapse;min-width:680px}.report-table th,.report-table td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:.82rem}.report-table th{background:#f7f3fb;color:var(--purple-dark)}.report-table td{color:#41364f}.report-table tr:last-child td{border-bottom:0}
@media(max-width:900px){.staff-dashboard-pro{grid-template-columns:repeat(3,1fr)}.staff-dashboard-pro .staff-add-pro{grid-column:1/-1}.staff-grid-pro{grid-template-columns:1fr}.report-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.staff-dashboard-pro{grid-template-columns:1fr 1fr}.staff-dashboard-pro article:first-child{grid-column:1/-1}.staff-dashboard-pro .staff-add-pro{grid-column:1/-1}.staff-card-pro-head{grid-template-columns:auto 1fr}.staff-card-pro-head .status{grid-column:2;justify-self:start}.staff-card-pro-body{grid-template-columns:1fr}.staff-card-pro-actions{flex-wrap:wrap}.staff-card-pro-actions .secondary-btn{flex-basis:100%}.staff-card-pro-actions .mini-btn{flex:1}.staff-card-pro-actions .icon-delete{margin-left:0}.report-intro{align-items:flex-start;flex-direction:column}.report-intro>span{font-size:.78rem}.report-kpis{grid-template-columns:1fr 1fr}.report-preview-card{padding:14px}.report-preview-head{align-items:flex-start}.report-grid-pro{grid-template-columns:1fr!important}.staff-attendance-banner{flex-direction:column;align-items:flex-start}.attendance-log{grid-template-columns:1fr}.staff-card-pro-actions .attendance-btn{flex:1}}
@media print{body *{visibility:hidden!important}.report-preview-card,.report-preview-card *{visibility:visible!important}.report-preview-card{position:absolute;left:0;top:0;width:100%;box-shadow:none;border:0}.report-preview-card .form-actions{display:none!important}}

/* V0.5.1 Cambio de turno profesional e inalterable */
.handoff-explainer{display:flex;align-items:flex-start;gap:14px;margin-bottom:14px;padding:15px 17px;border-radius:18px;background:linear-gradient(115deg,#edfdf6,#fff);border:1px solid #d8efe5;box-shadow:var(--shadow-soft)}
.handoff-explainer-icon{display:grid;place-items:center;width:46px;height:46px;flex:0 0 auto;border-radius:14px;background:linear-gradient(145deg,#188560,#7fd8b6);color:#fff;padding:11px}.handoff-explainer-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}
.handoff-explainer strong{display:block;color:#245846;font-size:1rem}.handoff-explainer p{margin:5px 0 0;color:#66766f;line-height:1.45;font-size:.9rem}
.handoff-form-pro{margin-bottom:18px}.handoff-form-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;padding-bottom:13px;border-bottom:1px solid var(--line)}
.handoff-form-title span{display:block;color:var(--mint);font-size:.68rem;font-weight:950;letter-spacing:.14em}.handoff-form-title h3{margin:4px 0 0;font-size:1.25rem}.handoff-lock{padding:7px 10px!important;border-radius:999px;background:#eefaf5;color:#187d5b!important;letter-spacing:0!important;white-space:nowrap}
.handoff-warning{margin-top:14px;padding:11px 13px;border-radius:13px;background:#fff7e8;border:1px solid #f2dfb9;color:#916316;font-size:.82rem;font-weight:750}
.handoff-history-section{margin-top:18px}.handoff-history-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}.handoff-history-title span{display:block;color:var(--purple);font-size:.67rem;font-weight:950;letter-spacing:.13em}.handoff-history-title h3{margin:3px 0 0;font-size:1.22rem}.handoff-history-title b{display:grid;place-items:center;min-width:36px;height:36px;padding:0 10px;border-radius:12px;background:var(--purple-soft);color:var(--purple)}
.handoff-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.handoff-record-card{display:block;width:100%;padding:15px;border:1px solid #dfebe6;border-radius:18px;background:#fff;text-align:left;box-shadow:var(--shadow-soft);cursor:pointer}.handoff-record-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.handoff-shift{padding:6px 9px;border-radius:9px;background:#e7f8f1;color:#187e5c;font-size:.72rem;font-weight:900}.handoff-closed{color:#7a7185;font-size:.7rem;font-weight:850}.handoff-record-card>strong{display:block;color:#2b2237;font-size:1rem}.handoff-record-card>strong span{color:#7d43dd}.handoff-record-card p{margin:8px 0 13px;color:#71697b;font-size:.84rem;line-height:1.38}.handoff-record-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid #eee8f4;color:#796f85;font-size:.74rem}.handoff-record-foot span:last-child{color:var(--purple);font-weight:900}
.handoff-detail-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:12px 14px;border-radius:14px;background:#edf9f4;border:1px solid #d6eee4}.handoff-detail-status span{color:#187d5b;font-size:.74rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.handoff-detail-status strong{color:#285847}.locked-record-note{margin:15px 0 0;padding:11px 13px;border-radius:12px;background:#f6f2fa;color:#6f667a;font-size:.82rem;font-weight:750}
@media(max-width:640px){.handoff-explainer{padding:12px 13px;gap:11px}.handoff-explainer-icon{width:40px;height:40px;border-radius:12px;padding:9px}.handoff-explainer p{font-size:.82rem;line-height:1.35}.handoff-form-title h3{font-size:1.08rem}.handoff-lock{font-size:.62rem!important;padding:6px 8px!important}.handoff-record-grid{grid-template-columns:1fr}.handoff-record-card{padding:13px}.handoff-detail-status{align-items:flex-start;flex-direction:column}}

/* V0.5.2 alertas conectadas y comunicación familiar */
.profile-main-copy{flex:1;min-width:0}
.family-whatsapp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:15px;padding:11px 14px;background:linear-gradient(135deg,#128c4f,#25b96b);color:#fff;font-weight:900;box-shadow:0 9px 20px rgba(20,145,82,.20);cursor:pointer;white-space:nowrap}
.family-whatsapp-btn svg,.whatsapp-send svg,.whatsapp-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.alerts-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:#fff}
.alerts-toolbar p{margin:0;color:var(--muted);font-size:.86rem;line-height:1.35}
.connected-alert-card{align-items:flex-start}
.connected-alert-card .card-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.resolved-alert{opacity:.68;background:#f8faf9}
.whatsapp-composer{display:grid;gap:16px}
.whatsapp-recipient{display:flex;align-items:center;gap:12px;padding:13px;border-radius:16px;background:#ecfff4;border:1px solid #cbeed9}
.whatsapp-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#20a960;color:#fff}
.whatsapp-recipient div{display:grid;gap:2px}.whatsapp-recipient span,.whatsapp-recipient small{color:#66766d;font-size:.76rem}.whatsapp-recipient strong{color:#174b30;font-size:1rem}
.whatsapp-composer label{display:grid;gap:7px;color:var(--muted);font-size:.82rem;font-weight:800}
.whatsapp-composer textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:13px;resize:vertical;color:var(--ink);background:#fff}
.whatsapp-send{background:linear-gradient(135deg,#128c4f,#25b96b)!important}
.whatsapp-note{margin:0;color:var(--muted);font-size:.76rem;line-height:1.35}
@media(max-width:640px){
 .profile-hero{align-items:flex-start;flex-wrap:wrap}
 .profile-main-copy{min-width:calc(100% - 96px)}
 .family-whatsapp-btn{width:100%;padding:11px 13px}
 .alerts-toolbar{align-items:stretch;flex-direction:column}
 .alerts-toolbar .secondary-btn{width:100%}
 .connected-alert-card{display:grid;grid-template-columns:auto 1fr;gap:10px}
 .connected-alert-card>.status{grid-column:2;justify-self:start}
 .connected-alert-card>.card-actions{grid-column:1/-1;justify-content:flex-end;width:100%}
 .connected-alert-card>.card-actions .mini-btn{flex:1}
}

/* V0.6.0 — acceso integrado por roles */
.auth-gate{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:linear-gradient(145deg,#f4ecff,#fff 48%,#fdf0f8)}
.auth-gate.hidden{display:none!important}.auth-locked{filter:blur(4px);pointer-events:none;user-select:none}
.auth-card{width:min(100%,440px);padding:24px;border-radius:28px;background:rgba(255,255,255,.96);border:1px solid #e6daf5;box-shadow:0 24px 70px rgba(77,35,133,.18)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}.auth-brand img{width:58px;height:58px;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(83,43,139,.14)}.auth-brand strong,.auth-brand span{display:block}.auth-brand strong{font-size:1.2rem;color:#5f2fc0}.auth-brand span{font-family:Georgia,serif;font-size:1.35rem;color:#c58a31}
.auth-intro>span{font-size:.72rem;font-weight:950;letter-spacing:.16em;color:#7137cf}.auth-intro h2{margin:8px 0 6px;font-size:1.85rem;line-height:1.04;color:#261b3d}.auth-intro p{margin:0 0 20px;color:#736a80;line-height:1.45}
.auth-form{display:grid;gap:13px}.auth-form label{display:grid;gap:7px;color:#62596f;font-size:.82rem;font-weight:850}.auth-form input,.auth-form select{width:100%;padding:13px 14px;border:1px solid #ddd1ef;border-radius:14px;background:#fff;color:#261b3d;outline:none}.auth-form input:focus,.auth-form select:focus{border-color:#8c5ddd;box-shadow:0 0 0 4px rgba(113,55,207,.10)}
.auth-primary{border:0;border-radius:15px;padding:13px 16px;background:linear-gradient(90deg,#5f2bbd,#8a4bd8);color:#fff;font-weight:900;cursor:pointer}.auth-link{width:100%;margin-top:13px;border:0;background:transparent;color:#6b39c9;font-weight:850;cursor:pointer}
.session-role-label{display:block;margin-top:4px;color:#766a86;font-size:.64rem;font-weight:850;letter-spacing:.04em}
.role-welcome.nurse-welcome{background:linear-gradient(125deg,#eef7ff,#fff 62%,#eefbff)}.role-welcome.assistant-welcome{background:linear-gradient(125deg,#f5efff,#fff 62%,#f9f2ff)}
.access-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:14px}.access-summary article{padding:14px;border-radius:17px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-soft)}.access-summary span,.access-summary strong{display:block}.access-summary span{font-size:.75rem;color:var(--muted)}.access-summary strong{margin-top:5px;font-size:1.45rem;color:var(--purple)}
.access-generator h3,.history-card h3{margin-top:0}.access-generator>p{margin-top:-4px;color:var(--muted)}
.access-code-list,.user-access-list{display:grid;gap:10px}.access-code-card,.user-access-card{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:16px;background:#fff}.access-code-card>div,.user-access-card>div:nth-child(2){flex:1}.access-code-card span,.access-code-card strong,.access-code-card small,.user-access-card strong,.user-access-card span,.user-access-card small{display:block}.access-code-card span,.user-access-card span,.access-code-card small,.user-access-card small{color:var(--muted)}.access-code-card strong{font-family:ui-monospace,monospace;font-size:1.15rem;letter-spacing:.08em;color:#5f2bbd}.access-code-card.used{opacity:.62}
@media(max-width:640px){.auth-card{padding:19px;border-radius:23px}.auth-intro h2{font-size:1.55rem}.access-summary{grid-template-columns:1fr 1fr}.access-summary article:last-child{grid-column:1/-1}.access-code-card,.user-access-card{align-items:flex-start}.session-role-label{font-size:.58rem;max-width:160px}}

/* V0.7.1 acceso Supabase y rol supervisor */
.auth-message{margin-top:12px;padding:11px 13px;border-radius:13px;background:#fff3df;border:1px solid #f2d7a6;color:#8a5b10;font-size:.86rem;line-height:1.35}
.auth-role-note{margin-top:14px;padding:12px 14px;border-radius:14px;background:#f8f3ff;border:1px solid #e6d9f7;display:flex;flex-direction:column;gap:4px}
.auth-role-note strong{font-size:.82rem;color:#4e2b8d}.auth-role-note span{font-size:.78rem;color:#746b84;letter-spacing:.06em}
.auth-primary:disabled{opacity:.65;cursor:wait}

/* V0.7.2 Panel SUPV funcional */
.supv-loading{text-align:center;padding:32px;color:var(--muted);font-weight:800}.supv-welcome{background:linear-gradient(105deg,#4c1cc2,#8548dc 58%,#d186c3);color:#fff}.supv-welcome p,.supv-welcome .eyebrow{color:#fff}.supv-metrics{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-top:16px}.supv-metric{display:flex;align-items:center;gap:10px;padding:14px;border:1px solid var(--line);border-radius:19px;background:#fff;box-shadow:var(--shadow-soft);text-align:left}.supv-metric-icon{width:42px;height:42px;border-radius:14px;padding:10px;display:grid;place-items:center}.supv-metric-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.supv-metric div{flex:1}.supv-metric small,.supv-metric strong,.supv-metric p{display:block}.supv-metric small{color:var(--muted);font-weight:800}.supv-metric strong{font-size:1.45rem;color:#297be0}.supv-metric p{margin:3px 0 0;color:var(--muted);font-size:.73rem}.supv-panel{margin-top:16px;padding:14px;border:1px solid var(--line);border-radius:21px;background:#fff;box-shadow:var(--shadow-soft)}.supv-panel h3{margin:0 0 10px;color:var(--purple-dark)}.supv-title{display:flex;justify-content:space-between}.supv-title button{border:0;background:transparent;color:var(--purple);font-weight:900}.supv-quick{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.supv-quick button{padding:16px 10px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:var(--shadow-soft)}.supv-quick span,.supv-quick small{display:block}.supv-quick span{font-weight:900}.supv-quick small{margin-top:4px;color:var(--muted)}.supv-table article{display:grid;grid-template-columns:1.5fr 1fr 1fr auto auto;gap:12px;align-items:center;padding:12px;border-top:1px solid var(--line)}.supv-table small,.supv-table strong{display:block}.supv-table small{color:var(--muted)}.supv-toolbar{display:flex;gap:12px;margin-bottom:14px}.supv-toolbar .searchbox{flex:1}.supv-org-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.supv-org-grid>article,.supv-license-grid>article{padding:16px;border:1px solid var(--line);border-radius:21px;background:#fff;box-shadow:var(--shadow-soft)}.supv-org-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.supv-org-head h3,.supv-org-head p{margin:0}.supv-org-head p{margin-top:4px;color:var(--muted)}.supv-org-data{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.supv-org-data span{padding:10px;border-radius:12px;background:#f8f5fc;color:var(--muted);font-size:.72rem}.supv-org-data strong{display:block;color:var(--ink);margin-top:4px}.supv-actions{display:flex;gap:8px;flex-wrap:wrap}.supv-license-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.supv-license-grid article h3{margin:10px 0 2px}.supv-license-grid article p{margin:0 0 12px;color:var(--muted)}.supv-license-grid article>div{margin:12px 0}.supv-license-grid small,.supv-license-grid strong{display:block}
@media(max-width:1050px){.supv-metrics{grid-template-columns:repeat(3,1fr)}.supv-quick{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.supv-metrics{grid-template-columns:repeat(2,1fr);gap:9px}.supv-metric{padding:10px}.supv-metric-icon{width:36px;height:36px}.supv-metric strong{font-size:1.2rem}.supv-quick{grid-template-columns:repeat(2,1fr)}.supv-table article{grid-template-columns:1fr auto}.supv-table article>div:nth-child(2),.supv-table article>div:nth-child(3){display:none}.supv-toolbar{flex-direction:column}.supv-org-grid,.supv-license-grid{grid-template-columns:1fr}.supv-actions>*{flex:1}}

/* V0.7.4 Panel SUPV separado */
.auth-secondary{width:100%;margin-top:10px;border:1px solid #dcccf5;background:#faf7ff;color:#642bc5;border-radius:14px;padding:12px 14px;font-weight:850;cursor:pointer}
.supervisor-more-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.license-detail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.license-detail span{display:block;padding:10px;border-radius:13px;background:#faf7ff;color:#776f84;font-size:.75rem}
.license-detail strong{display:block;color:#2b203e;margin-top:4px;font-size:.92rem}
@media(max-width:640px){.supervisor-more-grid{grid-template-columns:1fr}.license-detail{grid-template-columns:1fr 1fr}.supv-metrics{grid-template-columns:1fr 1fr}}

/* V0.7.5 refinamiento SUPV: alertas, gestión, auditoría y soporte */
.supv-manage-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #e5d8f7;background:linear-gradient(135deg,#f8f3ff,#fff);color:#6330c2;border-radius:14px;padding:9px 13px;font-weight:900;cursor:pointer;box-shadow:0 5px 14px rgba(87,46,154,.08)}
.supv-manage-btn b{font-size:1.25rem;line-height:1}.supv-manage-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(87,46,154,.13)}
.audit-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.audit-summary-grid article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:var(--shadow-soft)}.audit-summary-grid span,.audit-summary-grid small{display:block;color:var(--muted)}.audit-summary-grid strong{display:block;font-size:1.65rem;color:var(--purple-dark);margin:5px 0}.audit-explainer{display:flex;align-items:center;justify-content:space-between;gap:16px}.audit-explainer h3{margin:0 0 6px}.audit-explainer p{margin:0;color:var(--muted);line-height:1.4}.audit-timeline{display:grid;gap:10px}.audit-timeline article{display:grid;grid-template-columns:16px 1fr;gap:12px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:14px 16px;box-shadow:var(--shadow-soft)}.audit-dot{width:11px;height:11px;border-radius:50%;background:linear-gradient(135deg,#6f35cf,#d98cc8);margin-top:5px;box-shadow:0 0 0 5px #f2e9ff}.audit-title-row{display:flex;justify-content:space-between;gap:12px}.audit-title-row time{color:var(--muted);font-size:.78rem}.audit-body span,.audit-body small{display:block;color:var(--muted);margin-top:4px}.org-detail-hero,.support-status-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px;border-radius:22px;background:linear-gradient(115deg,#f2e9ff,#fff 58%,#f8efff);border:1px solid #e4d7f4;box-shadow:var(--shadow-soft);margin-bottom:14px}.org-detail-hero span:first-child,.support-status-card>div>span{font-size:.7rem;letter-spacing:.14em;font-weight:900;color:var(--purple)}.org-detail-hero h3,.support-status-card h3{margin:6px 0 4px;font-size:1.55rem}.org-detail-hero p,.support-status-card p{margin:0;color:var(--muted)}.org-detail-grid,.support-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.org-detail-grid article,.support-check-grid article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:var(--shadow-soft)}.org-detail-grid span,.org-detail-grid small,.support-check-grid span{display:block;color:var(--muted)}.org-detail-grid strong,.support-check-grid strong{display:block;margin:5px 0;color:var(--ink)}.support-check-grid .ok-check{border-left:4px solid #25a57e}.support-check-grid .warn-check{border-left:4px solid #d18b1f}.support-check-grid .bad-check{border-left:4px solid #d94f72}.support-actions,.detail-actions{display:flex;gap:10px;flex-wrap:wrap}.support-org-list{display:grid;gap:10px}.support-org-list>button{width:100%;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px 16px;box-shadow:var(--shadow-soft);cursor:pointer}.support-org-list strong,.support-org-list span{display:block}.support-org-list span{color:var(--muted);margin-top:4px}.support-org-list b{font-size:1.5rem;color:var(--purple)}.support-note p{color:var(--muted);line-height:1.5}
@media(max-width:760px){.audit-summary-grid,.org-detail-grid,.support-check-grid{grid-template-columns:1fr 1fr}.audit-explainer{align-items:flex-start;flex-direction:column}.audit-title-row{flex-direction:column;gap:4px}.org-detail-hero,.support-status-card{align-items:flex-start;flex-direction:column}.support-actions,.detail-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.support-actions button,.detail-actions button{width:100%;justify-content:center}}
@media(max-width:480px){.audit-summary-grid,.org-detail-grid,.support-check-grid{grid-template-columns:1fr}.support-actions,.detail-actions{grid-template-columns:1fr}.supv-manage-btn span{display:none}.supv-manage-btn{width:38px;height:38px;padding:0;border-radius:12px}}

/* V0.7.7 licencias, accesos y soporte */
.supv-dialog-backdrop{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px;background:rgba(36,20,61,.48);backdrop-filter:blur(6px)}
.supv-dialog{width:min(560px,100%);max-height:90vh;overflow:auto;background:#fff;border:1px solid #e5d8f5;border-radius:26px;padding:22px;box-shadow:0 28px 70px rgba(44,20,82,.28)}
.supv-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}.supv-dialog-head span{font-size:.68rem;font-weight:900;letter-spacing:.16em;color:#7137cf}.supv-dialog-head h3{margin:5px 0 0;font-size:1.45rem;color:#281d3e}.supv-dialog-close{width:38px;height:38px;border:0;border-radius:12px;background:#f4edfc;color:#6933c4;font-size:1.5rem;cursor:pointer}.dialog-intro{padding:14px 15px;margin-bottom:16px;border-radius:16px;background:#f8f3ff}.dialog-intro strong{display:block;color:#2b2040;font-size:1.05rem}.dialog-intro p{margin:6px 0 0;color:#746b82;line-height:1.4}.generated-code{text-align:center;padding:22px;border:1px dashed #c8acee;border-radius:19px;background:linear-gradient(135deg,#f7f0ff,#fff)}.generated-code span{display:block;font-size:.68rem;font-weight:900;letter-spacing:.14em;color:#7440c9}.generated-code strong{display:block;margin:10px 0;font-size:1.8rem;color:#5420ad;letter-spacing:.08em}.generated-code p{margin:0;color:#756c83}.confirmation-warning,.license-lock-note{margin-top:14px;padding:12px 14px;border-radius:14px;background:#fff5df;color:#97610f;font-size:.86rem;line-height:1.4}.license-lock-note{background:#edf9f4;color:#167458}
.license-card-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.payment-state{padding:6px 10px;border-radius:999px;font-size:.7rem;font-weight:900}.payment-state.confirmed{background:#e6f8f0;color:#13785a}.payment-state.pending{background:#fff0da;color:#a5660d}.license-countdown{display:grid;place-items:center;text-align:center;margin:14px 0;padding:17px;border-radius:18px;background:linear-gradient(135deg,#f3eaff,#fff)}.license-countdown small{font-size:.65rem;font-weight:900;letter-spacing:.12em;color:#7041b8}.license-countdown strong{font-size:2.35rem;line-height:1;color:#5c28b7;margin:7px 0}.license-countdown span{font-size:.78rem;color:#756c83}.license-countdown.urgent{background:linear-gradient(135deg,#fff0f2,#fff)}.license-countdown.urgent strong{color:#c83258}
.admin-license-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0;padding:15px 18px;border:1px solid #d9c8f3;border-radius:19px;background:linear-gradient(120deg,#f3eaff,#fff);box-shadow:0 8px 20px rgba(84,38,155,.08)}.admin-license-banner span,.admin-license-banner strong,.admin-license-banner small{display:block}.admin-license-banner span{font-size:.65rem;font-weight:900;letter-spacing:.13em;color:#7040bd}.admin-license-banner strong{margin:5px 0 3px;font-size:1.1rem;color:#2b203f}.admin-license-banner small{color:#766d83}.admin-license-banner>b{display:grid;place-items:center;min-width:56px;height:56px;border-radius:17px;background:#6c32c8;color:#fff;font-size:1.35rem}.admin-license-banner.urgent{border-color:#f0c4ce;background:#fff4f6}.admin-license-banner.urgent>b{background:#cf365c}.admin-license-banner.suspended{border-color:#edb6c3;background:#fff0f3}
@media(max-width:640px){.supv-dialog{padding:17px;border-radius:21px}.supv-dialog-head h3{font-size:1.2rem}.license-card-top{align-items:flex-start;flex-direction:column}.admin-license-banner{padding:13px 14px}.admin-license-banner>b{min-width:48px;height:48px;font-size:1.1rem}}

/* V0.7.9 refinamiento visual profesional del panel SUPV */
.supv-panel{
  border-radius:24px !important;
  padding:18px !important;
  border:1px solid #e8def5 !important;
  background:linear-gradient(180deg,#ffffff 0%,#fdfbff 100%) !important;
  box-shadow:0 14px 34px rgba(73,38,124,.08) !important;
}
.supv-title{align-items:center !important;margin-bottom:8px !important}
.supv-title h3{font-size:1.28rem !important;letter-spacing:-.02em !important}
.supv-title button{
  border:1px solid #e4d7f6 !important;
  background:#f8f3ff !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  color:#632bc3 !important;
  cursor:pointer !important;
}
.supv-table{overflow:hidden;border:1px solid #eee6f7;border-radius:18px;background:#fff}
.supv-table article{
  min-height:78px;
  grid-template-columns:minmax(220px,1.45fr) minmax(120px,.9fr) minmax(140px,.95fr) auto auto !important;
  padding:15px 16px !important;
  border-top:1px solid #eee8f5 !important;
}
.supv-table article:first-child{border-top:0 !important}
.supv-table article:hover{background:#fcf9ff}
.supv-table article strong{font-size:1rem;color:#251a38}
.supv-table article small{font-size:.82rem;line-height:1.35;color:#7a7088}
.supv-manage-btn{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  min-height:42px !important;
  border:1px solid #dac8f3 !important;
  background:linear-gradient(135deg,#f6efff 0%,#ffffff 100%) !important;
  color:#5b23b8 !important;
  border-radius:14px !important;
  padding:9px 14px !important;
  font-weight:900 !important;
  font-size:.88rem !important;
  cursor:pointer !important;
  box-shadow:0 6px 16px rgba(89,43,162,.09) !important;
  transition:.18s ease !important;
}
.supv-manage-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(89,43,162,.14) !important}
.supv-manage-btn b{font-size:1.28rem;line-height:1;font-weight:800}
.status{border-radius:999px !important;padding:7px 11px !important;font-size:.72rem !important;font-weight:900 !important}
.supv-metric{border-radius:22px !important;min-height:112px !important;padding:16px !important;box-shadow:0 10px 24px rgba(61,31,105,.07) !important}
.supv-metric strong{font-size:1.6rem !important;line-height:1 !important;margin-top:4px !important}
.supv-quick button{min-height:104px !important;border-radius:20px !important;padding:18px 12px !important;cursor:pointer !important;transition:.18s ease !important}
.supv-quick button:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(67,35,117,.11) !important}

@media(max-width:900px){
  .supv-table article{grid-template-columns:minmax(180px,1fr) minmax(120px,.7fr) auto auto !important}
  .supv-table article>div:nth-child(3){display:none}
}
@media(max-width:640px){
  .supv-panel{padding:12px !important;border-radius:19px !important}
  .supv-title h3{font-size:1.08rem !important}
  .supv-table{border-radius:15px}
  .supv-table article{
    grid-template-columns:1fr auto !important;
    gap:10px !important;
    min-height:86px !important;
    padding:13px !important;
  }
  .supv-table article>div:nth-child(2),
  .supv-table article>div:nth-child(3){display:none !important}
  .supv-table article>.status{grid-column:1;justify-self:start}
  .supv-table article>.supv-manage-btn{grid-column:2;grid-row:1 / span 2;align-self:center}
  .supv-manage-btn{width:42px !important;height:42px !important;min-height:42px !important;padding:0 !important;border-radius:13px !important}
  .supv-manage-btn span{display:none !important}
}

/* V0.8.0 códigos visibles y auditoría administrable */
.generated-code-visible{margin:8px 0 14px;padding:22px;border-radius:22px;text-align:center;background:linear-gradient(135deg,#f4ecff,#fff 58%,#fff2fa);border:1px solid #dfcff5;box-shadow:0 12px 28px rgba(89,42,155,.12)}
.generated-code-visible span{display:block;font-size:.72rem;font-weight:950;letter-spacing:.15em;color:#7540d4}
.generated-code-visible strong{display:block;margin:12px 0 8px;font-size:2rem;letter-spacing:.1em;color:#4e20a8;word-break:break-all}
.generated-code-visible p{margin:0;color:#746b84}
.audit-toolbar{display:flex;gap:10px;align-items:center}.audit-toolbar .searchbox{margin:0}.audit-clear-btn{white-space:nowrap;color:#b22c55;background:#fff0f4}
.audit-timeline article{grid-template-columns:16px 1fr auto!important;align-items:start}
.audit-delete-btn{width:34px;height:34px;border:0;border-radius:11px;background:#fff0f4;color:#c93662;font-size:1.25rem;line-height:1;cursor:pointer}.audit-delete-btn:hover{background:#ffdfe9}
@media(max-width:640px){.generated-code-visible{padding:18px 14px}.generated-code-visible strong{font-size:1.45rem}.audit-toolbar{align-items:stretch;flex-direction:column}.audit-clear-btn{width:100%}.audit-timeline article{grid-template-columns:14px 1fr auto!important;padding:13px 12px}}

/* V0.8.1 — refinamiento visual premium del panel SUPV */
body{background:linear-gradient(180deg,#fbf9fe 0%,#f7f4fb 48%,#fbfafc 100%) !important}
.supv-welcome{border-radius:28px !important;box-shadow:0 20px 46px rgba(80,34,160,.18) !important;overflow:hidden;position:relative}
.supv-welcome:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-80px;top:-120px;background:rgba(255,255,255,.10)}

.supv-metrics{gap:14px !important;margin-top:18px !important}
.supv-metric{position:relative;overflow:hidden;border:1px solid #ece4f5 !important;background:#fff !important;border-radius:22px !important;min-height:126px !important;padding:18px 16px !important;box-shadow:0 10px 28px rgba(61,31,105,.07) !important;transition:.18s ease}
.supv-metric:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:#7a3fd0}
.supv-metric:nth-child(2):before{background:#e39a26}.supv-metric:nth-child(3):before{background:#e85775}.supv-metric:nth-child(4):before{background:#4f7dde}.supv-metric:nth-child(5):before{background:#d58c24}.supv-metric:nth-child(6):before{background:#2fa982}
.supv-metric:hover{transform:translateY(-3px);box-shadow:0 16px 34px rgba(61,31,105,.11) !important}
.supv-metric small{font-size:.82rem !important;line-height:1.15 !important}.supv-metric strong{font-size:1.75rem !important;color:#241733 !important}.supv-metric p{font-size:.75rem !important}

.supv-panel{border:1px solid #e9e0f3 !important;border-radius:25px !important;background:rgba(255,255,255,.92) !important;box-shadow:0 12px 34px rgba(63,35,102,.07) !important;padding:20px !important;margin-top:18px !important}
.supv-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}
.supv-section-heading span,.supv-title>div>span{display:block;color:#7c48c6;font-size:.67rem;font-weight:950;letter-spacing:.16em;margin-bottom:4px}
.supv-section-heading h3,.supv-title h3{margin:0 !important;color:#2c1e42 !important;font-size:1.32rem !important}
.supv-section-heading p{margin:0;color:#857a91;font-size:.85rem}

.supv-quick{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:13px !important}
.supv-quick .supv-quick-card{display:grid !important;grid-template-columns:48px 1fr auto;align-items:center;gap:12px;min-height:96px !important;padding:14px 15px !important;border:1px solid #ece4f5 !important;border-radius:19px !important;background:#fff !important;text-align:left !important;box-shadow:none !important;transition:.18s ease}
.supv-quick .supv-quick-card:hover{transform:translateY(-2px);box-shadow:0 12px 24px rgba(72,40,120,.10) !important}
.supv-quick-card .supv-quick-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#f2eaff;color:#6d35c7;padding:12px}
.supv-quick-card .supv-quick-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9}
.supv-quick-card div strong{display:block;color:#251939;font-size:.97rem;line-height:1.15}.supv-quick-card div small{display:block;margin-top:5px;color:#84798f;font-size:.76rem;line-height:1.25}.supv-quick-card>b{font-size:1.45rem;color:#a18caf}
.supv-quick-card.tone-amber .supv-quick-icon{background:#fff1dc;color:#d28417}.supv-quick-card.tone-cyan .supv-quick-icon{background:#e8f4ff;color:#3983d6}.supv-quick-card.tone-mint .supv-quick-icon{background:#e4f8f1;color:#218967}.supv-quick-card.tone-rose .supv-quick-icon{background:#ffe9ef;color:#ce4c70}.supv-quick-card.tone-neutral .supv-quick-icon{background:#f1eef5;color:#74697e}

.supv-title{display:flex !important;align-items:center !important;justify-content:space-between !important;margin-bottom:14px !important}
.supv-title button{display:inline-flex;align-items:center;gap:7px;padding:9px 13px !important;border:1px solid #e3d4f5 !important;border-radius:999px !important;background:#faf6ff !important;color:#652fbd !important;font-weight:900 !important}
.supv-table{border:1px solid #ebe3f3 !important;border-radius:19px !important;background:#fff !important;overflow:hidden !important}
.supv-table-head{display:grid;grid-template-columns:1.5fr .8fr .9fr auto auto;gap:14px;align-items:center;padding:11px 15px;background:#f8f4fc;border-bottom:1px solid #ebe3f3;color:#7b7088;font-size:.69rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.supv-table article{position:relative;grid-template-columns:1.5fr .8fr .9fr auto auto !important;gap:14px !important;padding:15px !important;border-top:1px solid #f0eaf6 !important;background:#fff !important}
.supv-table article:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#a98acb}.supv-table article.org-status-active:before{background:#2ca77f}.supv-table article.org-status-grace_period:before{background:#e2a02d}.supv-table article.org-status-suspended:before{background:#df5570}.supv-table article.org-status-cancelled:before{background:#807286}
.supv-org-identity{display:flex;align-items:center;gap:11px;min-width:0}.supv-org-avatar{display:grid;place-items:center;width:40px;height:40px;flex:0 0 auto;border-radius:13px;background:linear-gradient(135deg,#eee4ff,#f8f2ff);color:#6a34c4;font-weight:950;font-size:.76rem}
.supv-table article strong{font-size:.94rem !important;color:#251a38 !important}.supv-table article small{font-size:.75rem !important;color:#7e7489 !important}
.supv-table .status{font-size:.69rem !important;padding:6px 10px !important}
.supv-manage-btn{padding:9px 13px !important;border-radius:13px !important;background:linear-gradient(135deg,#6730c5,#8c4bd8) !important;color:#fff !important;border:0 !important;box-shadow:0 7px 16px rgba(104,47,194,.18) !important}
.supv-manage-btn:hover{box-shadow:0 10px 22px rgba(104,47,194,.25) !important}
.supv-empty-clean{padding:34px;text-align:center;color:#80758a}.supv-empty-clean strong,.supv-empty-clean span{display:block}.supv-empty-clean span{margin-top:5px;font-size:.84rem}

/* Organización cards */
.supv-org-grid{gap:16px !important}.supv-org-grid>article{position:relative;overflow:hidden;padding:18px !important;border:1px solid #e9e0f3 !important;border-radius:22px !important;background:#fff !important;box-shadow:0 10px 26px rgba(66,35,108,.07) !important}
.supv-org-grid>article:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:linear-gradient(90deg,#6d35c7,#c77fc3)}
.supv-org-head h3{font-size:1.1rem !important;color:#251938}.supv-org-head p{font-size:.8rem !important}.supv-org-data span{background:#f8f5fb !important;border:1px solid #eee7f5 !important;border-radius:13px !important;padding:11px !important}.supv-org-data strong{font-size:.88rem !important}
.supv-actions{padding-top:4px}.supv-actions .secondary-btn{background:#f5effd !important;color:#6330bd !important;border:1px solid #e6d8f7 !important}.supv-actions .secondary-btn:last-child{background:#fff5f6 !important;color:#c44861 !important;border-color:#f3d9df !important}

@media(max-width:1050px){.supv-quick{grid-template-columns:repeat(2,minmax(0,1fr)) !important}}
@media(max-width:760px){.supv-table-head{display:none}.supv-table article{grid-template-columns:1fr auto !important;gap:10px !important}.supv-table article>div:nth-child(2),.supv-table article>div:nth-child(3){display:none !important}.supv-org-identity{grid-column:1}.supv-table article .status{grid-column:2;grid-row:1}.supv-manage-btn{grid-column:1/-1;width:100%}.supv-section-heading{align-items:flex-start;flex-direction:column;gap:4px}}
@media(max-width:560px){.supv-quick{grid-template-columns:1fr !important}.supv-quick .supv-quick-card{min-height:82px !important}.supv-panel{padding:14px !important;border-radius:20px !important}.supv-metrics{grid-template-columns:1fr 1fr !important}.supv-metric{min-height:112px !important;padding:14px 12px !important}.supv-metric-icon{width:38px !important;height:38px !important}.supv-metric strong{font-size:1.4rem !important}}

/* V0.8.3 — panel SUPV alineado con la matriz administrativa */
.supv-home-actions{margin-top:18px !important}
.supv-home-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.supv-home-action-card{display:grid;grid-template-columns:54px 1fr auto;align-items:center;gap:14px;min-height:104px;padding:17px;border:1px solid #ebe2f4;border-radius:20px;background:#fff;text-align:left;box-shadow:0 8px 22px rgba(63,35,102,.06);cursor:pointer;transition:.18s ease}
.supv-home-action-card:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(63,35,102,.10)}
.supv-home-action-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:17px;padding:14px;background:#f0e7ff;color:#6a35c7}
.supv-home-action-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.supv-home-action-card strong{display:block;color:#281b3d;font-size:1.02rem;line-height:1.15}
.supv-home-action-card small{display:block;margin-top:5px;color:#7f748b;font-size:.8rem;line-height:1.3}
.supv-home-action-card>b{font-size:1.55rem;color:#a08eb0}
.action-amber .supv-home-action-icon{background:#fff0dc;color:#d6871c}
.action-cyan .supv-home-action-icon{background:#e8f4ff;color:#3e82cf}
.action-mint .supv-home-action-icon{background:#e5f8f1;color:#228d69}

/* Retira por completo la tabla de organizaciones de la pantalla principal */
.supv-recent-panel{display:none !important}

/* Jerarquía más cercana al panel administrativo original */
.supv-metrics{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
.supv-metric{min-height:112px !important}
.supv-quick-panel{margin-top:16px !important}
.supv-quick{grid-template-columns:repeat(3,minmax(0,1fr)) !important}

@media(max-width:900px){
  .supv-metrics{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .supv-home-action-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .supv-metrics{grid-template-columns:1fr 1fr !important}
  .supv-home-action-card{grid-template-columns:46px 1fr auto;min-height:90px;padding:14px}
  .supv-home-action-icon{width:46px;height:46px;border-radius:14px;padding:11px}
  .supv-home-action-card strong{font-size:.95rem}
  .supv-home-action-card small{font-size:.74rem}
}

/* V0.8.4 — renovación visual integral SUPV */
:root{
  --supv-border:#e7def2;
  --supv-shadow:0 10px 26px rgba(59,32,92,.08);
  --supv-purple:#6d35c7;
  --supv-text:#271b38;
  --supv-muted:#7b7185;
}

/* Base limpia y consistente */
.supv-welcome.refined{padding:24px 26px !important;border-radius:24px !important;min-height:150px !important;box-shadow:0 16px 38px rgba(84,37,153,.16) !important}
.supv-welcome.refined h2{font-size:2rem !important;line-height:1.05 !important;margin:8px 0 7px !important}
.supv-welcome.refined p{font-size:1rem !important;max-width:680px !important}

.supv-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}
.supv-overview-card{display:grid;grid-template-columns:50px 1fr auto;align-items:center;gap:13px;min-height:116px;padding:16px;border:1px solid var(--supv-border);border-radius:20px;background:#fff;text-align:left;box-shadow:var(--supv-shadow);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.supv-overview-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(59,32,92,.12)}
.supv-overview-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:16px;padding:13px;background:#f1e8ff;color:#6d35c7}
.supv-overview-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.supv-overview-card small{display:block;font-size:.8rem;font-weight:850;color:#766b82;line-height:1.15}
.supv-overview-card strong{display:block;margin-top:4px;font-size:1.72rem;line-height:1;color:var(--supv-text)}
.supv-overview-card p{margin:7px 0 0;font-size:.76rem;color:#8b8194}
.supv-overview-card>b{font-size:1.55rem;color:#a394b2}
.supv-overview-card.tone-amber .supv-overview-icon{background:#fff1dc;color:#d18718}
.supv-overview-card.tone-rose .supv-overview-icon{background:#ffe9ef;color:#ce4c70}
.supv-overview-card.tone-cyan .supv-overview-icon{background:#e8f4ff;color:#3b82d3}
.supv-overview-card.tone-gold .supv-overview-icon{background:#fff4de;color:#c98219}
.supv-overview-card.tone-mint .supv-overview-icon{background:#e4f8f1;color:#218c69}

.supv-dashboard-section{margin-top:18px;padding:20px;border:1px solid var(--supv-border);border-radius:24px;background:#fff;box-shadow:var(--supv-shadow)}
.supv-dashboard-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:15px}
.supv-dashboard-heading span{display:block;color:#7a46c7;font-size:.67rem;font-weight:950;letter-spacing:.15em;margin-bottom:4px}
.supv-dashboard-heading h3{margin:0;font-size:1.35rem;color:var(--supv-text)}
.supv-dashboard-heading p{margin:0;color:#8a8094;font-size:.84rem}
.supv-dashboard-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.supv-dashboard-item{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:13px;min-height:92px;padding:15px;border:1px solid #ece5f4;border-radius:19px;background:#fcfbfe;text-align:left;cursor:pointer;transition:.18s ease}
.supv-dashboard-item:hover{background:#fff;transform:translateY(-2px);box-shadow:0 12px 24px rgba(68,38,107,.10)}
.supv-dashboard-item>span{display:grid;place-items:center;width:52px;height:52px;padding:14px;border-radius:16px;background:#f0e7ff;color:#6933c2}
.supv-dashboard-item>span svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.9}
.supv-dashboard-item strong{display:block;font-size:1rem;color:#281c3a}
.supv-dashboard-item small{display:block;margin-top:5px;font-size:.78rem;line-height:1.25;color:#81778c}
.supv-dashboard-item>b{font-size:1.5rem;color:#a796b5}
.supv-dashboard-item.tone-amber>span{background:#fff0dc;color:#d4871a}
.supv-dashboard-item.tone-cyan>span{background:#e8f4ff;color:#3c81d0}
.supv-dashboard-item.tone-mint>span{background:#e5f8f1;color:#228d69}
.supv-dashboard-item.tone-rose>span{background:#ffeaf0;color:#ca4c70}
.supv-dashboard-item.tone-neutral>span{background:#f0edf4;color:#74697d}

/* Módulos SUPV: tarjetas y botones unificados */
.supv-toolbar{display:flex;align-items:center;gap:10px;margin:0 0 14px !important}
.supv-toolbar .primary-btn,.supv-toolbar .secondary-btn,.supv-actions .primary-btn,.supv-actions .secondary-btn,.form-actions .primary-btn,.form-actions .secondary-btn{
  min-height:42px !important;padding:10px 15px !important;border-radius:13px !important;font-size:.86rem !important;font-weight:850 !important;border:1px solid transparent !important;box-shadow:none !important;white-space:nowrap
}
.supv-toolbar .primary-btn,.supv-actions .primary-btn,.form-actions .primary-btn{background:linear-gradient(135deg,#652ec1,#8a49dc) !important;color:#fff !important}
.supv-toolbar .secondary-btn,.supv-actions .secondary-btn,.form-actions .secondary-btn{background:#f4eefc !important;color:#6330b9 !important;border-color:#e4d7f3 !important}
.supv-actions{display:flex !important;flex-wrap:wrap !important;gap:9px !important;margin-top:14px !important}
.supv-actions button{flex:0 1 auto !important}

.supv-org-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:14px !important}
.supv-org-grid>article{padding:17px !important;border-radius:20px !important;box-shadow:var(--supv-shadow) !important}
.supv-org-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.supv-org-head h3{margin:0 !important;font-size:1.08rem !important}.supv-org-head p{margin:5px 0 0 !important;line-height:1.25 !important}
.supv-org-data{display:grid !important;grid-template-columns:1fr 1fr !important;gap:9px !important;margin-top:14px !important}
.supv-org-data span{min-height:62px !important;display:flex !important;flex-direction:column !important;justify-content:center !important}

/* Evita tablas y estilos heredados en el SUPV */
.supv-table,.supv-table-head{display:none !important}

/* Formularios y diálogos */
.supv-dialog{border-radius:24px !important;box-shadow:0 28px 70px rgba(38,18,65,.25) !important}
.supv-dialog-head{padding:18px 20px !important}
.supv-dialog form{padding:18px 20px 20px !important}
.form-card{border-radius:22px !important;box-shadow:var(--supv-shadow) !important}
.form-grid label{font-size:.82rem !important;color:#5f556b !important}
.form-grid input,.form-grid select,.form-grid textarea{min-height:46px !important;border-radius:13px !important;font-size:.95rem !important}

/* Cabeceras internas más elegantes */
.module-pro-head{border-radius:21px !important;padding:16px 18px !important;box-shadow:var(--supv-shadow) !important}
.module-head-copy h2{font-size:1.55rem !important}.module-head-copy p{font-size:.9rem !important}

/* Listas y auditoría */
.audit-summary-grid{gap:12px !important}.audit-summary-grid article{border:1px solid var(--supv-border) !important;border-radius:18px !important;box-shadow:var(--supv-shadow) !important}
.data-row,.access-code-card{border:1px solid var(--supv-border) !important;border-radius:17px !important;box-shadow:0 7px 18px rgba(64,34,101,.06) !important}
.card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.card-actions .mini-btn,.access-code-card .mini-btn{min-height:36px;padding:8px 11px;border-radius:11px;font-weight:800}

@media(max-width:980px){
  .supv-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .supv-org-grid{grid-template-columns:1fr !important}
}
@media(max-width:680px){
  .supv-welcome.refined{padding:18px !important;min-height:auto !important}.supv-welcome.refined h2{font-size:1.55rem !important}.supv-welcome.refined p{font-size:.9rem !important}
  .supv-overview-grid{grid-template-columns:1fr 1fr;gap:10px}
  .supv-overview-card{grid-template-columns:42px 1fr;min-height:104px;padding:13px}.supv-overview-card>b{display:none}.supv-overview-icon{width:42px;height:42px;padding:10px}.supv-overview-card strong{font-size:1.42rem}.supv-overview-card p{font-size:.7rem}
  .supv-dashboard-section{padding:14px;border-radius:20px}.supv-dashboard-heading{align-items:flex-start;flex-direction:column;gap:4px}.supv-dashboard-menu{grid-template-columns:1fr}.supv-dashboard-item{min-height:82px;padding:13px;grid-template-columns:46px 1fr auto}.supv-dashboard-item>span{width:46px;height:46px;padding:11px}
  .supv-toolbar{align-items:stretch;flex-direction:column}.supv-toolbar button{width:100%}
  .supv-actions{display:grid !important;grid-template-columns:1fr 1fr !important}.supv-actions button{width:100% !important}
  .supv-org-data{grid-template-columns:1fr 1fr !important}
}
@media(max-width:430px){
  .supv-overview-grid{grid-template-columns:1fr}.supv-overview-card{min-height:88px}
  .supv-actions{grid-template-columns:1fr !important}
  .supv-org-data{grid-template-columns:1fr !important}
}

/* V0.8.5 — acciones de organización */
.org-action-row{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.danger-outline{background:#fff4f6!important;color:#c7355d!important;border:1px solid #f2c4d0!important}
.danger-outline:hover{background:#ffe9ef!important}
.polished-org-card{position:relative;overflow:hidden}
.polished-org-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(#6f35cf,#d98cc8)}
.form-card-title{margin-bottom:14px}.form-card-title span{font-size:.7rem;letter-spacing:.14em;font-weight:900;color:#6b39c9}.form-card-title h3{margin:4px 0 0}
@media(max-width:640px){.org-action-row>*{flex:1 1 calc(50% - 6px);justify-content:center}.org-action-row .danger-outline{flex-basis:100%}}

/* V0.8.8 módulo de pagos SUPV */
.payment-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
.payment-summary-grid article{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:var(--shadow-soft)}
.payment-summary-grid span,.payment-summary-grid small{display:block;color:var(--muted)}
.payment-summary-grid strong{display:block;font-size:1.8rem;color:var(--purple-dark);margin:6px 0}
.payment-toolbar{margin-bottom:16px}.payment-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.payment-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:var(--shadow-soft)}
.payment-card-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.payment-card-head span:first-child{font-size:.68rem;letter-spacing:.13em;font-weight:900;color:var(--purple)}
.payment-card-head h3{margin:6px 0 3px;font-size:1.25rem}.payment-card-head p{margin:0;color:var(--muted)}
.payment-amount{margin:16px 0;padding:16px;border-radius:16px;background:linear-gradient(135deg,#f5efff,#fff)}.payment-amount span{display:block;color:var(--muted);font-size:.78rem}.payment-amount strong{display:block;font-size:1.6rem;margin-top:5px;color:var(--purple-dark)}
.payment-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px}.payment-meta span{padding:11px;border-radius:13px;background:#f8f5fc;color:var(--muted);font-size:.76rem}.payment-meta strong{display:block;color:var(--ink);font-size:.92rem;margin-top:4px}
.payment-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.payment-actions button{min-height:42px}
@media(max-width:760px){.payment-summary-grid{grid-template-columns:1fr}.payment-card-grid{grid-template-columns:1fr}.payment-actions{display:grid;grid-template-columns:1fr 1fr}.payment-actions button{width:100%;justify-content:center}}

/* V0.8.9: organizaciones siempre visibles y filtros claros */
.org-toolbar-clean{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.org-filter-pills{display:flex;gap:8px;flex-wrap:wrap}
.org-filter-pills button{border:1px solid #e5d8f6;background:#fff;color:#6f667d;padding:9px 13px;border-radius:999px;font-weight:800;cursor:pointer}
.org-filter-pills button b{margin-left:5px;color:#5d2bc5}
.org-filter-pills button.active{background:linear-gradient(90deg,#5c27c7,#8b46df);color:#fff;border-color:transparent;box-shadow:0 8px 18px rgba(92,39,199,.18)}
.org-filter-pills button.active b{color:#fff}
@media(max-width:640px){.org-toolbar-clean{align-items:stretch}.org-toolbar-clean>.primary-btn{width:100%;justify-content:center}.org-filter-pills{display:grid;grid-template-columns:1fr 1fr;width:100%}.org-filter-pills button{width:100%;padding:9px 8px}}


/* V0.9.4 — registro desplazable y mensaje PointerEvent corregido */
.auth-gate{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  align-items:start !important;
  justify-items:center !important;
  place-items:start center !important;
  padding:24px 20px 40px !important;
}
.auth-card{
  margin:auto 0 !important;
  max-height:none !important;
}
.auth-form{padding-bottom:2px}
.auth-secondary{margin-bottom:2px}
@media(max-width:640px){
  .auth-gate{padding:12px 10px 28px !important}
  .auth-card{width:min(100%,460px) !important;padding:17px !important;border-radius:20px !important}
  .auth-brand{margin-bottom:16px !important}
  .auth-intro p{margin-bottom:14px !important}
  .auth-form{gap:10px !important}
  .auth-form input,.auth-form select{padding:11px 12px !important}
}

/* V1.0.1 — Flujo de pagos y precios más claro */
.license-howto{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 20px;padding:16px;border:1px solid #e8ddf7;border-radius:24px;background:linear-gradient(135deg,#fff 0%,#fbf7ff 100%);box-shadow:0 12px 28px rgba(80,45,130,.06)}
.license-howto>div{display:flex;gap:12px;align-items:flex-start;padding:14px;border-radius:18px;background:#fff;border:1px solid #eee5f8}
.license-howto b,.payment-step-guide b{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:12px;background:linear-gradient(135deg,#5d22c8,#a54de0);color:#fff;font-size:15px}
.license-howto span{display:flex;flex-direction:column;gap:3px}.license-howto strong{font-size:15px;color:#211936}.license-howto small{font-size:13px;line-height:1.35;color:#746c83}
.payment-step-guide{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 16px}
.payment-step-guide span{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;background:#faf6ff;border:1px solid #eadff8;font-size:13px;font-weight:700;color:#4f2c87}
.payment-step-guide b{flex-basis:28px;width:28px;height:28px;border-radius:9px;font-size:13px}
.critical-dialog-body .form-grid label{font-weight:700;color:#4f4960}.critical-dialog-body .form-grid input{margin-top:7px;font-size:16px}
@media(max-width:760px){.license-howto{grid-template-columns:1fr}.payment-step-guide{grid-template-columns:1fr}.payment-step-guide span{justify-content:flex-start}}

/* V1.1.0 cierre funcional */
.bp-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}.inactive-filters,.attendance-export{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.filter-chip{border:1px solid #e3d6f7;background:#fff;border-radius:999px;padding:10px 16px;font-weight:800;color:#6a2dcc}.filter-chip.active{background:#6a2dcc;color:#fff}.care-review-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:18px 0}.care-review-summary article,.self-clock-card{background:#fff;border:1px solid #eadff6;border-radius:18px;padding:18px;box-shadow:0 8px 24px rgba(62,30,97,.06)}.care-review-summary span,.self-clock-card span{display:block;color:#776e83;font-size:.82rem}.care-review-summary strong{display:block;font-size:1.8rem;color:#5521b5}.care-review-list{display:grid;gap:12px}.care-review-list article,.diet-card{display:grid;grid-template-columns:1.5fr auto auto;gap:14px;align-items:center;background:#fff;border:1px solid #eadff6;border-radius:16px;padding:16px}.care-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:18px 0}.care-controls select{min-width:190px}.care-task-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.care-task-item{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #eadff6;border-radius:16px;padding:15px}.care-task-item label{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center}.care-task-item small{grid-column:2;color:#80758d}.care-task-item.done{background:#f0fbf7;border-color:#c9eedf}.diet-list{display:grid;gap:12px}.diet-card{grid-template-columns:1.4fr 1fr 1fr 1.2fr auto}.diet-card div span{display:block;color:#83798d;font-size:.78rem}.self-clock-card{display:flex;justify-content:space-between;align-items:center;margin:14px 0}.report-help{background:#f7f2ff;border:1px solid #e5d7f8;border-radius:16px;padding:16px;margin:15px 0}.report-resident-select{display:flex;align-items:center;gap:12px;margin:16px 0;font-weight:800}.report-resident-select select{min-width:280px}.report-preview{background:#fff;border:1px solid #e6daf4;border-radius:18px;padding:22px;margin-top:18px}.report-preview-actions{display:flex;gap:10px;justify-content:flex-end;margin-bottom:18px}.report-editor{min-height:500px;outline:none;border:1px dashed #d8c5ef;border-radius:14px;padding:24px;line-height:1.55}.report-editor:focus{border-color:#7a3ed1;box-shadow:0 0 0 3px rgba(122,62,209,.12)}.history-entry{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:14px 0;border-top:1px solid var(--line)}
.history-entry:first-of-type{border-top:0}
.history-entry>div:first-child{min-width:0;display:flex;flex-direction:column;gap:4px;flex:1}
.history-entry strong,.history-entry span,.history-entry small{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.history-entry span,.history-entry small{color:var(--muted);line-height:1.45}
@media(max-width:760px){.history-entry{flex-direction:column}.history-entry .card-actions{width:100%;justify-content:flex-start}}
.history-entry.archived{opacity:.65}.attendance-export{justify-content:flex-end}.staff-card-pro-actions .primary-btn,.staff-card-pro-actions .secondary-btn{padding:9px 13px}
.staff-attendance-banner{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:14px 0 16px;padding:16px 18px;border:1px solid #e4d8f6;border-radius:18px;background:linear-gradient(90deg,#faf7ff,#fff)}
.staff-attendance-banner strong,.staff-attendance-banner span,.staff-attendance-banner small{display:block}
.staff-attendance-banner strong{color:#4d2a96;font-size:1rem}
.staff-attendance-banner span{margin-top:4px;color:#746a85;font-size:.84rem}
.staff-attendance-banner small{padding:7px 11px;border-radius:999px;background:#f1e8ff;color:#6a2dcc;font-weight:850;white-space:nowrap}
.attendance-log{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-top:2px}
.attendance-log div{background:#faf8fd;border-radius:14px;padding:11px 12px}
.attendance-log span{display:block;color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.05em}
.attendance-log strong{display:block;margin-top:4px;font-size:.85rem;line-height:1.35;color:#342848}
.attendance-btn{border:0;border-radius:13px;padding:9px 13px;font-weight:850;cursor:pointer}
.attendance-btn.entry{background:#e8f8ef;color:#177e57}
.attendance-btn.exit{background:#fff0f1;color:#c4475f}
.module-grid .module-card:last-child{border-color:#f0c77e}.access-generator input[type=number]{width:100%}
@media(max-width:760px){.bp-pair,.care-review-summary,.care-task-grid{grid-template-columns:1fr}.care-review-list article,.diet-card{grid-template-columns:1fr}.self-clock-card{align-items:flex-start;gap:12px;flex-direction:column}.report-resident-select{align-items:stretch;flex-direction:column}.report-resident-select select{min-width:0;width:100%}}
.resident-admin-actions{display:flex;gap:10px;flex-wrap:wrap;margin-left:auto}.danger-soft-btn{border:1px solid #f3c4cb;background:#fff4f5;color:#c5314e;border-radius:13px;padding:11px 15px;font-weight:800}.danger-soft-btn:hover{background:#ffe9ed}

/* ===== V1.2.0 Flujos operativos y clínicos ===== */
.bp-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}
.shift-isolation-note{margin:10px 0 16px;padding:12px 16px;border:1px solid #dfd1f5;border-radius:14px;background:#faf7ff;color:#675d74;font-size:14px}
.nutrition-directory,.staff-readonly-grid,.operational-task-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}
.nutrition-resident-card,.staff-read-card,.operational-task-card,.medical-note-card{background:#fff;border:1px solid #e8def2;border-radius:22px;padding:18px;box-shadow:0 12px 30px rgba(65,38,100,.06)}
.nutrition-resident-card{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(220px,1.6fr) auto;gap:16px;align-items:center}
.nutrition-resident-card>div:first-child,.diet-main{display:flex;flex-direction:column;gap:4px}.nutrition-resident-card span,.nutrition-resident-card small{color:#756c82}
.diet-main b{color:#272036;font-size:17px}.diet-main small{display:block;line-height:1.35}
.medical-note-help{background:linear-gradient(135deg,#f8f2ff,#f4fbff);border:1px solid #ded1ef;border-radius:20px;padding:18px;margin-bottom:16px}.medical-note-help strong{font-size:18px;color:#5322ac}.medical-note-help p{margin:5px 0 0;color:#71687e;line-height:1.5}
.medical-note-card{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin:10px 0}.medical-note-card>div:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}.medical-note-card span,.medical-note-card small{color:#746b80;line-height:1.45}.medical-note-card span{white-space:pre-wrap}
.staff-read-card{padding:18px}.staff-head{display:flex;align-items:center;gap:12px;border-bottom:1px solid #eee7f4;padding-bottom:14px}.staff-head>div:nth-child(2){display:flex;flex-direction:column;gap:3px;flex:1}.staff-head span{color:#766d82}.attendance-read-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.attendance-read-grid>div{background:#f9f6fc;border-radius:15px;padding:12px}.attendance-read-grid span{display:block;color:#81778d;font-size:12px;text-transform:uppercase;letter-spacing:.05em}.attendance-read-grid strong{display:block;margin-top:6px;font-size:15px;color:#2b2338}
.final-clock{border:1px solid #d8c8ef!important;background:linear-gradient(135deg,#fff,#faf6ff)!important;box-shadow:0 12px 32px rgba(83,34,172,.09)!important}.self-clock-actions{display:flex;align-items:center}.clock-btn{border:0;border-radius:15px;padding:15px 28px;font-weight:800;font-size:16px;cursor:pointer;color:#fff;box-shadow:0 10px 22px rgba(0,0,0,.12)}.clock-in{background:linear-gradient(135deg,#168d62,#2ebc87)}.clock-out{background:linear-gradient(135deg,#c72547,#ed536f)}
.operational-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}.operational-task-card{display:flex;align-items:center;justify-content:space-between;gap:16px}.operational-task-card>div{display:flex;flex-direction:column;gap:4px}.operational-task-card>div>span{font-size:12px;font-weight:800;letter-spacing:.08em;color:#7839d1;text-transform:uppercase}.operational-task-card small{color:#746b80}.operational-task-card.done{opacity:.72;background:#f5fbf8}
.report-editor h3{color:#5523ad;margin-top:24px}.report-editor li{margin:8px 0;line-height:1.5}
@media(max-width:800px){.nutrition-directory,.staff-readonly-grid,.operational-task-list,.operational-metrics{grid-template-columns:1fr}.nutrition-resident-card{grid-template-columns:1fr}.attendance-read-grid{grid-template-columns:1fr}.bp-pair{grid-template-columns:repeat(2,minmax(0,1fr))}.self-clock-card.final-clock{align-items:stretch}.self-clock-actions,.clock-btn{width:100%}}
@media(max-width:520px){.bp-pair{grid-template-columns:1fr}.medical-note-card,.operational-task-card{flex-direction:column}.medical-note-card .card-actions,.operational-task-card button{width:100%}.clock-btn{font-size:15px;padding:14px}}


/* V1.2.2 ajustes visuales */
.operational-admin-card{display:flex!important;align-items:center;gap:14px;background:linear-gradient(135deg,#ffffff,#f7f2ff)!important;border:1px solid #e4d5f7!important;min-height:92px}
.operational-admin-card strong{font-size:1.02rem}
.report-resident-card{display:grid;grid-template-columns:1.2fr .9fr;gap:18px;align-items:center;background:#fff;border:1px solid #e7daf6;border-radius:20px;padding:18px 20px;box-shadow:0 10px 28px rgba(66,39,104,.05);margin:16px 0}
.report-resident-copy span{display:block;color:#6b2fd1;font-size:.72rem;font-weight:900;letter-spacing:.12em}
.report-resident-copy strong{display:block;margin-top:6px;font-size:1.08rem;color:#2c2340}
.report-resident-copy small{display:block;margin-top:6px;color:#7d738a;line-height:1.4}
.report-resident-select.modern{display:flex;flex-direction:column;gap:8px;align-items:stretch;margin:0;font-weight:800}
.report-resident-select.modern span{font-size:.8rem;color:#6c6380}
.report-resident-select.modern select{min-width:0;width:100%;padding:14px 16px;border:1px solid #dccaf4;border-radius:16px;background:linear-gradient(180deg,#fff,#fbf8ff);font-size:1rem;font-weight:800;color:#2d2440;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.report-resident-select.modern select:focus{border-color:#7a3ed1;box-shadow:0 0 0 4px rgba(122,62,209,.12)}
.epicrisis-doc{font-family:Arial,Helvetica,sans-serif;color:#231f2e}
.epicrisis-header{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;align-items:start;border-bottom:2px solid #eee4f7;padding-bottom:16px;margin-bottom:18px}
.epicrisis-brand{display:flex;gap:14px;align-items:center}
.epicrisis-brand img{width:70px;height:70px;object-fit:contain;border-radius:18px;background:#fff;border:1px solid #e7daf6;padding:8px}
.epicrisis-brand h2{margin:0;color:#5a24b4;font-size:1.5rem}
.epicrisis-brand p{margin:5px 0 0;color:#746b80;font-weight:700}
.epicrisis-title{grid-column:1/-1}
.epicrisis-title span{display:block;color:#7b3fd3;font-size:.74rem;font-weight:900;letter-spacing:.14em}
.epicrisis-title h1{margin:5px 0 0;font-size:1.6rem;color:#231f2e}
.epicrisis-dates{display:grid;grid-template-columns:1fr 1fr;gap:12px;grid-column:1/-1}
.epicrisis-dates article,.epicrisis-patient-strip article{background:#faf7fd;border:1px solid #eadff6;border-radius:15px;padding:12px}
.epicrisis-dates span,.epicrisis-patient-strip span{display:block;color:#7d738a;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em}
.epicrisis-dates strong,.epicrisis-patient-strip strong{display:block;margin-top:5px;font-size:1rem;color:#261f35}
.epicrisis-patient-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}
.report-editor .epicrisis-doc section{margin-top:18px}
.report-editor .epicrisis-doc h3{margin-bottom:8px}
.generated-staff-code small{display:block;margin:4px 0 10px;color:#716786}
@media(max-width:760px){.report-resident-card,.epicrisis-header,.epicrisis-patient-strip,.epicrisis-dates{grid-template-columns:1fr}.operational-admin-card{min-height:auto}}


/* V1.2.4 — Personal y asistencia profesional */
.self-clock-card.final-clock{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:20px;padding:20px 22px!important;border-radius:22px!important}
.self-clock-card.final-clock span,.self-clock-card.final-clock strong,.self-clock-card.final-clock small{display:block!important}
.self-clock-card.final-clock strong{font-size:1.15rem;color:#2d2440;margin-top:4px}
.self-clock-card.final-clock small{color:#756b83;margin-top:4px}
.staff-command-card{display:flex;justify-content:space-between;align-items:center;gap:22px;background:linear-gradient(135deg,#fff,#faf6ff);border:1px solid #e5d7f5;border-radius:24px;padding:22px;box-shadow:0 12px 34px rgba(83,34,172,.07);margin:18px 0}
.staff-command-copy span{display:block;color:#6b2fd0;font-size:.74rem;font-weight:900;letter-spacing:.14em}.staff-command-copy h3{margin:6px 0 4px;font-size:1.35rem;color:#2b2338}.staff-command-copy p{margin:0;color:#786f84;max-width:760px;line-height:1.45}
.staff-command-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.staff-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 18px}.staff-kpi-grid article{background:#fff;border:1px solid #e9dff3;border-radius:20px;padding:18px;box-shadow:0 10px 26px rgba(62,30,97,.05)}.staff-kpi-grid span{display:block;color:#81778d;font-size:.72rem;font-weight:900;letter-spacing:.08em}.staff-kpi-grid strong{display:block;margin-top:7px;font-size:1.9rem;color:#5a25b5}.staff-kpi-grid small{display:block;margin-top:5px;color:#857b90}
.staff-directory-pro{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.staff-profile-card{background:#fff;border:1px solid #e8def2;border-radius:24px;padding:18px;box-shadow:0 12px 32px rgba(65,38,100,.06)}.staff-profile-card header{display:flex;gap:12px;align-items:center;padding-bottom:14px;border-bottom:1px solid #eee7f4}.staff-profile-title{display:flex;flex-direction:column;gap:4px;flex:1}.staff-profile-title strong{font-size:1.05rem;color:#2b2338}.staff-profile-title span{color:#756d81}.staff-time-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.staff-time-grid div{background:#f9f6fc;border-radius:15px;padding:12px}.staff-time-grid span{display:block;color:#81778d;font-size:.7rem;letter-spacing:.06em}.staff-time-grid strong{display:block;margin-top:6px;color:#2b2338;font-size:.92rem;line-height:1.25}.staff-profile-card footer{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:14px;border-top:1px solid #eee7f4}.staff-profile-card footer>div span{display:block;color:#81778d;font-size:.7rem;letter-spacing:.07em}.staff-profile-card footer>div strong{display:block;margin-top:4px;color:#2b2338}.staff-profile-card footer>div small{display:block;margin-top:4px;color:#7a7185}.staff-code-btn{border:0;border-radius:14px;padding:12px 18px;background:linear-gradient(135deg,#6126c9,#9148e3);color:#fff;font-weight:800;cursor:pointer;white-space:nowrap;box-shadow:0 9px 20px rgba(98,38,201,.2)}
.staff-code-dialog{border:0;padding:0;border-radius:24px;max-width:560px;width:min(92vw,560px);box-shadow:0 30px 80px rgba(30,18,50,.3)}.staff-code-dialog::backdrop{background:rgba(36,25,50,.58);backdrop-filter:blur(4px)}.staff-code-modal{position:relative;padding:28px;background:#fff}.staff-code-modal h3{font-size:1.4rem;margin:7px 0}.staff-code-modal p{color:#746b80;line-height:1.5}.staff-code-modal label{display:flex;flex-direction:column;gap:8px;font-weight:800;margin-top:18px}.staff-code-modal input{padding:14px 15px;border:1px solid #ddcff0;border-radius:14px;font-size:1rem}.dialog-close{position:absolute;right:18px;top:18px;width:38px;height:38px;border:0;border-radius:12px;background:#f3ecfb;color:#6a2dcc;font-size:1.4rem;cursor:pointer}.generated-code-panel{margin-top:18px;padding:18px;border:1px solid #d9c6f2;border-radius:18px;background:linear-gradient(135deg,#faf7ff,#f3eaff);text-align:center}.generated-code-panel span,.generated-code-panel strong,.generated-code-panel small{display:block}.generated-code-panel span{color:#6a2dcc;font-size:.72rem;font-weight:900;letter-spacing:.12em}.generated-code-panel strong{font-size:1.65rem;letter-spacing:.07em;color:#4b1fa0;margin:8px 0}.generated-code-panel small{color:#72687e;margin-bottom:14px}
.status.neutral{background:#f2edf9;color:#6f6091}
@media(max-width:980px){.staff-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.staff-directory-pro{grid-template-columns:1fr}.staff-command-card{flex-direction:column;align-items:flex-start}.staff-command-actions{justify-content:flex-start}.staff-profile-card footer{align-items:flex-start;flex-direction:column}}
@media(max-width:640px){.staff-kpi-grid,.staff-time-grid{grid-template-columns:1fr}.staff-command-actions,.staff-command-actions button,.staff-code-btn{width:100%}.self-clock-card.final-clock{grid-template-columns:1fr}.staff-profile-card header{align-items:flex-start;flex-wrap:wrap}}


/* V1.2.5 ajustes solicitados */
.self-clock-card.final-clock>div:first-child>span{color:#d72a78!important;font-weight:900!important;letter-spacing:.09em!important}
.access-generator-pro{padding:22px!important}
.access-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.access-role-card{border:1px solid #e1d3f4;background:#fff;border-radius:18px;padding:16px;text-align:left;cursor:pointer;transition:.18s ease;box-shadow:0 8px 18px rgba(70,40,110,.04)}
.access-role-card strong{display:block;color:#2c2440;font-size:1rem}
.access-role-card small{display:block;margin-top:5px;color:#7e748b}
.access-role-card:hover{transform:translateY(-1px);border-color:#b994ea}
.access-role-card.active{background:linear-gradient(135deg,#6426ca,#984ce6);border-color:transparent;box-shadow:0 12px 24px rgba(100,38,202,.22)}
.access-role-card.active strong,.access-role-card.active small{color:#fff}
.access-generator-row{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end;margin-top:14px}
.access-generator-row label{display:flex;flex-direction:column;gap:8px;font-weight:800;color:#4e4560}
.access-generator-row input{width:100%;padding:14px 16px;border:1px solid #dfd1f2;border-radius:15px;font-size:1rem}
.staff-profile-card footer small{max-width:470px;line-height:1.4}
@media(max-width:800px){.access-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.access-generator-row{grid-template-columns:1fr}.access-generator-row .primary-btn{width:100%}}
@media(max-width:520px){.access-role-grid{grid-template-columns:1fr}}


/* V1.2.11 — deslizar para actualizar en celular y tableta */
#seniorcarePullRefresh{position:fixed;left:50%;top:10px;z-index:9999;transform:translate(-50%,-110%);display:flex;align-items:center;gap:10px;padding:10px 16px;border:1px solid #e4d5f7;border-radius:999px;background:rgba(255,255,255,.97);box-shadow:0 12px 30px rgba(62,30,97,.16);color:#5a24b4;opacity:0;pointer-events:none;transition:opacity .16s ease,transform .16s ease;font-size:.82rem}
#seniorcarePullRefresh.visible{opacity:1}
#seniorcarePullRefresh.ready{background:#f7ecff;color:#a7198a;border-color:#efc8e8}
#seniorcarePullRefresh.loading{opacity:1;transform:translate(-50%,0)!important}
#seniorcarePullRefresh .ptr-spinner{width:18px;height:18px;border:2px solid #dccaf4;border-top-color:#7a3ed1;border-radius:50%}
#seniorcarePullRefresh.loading .ptr-spinner{animation:seniorcarePtrSpin .8s linear infinite}
@keyframes seniorcarePtrSpin{to{transform:rotate(360deg)}}
@media(pointer:fine){#seniorcarePullRefresh{display:none!important}}

/* V1.3.0 módulo Enfermería */
.nurse-hero-v130{background:linear-gradient(105deg,#4c1cc2 0%,#8548dc 58%,#d186c3 100%);border:1px solid rgba(123,75,207,.28);box-shadow:0 18px 38px rgba(91,39,176,.23);color:#fff}
.nurse-metrics-v130 .admin-stat{min-height:118px}
.nurse-shift-banner-v130{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0;background:linear-gradient(135deg,#fff,#faf6ff);border:1px solid #e3d6f6;border-left:6px solid #8c43d5;border-radius:20px;padding:18px 20px;box-shadow:0 10px 28px rgba(72,34,112,.07)}
.nurse-shift-banner-v130 span{display:block;color:#8c43d5;font-size:.74rem;font-weight:900;letter-spacing:.12em}.nurse-shift-banner-v130 strong{display:block;margin-top:5px;font-size:1.18rem}.nurse-shift-banner-v130 small{display:block;margin-top:5px;color:#786f84}
.handoff-mode-grid-v130{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.handoff-mode-card-v130{display:flex;align-items:center;gap:14px;border:1px solid #e5d8f5;background:#fff;border-radius:18px;padding:17px;text-align:left;cursor:pointer}.handoff-mode-card-v130>span{width:46px;height:46px;border-radius:14px;padding:11px;background:#f3ebff;color:#7a38c8}.handoff-mode-card-v130 svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2}.handoff-mode-card-v130 strong,.handoff-mode-card-v130 small{display:block}.handoff-mode-card-v130 small{margin-top:4px;color:#7c7288}.handoff-mode-card-v130.active{border-color:#8b43d4;background:linear-gradient(135deg,#fff,#f7f0ff);box-shadow:0 0 0 3px rgba(139,67,212,.10)}
.nurse-handoff-form-v130{margin-top:14px}.nurse-more-grid-v130 .module-card{min-height:92px}.hidden{display:none!important}
@media(max-width:760px){.nurse-shift-banner-v130{flex-direction:column;align-items:flex-start}.nurse-shift-banner-v130 .primary-btn{width:100%;justify-content:center}.handoff-mode-grid-v130{grid-template-columns:1fr}.nurse-metrics-v130{grid-template-columns:1fr!important}}


/* Bernard Health SeniorCare V1.3.2
   Ajustes puntuales del módulo de Enfermería.
   Se conserva íntegramente la composición visual original V1.3.0. */

/* Recupera la lectura del saludo sin sustituir el fondo claro original. */
.nurse-hero-v130 .eyebrow{color:#f4e8ff}
.nurse-hero-v130 h2{color:#fff;text-shadow:none}
.nurse-hero-v130 p{color:#f7efff}
.nurse-hero-v130 .admin-mark{color:#fff;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.08)}
.nurse-hero-v130 .admin-mark svg{stroke:#fff}

/* Mantiene libres los controles finales frente a la navegación fija. */
.app-shell{padding-bottom:124px}
#reportPreview,.nurse-handoff-form-v130,.handoff-history-section{scroll-margin-bottom:118px}

/* El selector conserva el diseño de la serie, con mejor acabado y lectura. */
.report-resident-select select{
  border:1px solid #d9cbed;
  border-radius:12px;
  padding:10px 38px 10px 12px;
  background-color:#fff;
  color:#2d2338;
  font-weight:750;
  outline:none;
}
.report-resident-select select:focus{border-color:#7a3ed1;box-shadow:0 0 0 3px rgba(122,62,209,.11)}

/* Evita que el reporte abierto quede oculto detrás de la barra inferior. */
.report-preview{scroll-margin-top:18px;margin-bottom:34px}
.report-editor{padding-bottom:36px}

@media(max-width:640px){
  .app-shell{padding-bottom:116px}
  .report-preview{margin-bottom:26px}
}

@media print{
  .bottom-nav{display:none!important}
  .app-shell{padding-bottom:0!important}
}

/* V1.3.7 — corrección puntual: solo el banner principal de Enfermería usa el degradado morado. */
.role-welcome.nurse-welcome.nurse-hero-v130{
  background:linear-gradient(105deg,#4c1cc2 0%,#8548dc 58%,#d186c3 100%)!important;
  border:1px solid rgba(123,75,207,.28)!important;
  box-shadow:0 18px 38px rgba(91,39,176,.23)!important;
  color:#fff!important;
}
.role-welcome.nurse-welcome.nurse-hero-v130 .eyebrow{color:#f4e8ff!important}
.role-welcome.nurse-welcome.nurse-hero-v130 h2{color:#fff!important}
.role-welcome.nurse-welcome.nurse-hero-v130 p{color:#f7efff!important}
.role-welcome.nurse-welcome.nurse-hero-v130 .admin-mark{background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.08)!important;color:#fff!important}
.role-welcome.nurse-welcome.nurse-hero-v130 .admin-mark svg{stroke:#fff!important}

/* Corrige la aglomeración del nombre, habitación, dieta y progreso en Plan de cuidados. */
.care-resident-strip{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow-soft);
}
.care-resident-strip>div{min-width:0}
.care-resident-strip strong{display:block;line-height:1.25;margin:0 0 4px;color:var(--ink)}
.care-resident-strip>div>span{display:block;color:var(--muted);line-height:1.35;white-space:normal;overflow-wrap:anywhere}
.care-resident-strip>.status{justify-self:end;align-self:center}
@media(max-width:640px){
  .care-resident-strip{grid-template-columns:1fr;align-items:start}
  .care-resident-strip>.status{justify-self:start}
}

/* Bernard Health SeniorCare V1.4.1 — módulo Asistente */
.assistant-hero-v141{
  background:linear-gradient(105deg,#4c1cc2 0%,#8548dc 58%,#d186c3 100%)!important;
  border:1px solid rgba(123,75,207,.28)!important;
  box-shadow:0 18px 38px rgba(91,39,176,.23)!important;
  color:#fff!important;
}
.assistant-hero-v141 .eyebrow{color:#f4e8ff!important}
.assistant-hero-v141 h2{color:#fff!important}
.assistant-hero-v141 p{color:#f7efff!important}
.assistant-hero-v141 .admin-mark{background:rgba(255,255,255,.15)!important;border:1px solid rgba(255,255,255,.10)!important;color:#fff!important}
.assistant-hero-v141 .admin-mark svg{stroke:#fff!important}
.assistant-clock-v141{border-color:#e3d5f4!important;background:linear-gradient(135deg,#fff,#faf6ff)!important}
.assistant-clock-v141>div:first-child>span{color:#c22874!important;font-weight:900!important;letter-spacing:.09em!important}
.assistant-metrics-v141 .admin-stat{min-height:118px}
.assistant-shift-banner-v141{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:18px 0;background:linear-gradient(135deg,#fff,#faf6ff);border:1px solid #e3d5f4;border-left:6px solid #6a2dcc;border-radius:20px;padding:18px 20px;box-shadow:0 10px 28px rgba(91,39,176,.08)}
.assistant-shift-banner-v141 span{display:block;color:#6a2dcc;font-size:.74rem;font-weight:900;letter-spacing:.12em}
.assistant-shift-banner-v141 strong{display:block;margin-top:5px;font-size:1.18rem}
.assistant-shift-banner-v141 small{display:block;margin-top:5px;color:#766b86}
.assistant-more-v141 .module-card{min-height:92px}
@media(max-width:760px){
  .assistant-shift-banner-v141{flex-direction:column;align-items:flex-start}
  .assistant-shift-banner-v141 .primary-btn{width:100%;justify-content:center}
  .assistant-metrics-v141{grid-template-columns:1fr!important}
}

/* V1.4.7 — historial administrativo y asignación de residentes */
.assistant-assignment-box{margin:14px 0 0;border:1px solid #e4d8f5;border-radius:16px;background:#fbf8ff;overflow:hidden}
.assistant-assignment-box summary{cursor:pointer;list-style:none;padding:14px 16px;display:flex;flex-direction:column;gap:4px}
.assistant-assignment-box summary::-webkit-details-marker{display:none}
.assistant-assignment-box summary span{font-size:.72rem;font-weight:900;letter-spacing:.1em;color:#6a2dcc}
.assistant-assignment-box summary strong{font-size:.88rem;color:#3f3150;line-height:1.4}
.assistant-assignment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 16px 14px}
.assistant-assignment-list label{display:flex;align-items:flex-start;gap:9px;border:1px solid #e8def3;border-radius:13px;padding:11px;background:#fff;cursor:pointer}
.assistant-assignment-list label span{min-width:0}.assistant-assignment-list strong,.assistant-assignment-list small{display:block}.assistant-assignment-list small{margin-top:3px;color:#7c7188}
.assistant-assignment-box .form-actions{padding:0 16px 16px}
.attendance-history-admin{margin-top:20px}
.attendance-history-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.attendance-history-head span{font-size:.72rem;font-weight:900;letter-spacing:.11em;color:#c22874}
.attendance-history-head h3{margin:5px 0}.attendance-history-head p{margin:0;color:#746a80}
.attendance-history-head>strong{background:#f3ecff;color:#5b28b8;border-radius:999px;padding:8px 13px;white-space:nowrap}
.attendance-history-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:18px 0}
.attendance-history-toolbar label{display:flex;flex-direction:column;gap:6px;font-size:.76rem;font-weight:850;color:#6f657a}
.attendance-history-toolbar input{border:1px solid #dfd2f1;border-radius:12px;padding:10px 12px;background:#fff}
.attendance-table-wrap{overflow:auto;border:1px solid #eadff4;border-radius:16px}
.attendance-history-table{width:100%;border-collapse:collapse;min-width:760px}
.attendance-history-table th,.attendance-history-table td{padding:12px 14px;border-bottom:1px solid #eee6f6;text-align:left}
.attendance-history-table th{background:#f8f3ff;color:#5b28b8;font-size:.75rem;letter-spacing:.05em}
.attendance-history-table tr:last-child td{border-bottom:0}.attendance-empty-cell{text-align:center!important;color:#7a7085;padding:28px!important}
@media(max-width:760px){.assistant-assignment-list{grid-template-columns:1fr}.attendance-history-head{flex-direction:column}.attendance-history-toolbar>*{width:100%}.attendance-history-toolbar button{justify-content:center}}
.assistant-assigned-module-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
@media(max-width:760px){.assistant-assigned-module-list{grid-template-columns:1fr}}

/* Bernard Health SeniorCare V1.4.8 — personal editable y paquetes comerciales */
.staff-record-actions-v148{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;padding-top:14px;margin-top:14px;border-top:1px solid #eee5f7}
.module-package-panel-v148{margin-top:18px}
.module-package-head-v148{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.module-package-head-v148 span{display:block;color:#6a2dcc;font-size:.7rem;font-weight:900;letter-spacing:.14em}
.module-package-head-v148 h3{margin:5px 0 4px}.module-package-head-v148 p{margin:0;color:#766d83;line-height:1.45}
.module-package-head-v148>div:last-child{min-width:180px;text-align:right;padding:14px 16px;border-radius:18px;background:linear-gradient(135deg,#f3eaff,#fff);border:1px solid #e2d4f4}
.module-package-head-v148>div:last-child small,.module-package-head-v148>div:last-child strong{display:block}.module-package-head-v148>div:last-child strong{font-size:1.5rem;color:#5b28b8;margin-top:4px}
.module-package-grid-v148{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.module-package-grid-v148 article{padding:15px;border:1px solid #e8ddf5;border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(71,37,121,.05)}
.module-package-grid-v148 article>label:last-child{display:flex;flex-direction:column;gap:7px;margin-top:13px;color:#71687e;font-size:.78rem;font-weight:850}
.module-package-grid-v148 input[type=number]{width:100%;border:1px solid #dfd1f1;border-radius:12px;padding:11px 12px;font-weight:800;color:#4c267f}
.module-package-toggle-v148{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;cursor:pointer}.module-package-toggle-v148 input{display:none}.module-package-toggle-v148>span{width:46px;height:26px;border-radius:999px;background:#d9d2e2;position:relative;transition:.2s}.module-package-toggle-v148>span:after{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.18);transition:.2s}.module-package-toggle-v148 input:checked+span{background:#6a2dcc}.module-package-toggle-v148 input:checked+span:after{transform:translateX(20px)}
.module-package-toggle-v148 strong,.module-package-toggle-v148 small{display:block}.module-package-toggle-v148 small{margin-top:4px;color:#786f84;line-height:1.35}
.module-package-note-v148{margin-top:14px;padding:13px 15px;border-radius:15px;background:#f8f3ff;color:#6f647c;line-height:1.45}
.admin-package-summary-v148{padding:14px 16px;margin:14px 0;border:1px solid #dfd1f2;border-radius:17px;background:linear-gradient(135deg,#f7f1ff,#fff)}.admin-package-summary-v148 strong,.admin-package-summary-v148 span{display:block}.admin-package-summary-v148 strong{color:#5b28b8}.admin-package-summary-v148 span{margin-top:4px;color:#71687d}
@media(max-width:760px){.module-package-grid-v148{grid-template-columns:1fr}.module-package-head-v148{flex-direction:column}.module-package-head-v148>div:last-child{width:100%;text-align:left}.staff-record-actions-v148>*{flex:1}}

/* V1.5.3 publicación autoritativa */
.authoritative-sync-status{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:14px 0;padding:16px 18px;border:1px solid #e3d5f4;border-radius:18px;background:linear-gradient(135deg,#fff,#faf6ff);box-shadow:0 8px 24px rgba(91,39,176,.07)}
.authoritative-sync-status span:first-child{display:block;color:#c22874;font-size:.72rem;font-weight:900;letter-spacing:.1em}
.authoritative-sync-status strong{display:block;margin-top:4px;color:#2e2140}
.authoritative-sync-status small{display:block;margin-top:4px;color:#766b86;line-height:1.4}
.authoritative-publish-btn{background:linear-gradient(90deg,#5b28b8,#8548dc)!important}
@media(max-width:760px){.authoritative-sync-status{align-items:flex-start;flex-direction:column}.authoritative-publish-btn{width:100%;justify-content:center}}

/* V1.5.7 — cuentas sin ficha y control de acceso */
.access-actions-v157{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.orphan-access-v157{margin-top:18px}.orphan-access-v157 .muted-copy{color:var(--muted);margin-top:-4px}.orphan-access-list{display:grid;gap:10px}.orphan-access-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff}.orphan-access-row>div:first-child{min-width:0}.orphan-access-row strong,.orphan-access-row span{display:block}.orphan-access-row span{color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.orphan-access-row .access-actions-v157{margin:0;padding:0;border:0}
@media(max-width:760px){.orphan-access-row{flex-direction:column;align-items:stretch}.orphan-access-row .access-actions-v157{justify-content:flex-start}.access-actions-v157 .secondary-btn{flex:1;justify-content:center}}

/* Bernard Health SeniorCare V1.6.1 — acciones de acceso independientes */
.access-actions-v161{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.access-actions-v161 .secondary-btn:disabled{opacity:.42;cursor:not-allowed;filter:grayscale(.2)}
.orphan-access-v161{margin-top:18px}
.orphan-access-v161 .muted-copy{color:var(--muted);margin-top:-4px}
.orphan-access-row .access-actions-v161{margin:0;padding:0;border:0}
@media(max-width:760px){.orphan-access-row .access-actions-v161{justify-content:flex-start}.access-actions-v161 .secondary-btn{flex:1;justify-content:center}}

.access-actions-v162{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.access-actions-v162 .secondary-btn:disabled{opacity:.42;cursor:not-allowed;filter:grayscale(.2)}
.orphan-access-v162{margin-top:18px}
.orphan-access-v162 .muted-copy{color:var(--muted);margin-top:-4px}
.orphan-access-row .access-actions-v162{margin:0;padding:0;border:0}
@media(max-width:760px){.orphan-access-row .access-actions-v162{justify-content:flex-start}.access-actions-v162 .secondary-btn{flex:1;justify-content:center}}

/* V1.6.5: ocultar únicamente el botón local duplicado; conservar sus controladores */
button[data-delete-staff-v148]{display:none!important}

/* V1.6.6 — resumen de accesos del personal; sin alterar otros módulos */
.staff-access-summary-v166{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0 18px}
.staff-access-summary-v166 article{background:#fff;border:1px solid #e7dcf3;border-radius:18px;padding:16px 18px;box-shadow:0 8px 24px rgba(71,37,121,.05)}
.staff-access-summary-v166 span,.staff-access-summary-v166 small{display:block}
.staff-access-summary-v166 span{font-size:.72rem;font-weight:900;letter-spacing:.09em;color:#6a2dcc}
.staff-access-summary-v166 strong{display:block;margin:6px 0 3px;font-size:1.6rem;color:#4f24a8}
.staff-access-summary-v166 small{color:#786e84;line-height:1.35}
@media(max-width:760px){.staff-access-summary-v166{grid-template-columns:1fr}}

/* V1.6.8 — asistencia de Enfermería, sin controles administrativos */
.nurse-self-attendance-v168{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#fff,#faf6ff);border:1px solid #e4d8f4;border-radius:22px;padding:20px;box-shadow:0 10px 28px rgba(80,42,145,.07)}
.nurse-self-attendance-copy-v168 span,.nurse-attendance-history-head-v168 span{display:block;color:#c22874;font-size:.74rem;font-weight:900;letter-spacing:.11em}
.nurse-self-attendance-copy-v168 h3{margin:6px 0 4px;font-size:1.3rem}.nurse-self-attendance-copy-v168 p{margin:0;color:var(--muted)}
.nurse-self-attendance-actions-v168{display:flex;align-items:center;justify-content:flex-end}
.nurse-attendance-history-v168{margin-top:16px}.nurse-attendance-history-head-v168{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.nurse-attendance-history-head-v168 h3{margin:4px 0 0}.nurse-attendance-history-head-v168>strong{display:grid;place-items:center;min-width:42px;height:34px;border-radius:999px;background:#f1e8ff;color:#642ac5}
@media(max-width:700px){.nurse-self-attendance-v168{flex-direction:column;align-items:stretch}.nurse-self-attendance-actions-v168{justify-content:stretch}.nurse-self-attendance-actions-v168 .clock-btn{width:100%}.nurse-attendance-history-v168 .attendance-table-wrap{overflow-x:auto}}

/* V1.6.9 — acciones uniformes y cierre real en Centro de alertas */
.connected-alert-card .alert-card-actions{display:grid!important;grid-template-columns:repeat(3,minmax(82px,1fr)) 42px;gap:8px;align-items:center;min-width:360px}
.connected-alert-card .alert-action-btn{width:100%;min-height:40px;display:inline-flex;align-items:center;justify-content:center}
.connected-alert-card .alert-action-btn:disabled{opacity:.45;cursor:not-allowed;background:#f1edf7;color:#948aa3}
.connected-alert-card .alert-dismiss-btn{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px}
@media(max-width:900px){.connected-alert-card .alert-card-actions{min-width:0;width:100%;grid-template-columns:repeat(3,1fr) 42px}}
@media(max-width:560px){.connected-alert-card .alert-card-actions{grid-template-columns:1fr 1fr}.connected-alert-card .alert-dismiss-btn{width:100%;height:40px}.connected-alert-card .alert-action-btn{min-width:0}}

/* SeniorCare V3.4.0 — Personal y turnos global */
.staff-days-field{border:1px solid var(--line);border-radius:16px;padding:14px}.staff-days-field legend{padding:0 8px;font-weight:850;color:var(--muted);font-size:.8rem}.staff-days-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.staff-days-grid label{display:block!important}.staff-days-grid input{display:none}.staff-days-grid span{display:grid;place-items:center;min-height:40px;border:1px solid #dfd2f1;border-radius:12px;background:#fff;color:#675a75;font-weight:850;cursor:pointer}.staff-days-grid input:checked+span{background:var(--purple);border-color:var(--purple);color:#fff}.global-staff-card{min-width:0}.global-staff-card .staff-card-pro-body{grid-template-columns:1fr 1fr 1.3fr}.global-staff-card .staff-card-pro-body strong{overflow-wrap:anywhere}.global-staff-grid{align-items:start}@media(max-width:700px){.staff-days-grid{grid-template-columns:repeat(4,1fr)}.global-staff-card .staff-card-pro-body{grid-template-columns:1fr}.global-staff-card .staff-card-pro-actions{display:grid;grid-template-columns:1fr 1fr}.global-staff-card .staff-card-pro-actions .mini-btn,.global-staff-card .staff-card-pro-actions .icon-delete{width:100%}}

/* SeniorCare V3.4.2 — administración de personal sin marcas delegadas */
.staff-card-pro-actions .secondary-btn[data-view-staff-attendance]{display:inline-flex;align-items:center;justify-content:center;min-width:132px}.staff-attendance-summary{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.staff-attendance-history{display:grid;gap:10px}.staff-attendance-history>article{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;align-items:center;padding:13px 14px;border:1px solid var(--line);border-radius:16px;background:#fff}.staff-attendance-history span{display:block;color:var(--muted);font-size:.76rem;margin-bottom:4px}.staff-attendance-history strong{display:block;overflow-wrap:anywhere}@media(max-width:640px){.staff-card-pro-actions .secondary-btn[data-view-staff-attendance]{flex:1 1 100%;width:100%}.staff-attendance-summary{grid-template-columns:1fr}.staff-attendance-history>article{grid-template-columns:1fr}}

/* Supervisor Global V3.5.0 */
.supervisor-global-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:16px 0}.supervisor-global-kpis article,.supervisor-create-card,.supervisor-org-card,.supervisor-detail-head,.supervisor-detail-grid article,.supervisor-module-panel,.supervisor-license-list article,.supervisor-admin-list article,.supervisor-audit-list article,.supervisor-alert-list article{background:#fff;border:1px solid #e7dcf3;border-radius:20px;padding:18px;box-shadow:0 10px 26px rgba(70,38,106,.06)}.supervisor-global-kpis span,.supervisor-detail-grid span{display:block;color:#756b82;font-size:.75rem;text-transform:uppercase;letter-spacing:.08em}.supervisor-global-kpis strong{display:block;font-size:1.75rem;color:#5b27bb;margin:6px 0}.supervisor-global-kpis small{color:#83798d}.supervisor-global-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.supervisor-global-menu button{border:1px solid #e5d8f4;background:#fff;border-radius:20px;padding:20px;text-align:left;font-size:1.05rem;font-weight:900;color:#352346;box-shadow:0 8px 22px rgba(60,35,91,.05)}.supervisor-global-menu small{display:block;color:#7b7186;font-size:.8rem;margin-top:5px;font-weight:600}.supervisor-create-card{margin-bottom:16px}.supervisor-org-list,.supervisor-license-list,.supervisor-admin-list,.supervisor-audit-list,.supervisor-alert-list{display:grid;gap:14px}.supervisor-org-card{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:start}.supervisor-org-card h3,.supervisor-detail-head h3,.supervisor-license-list h3,.supervisor-admin-list h3{margin:0}.supervisor-org-card p,.supervisor-detail-head p,.supervisor-license-list p,.supervisor-admin-list p{margin:5px 0 0;color:#7c7287}.supervisor-org-meta{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.supervisor-org-meta span,.supervisor-detail-grid article{background:#faf7fe;border-radius:14px;padding:12px;color:#7d7288;font-size:.75rem}.supervisor-org-meta strong,.supervisor-detail-grid strong{display:block;color:#30213e;font-size:.92rem;margin-top:5px}.supervisor-org-actions,.supervisor-detail-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.supervisor-detail-head{display:flex;justify-content:space-between;align-items:center}.supervisor-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.supervisor-module-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.supervisor-module-head h3{margin:3px 0}.supervisor-module-head>strong{font-size:1.35rem;color:#612bc2}.supervisor-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.supervisor-module-grid article{display:grid;grid-template-columns:1fr 130px;gap:12px;align-items:center;border:1px solid #e8ddf3;border-radius:16px;padding:14px}.supervisor-module-grid label{display:flex;gap:10px;align-items:center}.supervisor-module-grid label strong,.supervisor-module-grid label small{display:block}.supervisor-module-grid label small{color:#7c7287;margin-top:3px}.supervisor-module-grid .sg-price,.supervisor-license-fields input{width:100%;border:1px solid #dfd1ef;border-radius:12px;padding:11px}.supervisor-license-list article{display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:center}.supervisor-license-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.supervisor-license-fields label{font-size:.75rem;color:#776d82}.supervisor-admin-list article{display:grid;grid-template-columns:1fr auto auto auto;gap:12px;align-items:center}.supervisor-audit-list article{display:grid;grid-template-columns:1fr auto;gap:8px}.supervisor-audit-list p{grid-column:1/-1;margin:0;color:#756b82;overflow-wrap:anywhere}.supervisor-alert-list article{display:flex;align-items:center;gap:12px}.supervisor-alert-list article strong{flex:1}
@media(max-width:900px){.supervisor-global-kpis{grid-template-columns:repeat(2,1fr)}.supervisor-global-kpis article:last-child{grid-column:1/-1}.supervisor-org-meta,.supervisor-detail-grid{grid-template-columns:repeat(2,1fr)}.supervisor-license-list article{grid-template-columns:1fr}.supervisor-admin-list article{grid-template-columns:1fr auto}.supervisor-admin-list article small,.supervisor-admin-list article button{grid-column:1/-1}.supervisor-module-grid{grid-template-columns:1fr}}
@media(max-width:620px){.supervisor-global-menu,.supervisor-global-kpis,.supervisor-org-meta,.supervisor-detail-grid{grid-template-columns:1fr}.supervisor-global-kpis article:last-child{grid-column:auto}.supervisor-org-card{grid-template-columns:1fr}.supervisor-org-card>.status{justify-self:start}.supervisor-org-actions>*{flex:1 1 100%}.supervisor-detail-head{align-items:flex-start;flex-direction:column}.supervisor-module-head{flex-direction:column}.supervisor-module-grid article{grid-template-columns:1fr}.supervisor-license-fields{grid-template-columns:1fr}.supervisor-admin-list article{grid-template-columns:1fr}.supervisor-admin-list article>.status{justify-self:start}.supervisor-admin-list article small,.supervisor-admin-list article button{grid-column:auto}}

/* Supervisor Global V3.5.1 */
.supervisor-page-head{position:relative}.supervisor-back-btn{align-self:center;min-width:96px;justify-content:center}.supervisor-license-list>article{scroll-margin-top:110px}.supervisor-license-fields input{width:100%}.supervisor-org-actions [data-sg-save-license]{background:#f3ecff;color:#5b28b8}.supervisor-global-menu button,.supervisor-org-actions button{touch-action:manipulation}
@media(max-width:700px){.supervisor-page-head{align-items:flex-start}.supervisor-back-btn{min-width:auto}.supervisor-license-fields{grid-template-columns:1fr!important}.supervisor-org-actions{display:grid!important;grid-template-columns:1fr!important}.supervisor-org-actions button{width:100%}}


/* SeniorCare V3.5.2 — Supervisor visual profesional */
.supervisor-page-head{background:linear-gradient(120deg,#f2e9ff 0%,#ffffff 58%,#f7f2ff 100%)!important;border:1px solid #dfd0f2!important;box-shadow:0 14px 34px rgba(74,35,118,.08)!important;padding:24px 26px!important}.supervisor-page-head:after{content:"";position:absolute;right:22px;top:20px;width:76px;height:76px;border-radius:24px;background:linear-gradient(145deg,rgba(103,44,190,.12),rgba(220,46,143,.08));pointer-events:none}.supervisor-page-head h2{font-size:1.85rem!important;color:#2d1d3f}.supervisor-page-head p{font-size:.96rem}.supervisor-page-head>div{position:relative;z-index:1}
.supervisor-kpis-pro{gap:16px!important}.supervisor-kpis-pro .sg-kpi{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center;min-height:132px;padding:20px!important;position:relative;overflow:hidden;border:0!important}.supervisor-kpis-pro .sg-kpi:after{content:"";position:absolute;right:-26px;bottom:-34px;width:96px;height:96px;border-radius:50%;background:currentColor;opacity:.045}.sg-kpi-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center}.sg-kpi-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.sg-kpi>div>span{font-weight:850}.sg-kpi>div>strong{font-size:1.72rem!important;line-height:1.05;margin:8px 0!important}.sg-kpi-purple{color:#6730c7;background:linear-gradient(145deg,#f5efff,#fff)!important}.sg-kpi-purple .sg-kpi-icon{background:#e9ddff}.sg-kpi-green{color:#12815f;background:linear-gradient(145deg,#edf9f5,#fff)!important}.sg-kpi-green .sg-kpi-icon{background:#d9f2e9}.sg-kpi-amber{color:#aa6e12;background:linear-gradient(145deg,#fff8e9,#fff)!important}.sg-kpi-amber .sg-kpi-icon{background:#ffedc9}.sg-kpi-red{color:#c43c58;background:linear-gradient(145deg,#fff1f4,#fff)!important}.sg-kpi-red .sg-kpi-icon{background:#ffe0e7}.sg-kpi-blue{color:#186fb1;background:linear-gradient(145deg,#eef7ff,#fff)!important}.sg-kpi-blue .sg-kpi-icon{background:#dceeff}.sg-kpi small{color:#756b82!important}
.sg-command-section{margin-top:20px;background:#fff;border:1px solid #e5d8f2;border-radius:24px;padding:22px;box-shadow:0 14px 36px rgba(67,34,100,.06)}.sg-section-heading{display:flex;justify-content:space-between;gap:16px;margin-bottom:16px}.sg-section-heading span{font-size:.72rem;letter-spacing:.16em;font-weight:900;color:#7435ce}.sg-section-heading h3{margin:5px 0 3px;font-size:1.35rem;color:#2c1e3a}.sg-section-heading p{margin:0;color:#7d7288}
.supervisor-menu-pro{gap:14px!important}.supervisor-menu-pro button{display:grid!important;grid-template-columns:auto 1fr auto!important;align-items:center!important;gap:14px!important;min-height:104px;padding:18px!important;border:1px solid #e7dbf3!important;background:linear-gradient(145deg,#fff,#fcf9ff)!important;transition:.18s ease!important}.supervisor-menu-pro button:hover{transform:translateY(-2px);border-color:#cab2e9!important;box-shadow:0 15px 30px rgba(75,38,111,.10)!important}.supervisor-menu-pro button>div{min-width:0}.supervisor-menu-pro strong{display:block;font-size:1.02rem;color:#30203f}.supervisor-menu-pro small{font-size:.8rem!important;line-height:1.35}.sg-menu-icon{width:50px;height:50px;border-radius:16px;display:grid;place-items:center}.sg-menu-icon svg,.sg-menu-arrow svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.sg-menu-icon.purple{background:#eee2ff;color:#6d32c9}.sg-menu-icon.green{background:#def4eb;color:#137c5d}.sg-menu-icon.blue{background:#e1effc;color:#1b6da8}.sg-menu-icon.amber{background:#fff0ce;color:#a66b12}.sg-menu-icon.red{background:#ffe2e8;color:#c33d59}.sg-menu-arrow{width:32px;height:32px;border-radius:10px;background:#f5f0fa;color:#7c5c9a;display:grid;place-items:center}.sg-menu-arrow svg{width:18px;height:18px}
.supervisor-create-card,.supervisor-module-panel,.supervisor-detail-head,.supervisor-license-list article,.supervisor-org-card,.supervisor-admin-list article,.supervisor-audit-list article,.supervisor-alert-list article{border-color:#e3d5f1!important;box-shadow:0 12px 30px rgba(70,38,106,.065)!important}.supervisor-org-card{border-left:5px solid #7340cb!important}.supervisor-license-list article{border-left:5px solid #1b9a73!important}.supervisor-admin-list article{border-left:5px solid #277bb6!important}.supervisor-audit-list article{border-left:5px solid #c68a27!important}.supervisor-module-panel{background:linear-gradient(145deg,#fff,#fdfaff)}
@media(max-width:900px){.supervisor-kpis-pro .sg-kpi{min-height:118px}.sg-command-section{padding:18px}}
@media(max-width:620px){.supervisor-page-head{padding:19px 17px!important}.supervisor-page-head:after{width:56px;height:56px;right:13px;top:15px}.supervisor-page-head h2{font-size:1.45rem!important}.supervisor-kpis-pro .sg-kpi{grid-template-columns:auto 1fr;min-height:104px}.supervisor-menu-pro button{min-height:88px}.sg-menu-icon{width:44px;height:44px}.sg-command-section{padding:15px;border-radius:20px}}

/* SeniorCare V3.5.3 — navegación y creación de administradores */
.sg-welcome{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:20px 24px;border:1px solid #e3d4f6;border-radius:24px;background:linear-gradient(105deg,#fff,#f7f0ff);box-shadow:0 10px 28px rgba(66,39,104,.06)}
.sg-welcome>div>span,.sg-admin-create>div>span{display:block;color:#7137cf;font-size:.72rem;font-weight:900;letter-spacing:.14em}.sg-welcome h3,.sg-admin-create h3{margin:5px 0 4px;font-size:1.35rem;color:#2b1c3d}.sg-welcome p,.sg-admin-create p{margin:0;color:#766c83}.sg-welcome-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:#efe3ff;color:#7137cf}.sg-welcome-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.8}.sg-admin-create{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(280px,1.4fr);gap:22px;align-items:center;margin-bottom:18px}.sg-admin-create form{margin:0}
@media(max-width:760px){.sg-welcome{align-items:flex-start;padding:17px}.sg-welcome-icon{width:48px;height:48px}.sg-admin-create{grid-template-columns:1fr}.sg-admin-create .form-actions .primary-btn{width:100%;justify-content:center}}


/* SeniorCare V3.5.4 — Supervisor con cabecera morada clásica */
.supervisor-page-head{
  background:linear-gradient(105deg,#5922bd 0%,#8350da 58%,#d690c6 100%)!important;
  border:0!important;
  box-shadow:0 18px 38px rgba(91,39,176,.23)!important;
  padding:25px 30px!important;
  border-radius:27px!important;
  overflow:hidden;
}
.supervisor-page-head:after{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  right:-80px;
  top:-100px;
  background:rgba(255,255,255,.12)!important;
  pointer-events:none;
}
.supervisor-page-head>div>span,
.supervisor-page-head h2,
.supervisor-page-head p{
  position:relative;
  z-index:1;
}
.supervisor-page-head>div>span{
  color:#eadfff!important;
}
.supervisor-page-head h2{
  color:#ffffff!important;
  font-size:1.9rem!important;
  margin:6px 0 6px!important;
}
.supervisor-page-head p{
  color:#f6efff!important;
  font-size:1rem!important;
  max-width:760px;
}
.supervisor-back-btn{
  background:rgba(255,255,255,.16)!important;
  color:#ffffff!important;
  border:1px solid rgba(255,255,255,.2)!important;
  backdrop-filter:blur(4px);
}
.supervisor-back-btn span{color:#fff!important}
.supervisor-back-btn:hover{background:rgba(255,255,255,.24)!important}

.sg-welcome{
  background:linear-gradient(180deg,#fbf7ff 0%,#f4ebff 100%)!important;
  border:1px solid #e1cff8!important;
  box-shadow:0 12px 28px rgba(88,46,142,.08)!important;
  border-radius:24px!important;
}
.sg-welcome>div>span{
  color:#6f38cb!important;
}
.sg-welcome h3{
  color:#2d1d3f!important;
}
.sg-welcome p{
  color:#766c83!important;
}
.sg-welcome-icon{
  background:#efe3ff!important;
  color:#6f38cb!important;
}

@media(max-width:620px){
  .supervisor-page-head{
    padding:20px 18px!important;
    border-radius:24px!important;
  }
  .supervisor-page-head:after{
    width:150px;
    height:150px;
    right:-55px;
    top:-70px;
  }
  .supervisor-page-head h2{
    font-size:1.55rem!important;
  }
  .supervisor-page-head p{
    font-size:.92rem!important;
  }
}

/* SeniorCare V3.6.0 — Enlace Administrador y Enfermería */
.nurse-live-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0;padding:16px 18px;border:1px solid #cde9df;border-radius:19px;background:linear-gradient(145deg,#eefaf6,#fff);box-shadow:0 10px 26px rgba(27,126,93,.07)}
.nurse-live-strip span,.admin-nurse-link-head span{display:block;font-size:.72rem;font-weight:900;letter-spacing:.14em;color:#16805f}.nurse-live-strip strong{display:block;margin:4px 0;color:#214c3e}.nurse-live-strip small{color:#6b7d76}.nurse-live-strip b{padding:8px 12px;border-radius:999px;background:#d9f3e9;color:#147b5b;font-size:.78rem}
.admin-nurse-link-v360{margin:16px 0;padding:18px;border:1px solid #ded0ef;border-radius:22px;background:linear-gradient(145deg,#fbf8ff,#fff);box-shadow:0 12px 30px rgba(76,39,113,.07)}
.admin-nurse-link-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.admin-nurse-link-head h3{margin:4px 0;color:#2d203b}.admin-nurse-link-head p{margin:0;color:#796f84}.admin-nurse-link-head b{display:grid;place-items:center;min-width:62px;height:42px;border-radius:14px;background:#e7f7f1;color:#137d5d}
.admin-nurse-link-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.admin-nurse-link-stats button{border:1px solid #e6dbf2;border-radius:15px;background:#fff;padding:13px;text-align:left}.admin-nurse-link-stats span,.admin-nurse-link-stats strong{display:block}.admin-nurse-link-stats span{color:#786e84;font-size:.76rem}.admin-nurse-link-stats strong{margin-top:5px;font-size:1.35rem;color:#6531bf}
.nurse-global-more{margin-top:4px}.nurse-global-metrics{margin-top:14px}
@media(max-width:760px){.nurse-live-strip,.admin-nurse-link-head{align-items:flex-start;flex-direction:column}.admin-nurse-link-stats{grid-template-columns:1fr 1fr}.admin-nurse-link-head b{min-width:54px}.nurse-live-strip b{align-self:flex-start}}

/* V3.6.1 eliminación global */
.danger-action-btn{border:1px solid #efb8c4;background:#fff1f4;color:#bd2d4d;border-radius:12px;padding:10px 13px;font-weight:850;cursor:pointer}.danger-action-btn:hover{background:#ffe3e9}.danger-action-btn:disabled{opacity:.55;cursor:wait}@media(max-width:700px){.supervisor-org-actions .danger-action-btn,.supervisor-admin-list .danger-action-btn{width:100%}}

/* SeniorCare V3.6.2 — responsive global para módulos operativos */
html,body{max-width:100%;overflow-x:hidden}
.app-shell,.container,#mainContent{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
#mainContent>*{min-width:0;max-width:100%}
.form-card,.history-card,.procedure-card,.handoff-card,.admin-welcome,.role-welcome,.nurse-live-strip,.self-clock-card,.quick-section,.page-head{min-width:0;max-width:100%;box-sizing:border-box}
.form-grid,.quick-grid,.admin-metrics,.more-grid,.module-grid,.resident-grid,.checklist,.care-review-list,.handoff-record-grid,.handoff-admin-list-v362{min-width:0}
.form-grid>* , .quick-grid>* , .admin-metrics>* , .more-grid>* , .module-grid>* , .resident-grid>*{min-width:0}
input,select,textarea,button{max-width:100%;box-sizing:border-box}
textarea{resize:vertical}
.attendance-table-wrap,.table-wrap,.report-preview,.handoff-history-section{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.note-card,.handoff-admin-card-v362{min-width:0;overflow:hidden}
.note-card p,.handoff-admin-card-v362 p,.handoff-detail-v362 p{overflow-wrap:anywhere;word-break:break-word}
.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.section-title-row span{display:block;color:var(--purple);font-size:.72rem;font-weight:900;letter-spacing:.12em}.section-title-row h3{margin:4px 0 0}.section-title-row>b{display:grid;place-items:center;min-width:38px;height:32px;border-radius:999px;background:var(--purple-soft);color:var(--purple)}
.nursing-filter-v362 select{width:100%}
.handoff-admin-summary-v362{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.handoff-admin-summary-v362 article{background:#fff;border:1px solid var(--line);border-radius:17px;padding:15px;box-shadow:var(--shadow-soft)}.handoff-admin-summary-v362 span,.handoff-admin-summary-v362 strong{display:block}.handoff-admin-summary-v362 span{color:var(--muted);font-size:.76rem}.handoff-admin-summary-v362 strong{font-size:1.5rem;color:var(--purple-dark);margin-top:5px}
.handoff-admin-list-v362{display:grid;gap:12px}.handoff-admin-card-v362{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px;box-shadow:var(--shadow-soft)}.handoff-admin-card-v362.is-archived{opacity:.82;background:#faf8fc}.handoff-card-main-v362 strong,.handoff-card-main-v362 small{display:block}.handoff-card-main-v362 small{color:var(--muted);margin-top:4px}.handoff-card-main-v362 p{margin:10px 0;color:#5f5669}.handoff-card-actions-v362{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.handoff-card-actions-v362 .mini-btn{min-width:90px}.handoff-card-actions-v362 .icon-delete{margin-left:auto}
.handoff-detail-v362{margin-top:16px;background:#fff;border:1px solid #dfd1ef;border-radius:20px;padding:18px;box-shadow:var(--shadow)}.handoff-detail-head-v362{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.handoff-detail-head-v362 span{font-size:.72rem;letter-spacing:.12em;color:var(--purple);font-weight:900}.handoff-detail-head-v362 h3{margin:5px 0 0}.handoff-detail-grid-v362{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:15px 0}.handoff-detail-grid-v362 article{background:#f8f4fc;border-radius:13px;padding:12px}.handoff-detail-grid-v362 span,.handoff-detail-grid-v362 strong{display:block}.handoff-detail-grid-v362 span{font-size:.72rem;color:var(--muted)}.handoff-detail-grid-v362 strong{margin-top:4px}
@media(max-width:760px){
  .container{padding-left:12px!important;padding-right:12px!important}
  .admin-metrics,.quick-grid,.more-grid,.module-grid,.resident-grid,.checklist,.care-task-grid,.handoff-admin-summary-v362,.handoff-detail-grid-v362{grid-template-columns:1fr!important}
  .admin-welcome,.role-welcome,.nurse-live-strip,.self-clock-card,.handoff-form-title,.handoff-history-title{align-items:flex-start!important;flex-direction:column!important}
  .admin-mark{align-self:flex-end}
  .form-actions,.card-actions,.record-actions,.handoff-card-actions-v362{width:100%;display:grid!important;grid-template-columns:1fr!important}
  .form-actions button,.card-actions button,.record-actions button,.handoff-card-actions-v362 button{width:100%!important;margin:0!important}
  .handoff-card-actions-v362 .icon-delete{height:42px}
  .page-head{align-items:flex-start!important}
  .bottom-nav{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
  .bottom-nav .nav-item{min-width:68px}
  .nurse-global-metrics{grid-template-columns:1fr!important}
  .nurse-global-more{grid-template-columns:1fr!important}
}
@media(max-width:420px){
  .container{padding:10px!important}
  .page-head,.form-card,.history-card,.admin-welcome,.role-welcome{padding:15px!important;border-radius:18px!important}
  .page-head h2{font-size:1.28rem!important}
  .admin-welcome h2{font-size:1.45rem!important}
}

/* SeniorCare V3.6.3 — Centro Global de Alertas */
.global-alert-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.global-alert-summary article{background:#fff;border:1px solid #e5d9f1;border-radius:18px;padding:16px;box-shadow:0 10px 24px rgba(69,38,100,.055)}.global-alert-summary span{display:block;color:#786e84;font-size:.78rem}.global-alert-summary strong{display:block;margin-top:5px;font-size:1.55rem;color:#5f2abc}.global-alert-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.global-alert-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid #e2d4f1;background:#fff;color:#654a7d;border-radius:15px;padding:12px 14px;font-weight:850;cursor:pointer}.global-alert-tabs button.active{background:linear-gradient(90deg,#5d27bb,#8147d7);border-color:transparent;color:#fff;box-shadow:0 9px 22px rgba(91,39,176,.20)}.global-alert-tabs b{display:grid;place-items:center;min-width:26px;height:24px;padding:0 7px;border-radius:999px;background:rgba(120,72,174,.12)}.global-alert-tabs .active b{background:rgba(255,255,255,.18)}.global-alert-panel{background:#fff;border:1px solid #e4d7f1;border-radius:22px;padding:18px;box-shadow:0 12px 30px rgba(70,38,106,.055)}.global-alert-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.global-alert-panel-head span{display:block;color:#7137cf;font-size:.7rem;letter-spacing:.14em;font-weight:900}.global-alert-panel-head h3{margin:4px 0 0;color:#2d203a}.global-alert-list{display:grid;gap:12px}.global-alert-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:13px;align-items:center;border:1px solid #e7ddef;border-radius:18px;padding:14px;background:#fff}.global-alert-card.is-archived{opacity:.76;background:#faf8fc}.global-alert-icon{width:45px;height:45px;border-radius:14px;display:grid;place-items:center}.global-alert-icon.resident{background:#eee3ff;color:#6c31c7}.global-alert-icon.staff{background:#e3f2ff;color:#2573aa}.global-alert-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9}.global-alert-main{min-width:0}.global-alert-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.global-alert-main p{margin:6px 0;color:#63596f;line-height:1.38;overflow-wrap:anywhere}.global-alert-meta{display:flex;gap:9px;flex-wrap:wrap}.global-alert-meta span{font-size:.72rem;color:#887d92;background:#f7f3fa;border-radius:999px;padding:5px 8px}.global-alert-actions{display:grid;grid-template-columns:repeat(3,minmax(80px,1fr));gap:7px;min-width:290px}.global-alert-actions .mini-btn{min-height:36px}.global-alert-actions .icon-delete{grid-column:3;width:100%;height:36px}.global-alert-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:900px){.global-alert-summary{grid-template-columns:repeat(2,1fr)}.global-alert-card{grid-template-columns:auto minmax(0,1fr)}.global-alert-actions{grid-column:1/-1;min-width:0;grid-template-columns:repeat(3,1fr)}.global-alert-actions .icon-delete{grid-column:auto}}
@media(max-width:620px){.global-alert-summary{grid-template-columns:1fr 1fr}.global-alert-tabs{grid-template-columns:1fr}.global-alert-panel{padding:14px}.global-alert-panel-head{align-items:flex-start;flex-direction:column}.global-alert-panel-head .secondary-btn{width:100%}.global-alert-card{grid-template-columns:1fr}.global-alert-icon{width:42px;height:42px}.global-alert-title-row{align-items:flex-start;flex-direction:column}.global-alert-actions{grid-template-columns:1fr 1fr;width:100%}.global-alert-actions .icon-delete{width:100%}.global-alert-main p{font-size:.9rem}}


/* SeniorCare V3.7.0 — Asistente Global responsive */
.assistant-global-hero{margin-bottom:16px}
.assistant-global-clock{margin:0 0 16px}
.assistant-global-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.assistant-global-actions .quick-card{width:100%;min-width:0}
.assistant-global-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.assistant-assignment-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px}
.assistant-assignment-summary article{background:#fff;border:1px solid var(--line);border-radius:17px;padding:14px;box-shadow:var(--shadow-soft)}
.assistant-assignment-summary span,.assistant-assignment-summary strong{display:block}
.assistant-assignment-summary span{font-size:.75rem;color:var(--muted)}
.assistant-assignment-summary strong{font-size:1.45rem;color:var(--purple-dark);margin-top:5px}
.assistant-readonly-note{margin-left:auto;padding:7px 10px;border-radius:999px;background:#f2ebff;color:#6b32c5;font-size:.72rem;font-weight:900;white-space:nowrap}
body.assistant-role .family-whatsapp-btn,body.assistant-role #familyWhatsAppButton{display:none!important}

@media(max-width:760px){
  .assistant-global-actions,.assistant-global-metrics,.assistant-assignment-summary{grid-template-columns:1fr 1fr}
  .assistant-global-actions .quick-card{min-height:96px}
  .assistant-global-clock{align-items:stretch;flex-direction:column}
  .assistant-global-clock .self-clock-actions{width:100%}
  .assistant-global-clock .clock-btn{width:100%}
  .assistant-readonly-note{width:100%;margin:10px 0 0;text-align:center;white-space:normal}
}
@media(max-width:480px){
  .assistant-global-actions,.assistant-global-metrics,.assistant-assignment-summary{grid-template-columns:1fr}
  .assistant-global-hero{align-items:flex-start}
  .assistant-global-hero .admin-mark{flex:0 0 auto}
  .assistant-global-more{grid-template-columns:1fr!important}
  .care-review-list article{grid-template-columns:1fr!important;align-items:flex-start!important}
  .care-review-list article .mini-btn{width:100%}
}


/* SeniorCare V3.7.1 — asignación de residentes y asistencia enlazada */
.global-assignment-box{margin:14px 0 4px;border:1px solid #e4d7f2;border-radius:16px;background:#fbf8ff;overflow:hidden}
.global-assignment-box summary{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 15px;cursor:pointer;list-style:none}
.global-assignment-box summary::-webkit-details-marker{display:none}
.global-assignment-box summary span{font-size:.72rem;font-weight:900;letter-spacing:.1em;color:#6b31c5}
.global-assignment-box summary strong{font-size:.82rem;color:#3a2b48;text-align:right;overflow-wrap:anywhere}
.global-assignment-box .assistant-assignment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 14px 12px}
.global-assignment-box .assistant-assignment-list label{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #e5d9f2;border-radius:12px;background:#fff;cursor:pointer}
.global-assignment-box .assistant-assignment-list label span{min-width:0}
.global-assignment-box .assistant-assignment-list strong,.global-assignment-box .assistant-assignment-list small{display:block}
.global-assignment-box .assistant-assignment-list small{color:#7c7287;margin-top:2px}
.global-assignment-box .form-actions{padding:0 14px 14px;margin:0}
.global-assignment-box .form-actions .primary-btn{width:100%;justify-content:center}
@media(max-width:640px){.global-assignment-box summary{align-items:flex-start;flex-direction:column}.global-assignment-box summary strong{text-align:left}.global-assignment-box .assistant-assignment-list{grid-template-columns:1fr}}


/* SeniorCare V3.7.3 — Restricción visual reforzada para Asistentes */
body.assistant-role [data-go="medications"],
body.assistant-role [data-resident-go="medications"],
body.assistant-role [data-go="wounds"],
body.assistant-role [data-resident-go="wounds"],
body.assistant-role [data-go="nursing"],
body.assistant-role [data-resident-go="nursing"],
body.assistant-role [data-go="medicalNotes"],
body.assistant-role [data-resident-go="medicalNotes"],
body.assistant-role [data-go="reports"],
body.assistant-role [data-resident-go="reports"],
body.assistant-role #residentDischargeButton,
body.assistant-role #residentDeactivateButton,
body.assistant-role .resident-admin-actions,
body.assistant-role .family-whatsapp-btn,
body.assistant-role #familyWhatsAppButton,
body.assistant-role [data-family-whatsapp]{display:none!important}

/* SeniorCare V3.8.0 — Módulos Operativos Globales */
.op-welcome{margin-bottom:16px}
.op-self-card{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;border:1px solid #e6daf3;border-radius:22px;padding:18px 20px;margin-bottom:16px;box-shadow:0 10px 28px rgba(65,38,100,.06)}
.op-self-card>div:first-child{min-width:0}.op-self-card span,.op-self-card strong,.op-self-card small{display:block}.op-self-card>div:first-child>span{font-size:.72rem;letter-spacing:.12em;font-weight:900;color:#6e32c9}.op-self-card strong{margin:5px 0;color:#2d2038}.op-self-card small{color:#746a80;line-height:1.4}.op-clock-state{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.op-clock-state small{max-width:260px;text-align:right}.op-global-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-bottom:18px}
.op-global-form{margin-bottom:18px}.op-template-box{margin-top:15px;padding:14px;border:1px solid #e7dcf2;border-radius:17px;background:#fcf9ff}.op-template-box>span{display:block;margin-bottom:10px;font-size:.72rem;letter-spacing:.12em;font-weight:900;color:#6e32c9}.op-template-box>div{display:flex;gap:8px;flex-wrap:wrap}.op-template-box .filter-chip{padding:8px 12px;font-size:.78rem}
.op-task-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.op-task-summary article{background:#fff;border:1px solid #e7dcf2;border-radius:17px;padding:15px;box-shadow:0 8px 22px rgba(66,39,104,.05)}.op-task-summary span{display:block;color:#786e84;font-size:.78rem}.op-task-summary strong{display:block;margin-top:5px;font-size:1.45rem;color:#5f29b9}
.op-global-task-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.op-task-card{background:#fff;border:1px solid #e6daf2;border-radius:21px;padding:17px;box-shadow:0 10px 28px rgba(65,38,100,.06);min-width:0}.op-task-card.done{background:#f2fbf7;border-color:#ccebdd}.op-task-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.op-task-top small{color:#7a7184;text-align:right}.op-task-card>strong{display:block;font-size:1.05rem;color:#2c1e3a}.op-task-card>p{margin:7px 0 12px;color:#746a80;line-height:1.45;overflow-wrap:anywhere}.op-task-meta{display:flex;gap:8px;flex-wrap:wrap}.op-task-meta span{padding:7px 9px;border-radius:10px;background:#f7f3fb;color:#716678;font-size:.74rem}.op-completion-note{margin-top:12px;padding:11px 12px;border-radius:13px;background:#fff;border:1px solid #dcecdf}.op-completion-note span{font-size:.7rem;font-weight:900;color:#238263;letter-spacing:.08em}.op-completion-note p{margin:4px 0 0;color:#5e6b65}.op-task-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.op-task-actions .primary-btn,.op-task-actions .secondary-btn{flex:1;justify-content:center}
@media(max-width:820px){.op-global-task-list{grid-template-columns:1fr}.op-global-metrics{grid-template-columns:1fr 1fr!important}.op-global-metrics>*:last-child{grid-column:1/-1}}
@media(max-width:640px){.op-self-card{flex-direction:column;align-items:stretch;padding:16px}.op-clock-state{justify-content:flex-start}.op-clock-state small{text-align:left;max-width:none}.op-clock-state .clock-btn{width:100%}.op-global-metrics,.op-task-summary{grid-template-columns:1fr!important}.op-global-metrics>*:last-child{grid-column:auto}.op-task-top{align-items:flex-start;flex-direction:column}.op-task-top small{text-align:left}.op-task-actions{align-items:stretch}.op-task-actions>*{flex:1 1 100%}.op-template-box>div{display:grid;grid-template-columns:1fr}.op-template-box .filter-chip{width:100%;text-align:left}}


/* SeniorCare V3.8.2 — navegación, turnos y pantallas operativas */
.bottom-nav.operational-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;overflow:hidden!important;width:100%!important;max-width:100%!important}
.bottom-nav.operational-nav .nav-item{min-width:0!important;width:100%!important;padding-left:4px!important;padding-right:4px!important}
.bottom-nav.operational-nav .nav-item>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.op-self-card,.op-task-card,.op-global-form,.op-task-summary,.op-global-task-list{max-width:100%;min-width:0}
.op-task-card p,.op-task-card strong,.op-task-card small{overflow-wrap:anywhere}
@media(max-width:520px){
 .bottom-nav.operational-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important}
 .bottom-nav.operational-nav .nav-item{font-size:.66rem!important;gap:3px!important}
 .bottom-nav.operational-nav .nav-icon{width:21px!important;height:21px!important}
 .op-self-card{align-items:stretch!important;flex-direction:column!important}
 .op-clock-state,.op-clock-state .clock-btn{width:100%!important}
 .op-task-summary{grid-template-columns:1fr 1fr!important}
 .op-task-summary article:last-child{grid-column:1/-1}
 .op-task-actions{width:100%!important}
 .op-task-actions .primary-btn,.op-task-actions .secondary-btn{width:100%!important;justify-content:center!important}
}

/* V3.8.2: evita duplicación visual de botones en navegación operativa */
.bottom-nav.operational-nav>[data-nav]{display:flex!important}
.bottom-nav.operational-nav>[data-nav] .nav-icon+span{display:block!important}

/* V4.0.2 acceso, privacidad operativa y responsive */
.remember-access{display:flex!important;align-items:center;gap:10px;font-weight:700;color:var(--ink)}
.remember-access input{width:18px!important;height:18px!important;flex:0 0 18px}
.auth-security-note{display:block;margin:-4px 0 4px;color:var(--muted);line-height:1.4}
.danger-outline-btn{border:1px solid #d64257;background:#fff;color:#b82139;border-radius:14px;padding:11px 15px;font-weight:850;cursor:pointer}
.danger-outline-btn:disabled{opacity:.55;cursor:wait}
html,body{max-width:100%;overflow-x:hidden}
.app-shell,.container,#mainContent{width:100%;max-width:100%;min-width:0}
.operational-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;overflow:hidden!important}
.operational-nav [data-nav]{min-width:0!important;width:auto!important;padding-left:4px!important;padding-right:4px!important}
.operational-nav [data-nav] span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.op-self-card,.op-global-metrics,.quick-grid,.op-task-summary,.op-global-task-list,.operational-task-list{min-width:0;max-width:100%}
.op-task-card,.admin-stat,.quick-card{min-width:0;overflow-wrap:anywhere;word-break:normal}
@media(max-width:760px){
  .container{padding-left:12px!important;padding-right:12px!important;padding-bottom:96px!important}
  .op-self-card{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
  .op-clock-state{width:100%!important;align-items:stretch!important}
  .op-clock-state .clock-btn{width:100%!important;justify-content:center!important}
  .op-global-metrics,.quick-grid,.op-task-summary{grid-template-columns:1fr!important}
  .op-global-form .form-grid{grid-template-columns:1fr!important}
  .op-task-top,.op-task-meta,.op-task-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .op-task-actions>*{flex:1 1 130px!important;min-width:0!important}
  .record-modal-actions{display:flex;flex-wrap:wrap;gap:10px}
  .record-modal-actions>*{flex:1 1 180px}
}

/* V4.0.5 - acciones del Centro de Alertas */
.global-alert-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.global-alert-head-actions .danger-action-btn{min-height:42px;padding:10px 16px;border-radius:14px}
@media (max-width:700px){.global-alert-panel-head{align-items:flex-start}.global-alert-head-actions{width:100%}.global-alert-head-actions button{flex:1 1 150px}}
/* V4.2.0 — módulo médico y actualización segura */
.medical-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.medical-summary-grid article{background:#fff;border:1px solid #e8e2f3;border-radius:18px;padding:18px;box-shadow:0 8px 24px rgba(49,31,83,.06)}.medical-summary-grid span{display:block;color:#746b82;font-size:.82rem}.medical-summary-grid strong{display:block;font-size:1.8rem;margin-top:6px}.medical-record-card{background:#fff;border:1px solid #e9e2f4;border-radius:16px;padding:16px;margin:10px 0}.medical-record-card div{display:grid;gap:6px}.medical-record-card span,.medical-record-card small,.medical-record-card p{color:#6f6878;margin:0}.medical-module-grid{margin-bottom:18px}
@media(max-width:760px){.medical-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.medical-summary-grid article{padding:14px}.medical-summary-grid strong{font-size:1.45rem}.medical-module-grid{grid-template-columns:1fr}.medical-record-card{overflow-wrap:anywhere}}
/* V4.3.0 — módulo médico premium y responsive */
/* V4.3.65 — cambio exclusivamente cromático: paleta médica azul, sin lógica ni estructura */
.med-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:26px;border-radius:24px;background:linear-gradient(135deg,#182c5e 0%,#2858a5 48%,#3989c8 100%);color:#fff;margin:18px 0;box-shadow:0 18px 45px rgba(24,44,94,.22)}
.med-hero span{font-size:11px;letter-spacing:.16em;font-weight:800;opacity:.8}.med-hero h2{margin:6px 0 4px;font-size:28px}.med-hero p{margin:0;opacity:.9}.med-hero-count{min-width:125px;text-align:center;padding:14px 18px;border-radius:18px;background:rgba(255,255,255,.14);backdrop-filter:blur(12px)}.med-hero-count b{display:block;font-size:34px}.med-hero-count small{opacity:.9}
.med-premium-form{border:1px solid #d9e6f3;box-shadow:0 14px 35px rgba(40,88,165,.08);background:linear-gradient(180deg,#fff,#fbfdff)}
.med-exam-builder{display:grid;gap:10px;padding:14px;border:1px solid #d7e4f1;border-radius:16px;background:#f6faff}.exam-row{display:grid;grid-template-columns:minmax(150px,.8fr) 150px 1.5fr;gap:10px;align-items:center}.exam-row strong{font-size:13px;color:#294f7c}.exam-row select,.exam-row input{width:100%}
.med-status{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;background:#eaf4ff;color:#355582;white-space:nowrap}.med-status.urgente,.med-status.requiere-seguimiento{background:#fff0ef;color:#a73a34}.med-status.completada,.med-status.revisado,.med-status.vigente{background:#e9f8f2;color:#157256}.med-status.leída,.med-status.en-ejecución{background:#fff7df;color:#8b6313}
.med-doc-toolbar{display:grid;grid-template-columns:1fr 240px;gap:12px;margin:18px 0}.med-doc-toolbar input,.med-doc-toolbar select{width:100%;padding:13px 14px;border:1px solid #d6e2ef;border-radius:12px;background:#fff}
@media(max-width:720px){.med-hero{align-items:flex-start;padding:20px;border-radius:18px}.med-hero h2{font-size:22px}.med-hero-count{min-width:90px;padding:10px}.exam-row{grid-template-columns:1fr}.med-doc-toolbar{grid-template-columns:1fr}.medical-record-card{align-items:flex-start}.medical-record-card .card-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}}

/* V4.3.6 panel médico esencial */
.doctor-essential-hero{margin:0 0 18px;padding:28px;border-radius:28px;background:linear-gradient(135deg,#182c5e 0%,#2858a5 48%,#3989c8 100%);color:#fff;box-shadow:0 18px 45px rgba(24,44,94,.20)}
.doctor-essential-hero span{font-size:12px;font-weight:800;letter-spacing:.18em;opacity:.85}.doctor-essential-hero h2{margin:8px 0 6px;font-size:32px}.doctor-essential-hero p{margin:0;max-width:680px;opacity:.9}
.doctor-essential-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.doctor-essential-card{width:100%;min-height:118px;border:1px solid #dce6f1;border-radius:22px;background:#fff;padding:20px;display:grid;grid-template-columns:54px 1fr auto;gap:14px;align-items:center;text-align:left;box-shadow:0 10px 30px rgba(40,88,165,.08);cursor:pointer}
.doctor-essential-card:hover{transform:translateY(-1px);box-shadow:0 14px 36px rgba(40,88,165,.13)}
.doctor-essential-card strong{display:block;font-size:18px;color:#17324d}.doctor-essential-card small{display:block;margin-top:5px;color:#64798a;line-height:1.35}.doctor-essential-card>b{font-size:28px;color:#2858a5}
.doctor-essential-icon{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#eaf4ff;color:#2858a5;font-weight:900}
@media(max-width:760px){.doctor-essential-grid{grid-template-columns:1fr}.doctor-essential-hero{padding:22px;border-radius:22px}.doctor-essential-hero h2{font-size:27px}.doctor-essential-card{min-height:104px;padding:16px;grid-template-columns:48px 1fr auto}.doctor-essential-icon{width:48px;height:48px}.doctor-essential-card strong{font-size:17px}}

/* V4.3.11 — formularios médicos fluidos, expansibles y responsive */
.med-premium-form textarea,.form-card textarea{display:block;width:100%!important;min-height:96px;height:auto;max-height:none;resize:none;overflow:hidden;line-height:1.55;box-sizing:border-box}
.med-exam-builder textarea{width:100%!important;min-height:82px!important;resize:none!important;overflow:hidden!important}
.medical-send-help{display:grid;gap:5px;margin:14px 0 18px;padding:15px 17px;border:1px solid #cfe0f2;border-radius:16px;background:#eef6ff;color:#244c7a}
.medical-send-help strong{font-size:15px}.medical-send-help span{font-size:13px;line-height:1.45;color:#58718f}
.medical-send-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-end!important}
.medical-send-actions .mini-btn{white-space:normal!important;min-height:40px!important;padding:9px 12px!important}
#medicalStudyForm4311 select,#medicalStudyForm4311 input,#medicalStudyForm4311 textarea{max-width:100%;min-width:0}
@media(max-width:760px){
 .med-premium-form,.form-card,.history-card,.medical-record-card,.med-exam-builder{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important}
 .med-premium-form .form-grid,.form-card .form-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important}
 .med-premium-form label,.form-card label,.med-premium-form fieldset,.form-card fieldset{min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important}
 .med-premium-form input,.med-premium-form select,.med-premium-form textarea,.form-card input,.form-card select,.form-card textarea{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
 .exam-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important;overflow:hidden!important}
 .medical-record-card{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 .medical-record-card>div{min-width:0!important;max-width:100%!important}
 .medical-send-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;justify-content:stretch!important}
 .medical-send-actions .mini-btn{width:100%!important;max-width:100%!important}
 .form-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important}
 .form-actions button{width:100%!important;max-width:100%!important}
}
/* V4.3.12 medical workflow */
.medical-patient-header{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:14px;border:1px solid #e3dcf2;border-radius:16px;background:#faf8ff}.medical-patient-header div{min-width:0}.medical-patient-header small{display:block;color:#786f86;font-size:.75rem}.medical-patient-header strong{display:block;overflow-wrap:anywhere}.emergency-card{border-left:5px solid #dc3545}.hidden{display:none!important}@media(max-width:720px){.medical-patient-header{grid-template-columns:1fr 1fr}.form-grid,.med-premium-form .form-grid{grid-template-columns:1fr!important}.form-card,.history-card,.medical-record-card{max-width:100%;overflow:hidden}textarea,input,select{max-width:100%;width:100%;box-sizing:border-box}body,.app-shell,#mainContent{overflow-x:hidden}}

/* V4.3.15 — ajuste visual de tarjetas médicas agregadas */
.medical-admin-card-v4315{
  margin-top:0 !important;
  min-height:78px !important;
}
.more-grid .medical-admin-card-v4315,
.module-grid .medical-admin-card-v4315{
  align-self:stretch;
}
.medical-orders-received .medical-record-card .card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
@media(max-width:760px){
  .medical-admin-card-v4315{width:100% !important;margin:0 !important;}
  .medical-orders-received .medical-record-card .card-actions{justify-content:flex-start;}
}


/* SeniorCare V4.3.19 — ajustes puntuales de Enfermería y archivo clínico */
.role-welcome.nurse-welcome.nurse-global-hero{
  background:linear-gradient(105deg,#4c1cc2 0%,#8548dc 58%,#d186c3 100%)!important;
  border:1px solid rgba(123,75,207,.28)!important;
  box-shadow:0 18px 38px rgba(91,39,176,.23)!important;
  color:#fff!important;
}
.role-welcome.nurse-welcome.nurse-global-hero .eyebrow{color:#f4e8ff!important}
.role-welcome.nurse-welcome.nurse-global-hero h2{color:#fff!important}
.role-welcome.nurse-welcome.nurse-global-hero p{color:#f7efff!important}
.role-welcome.nurse-welcome.nurse-global-hero .admin-mark{background:rgba(255,255,255,.14)!important;border:1px solid rgba(255,255,255,.08)!important;color:#fff!important}
.role-welcome.nurse-welcome.nurse-global-hero .admin-mark svg{stroke:#fff!important}
.nursing-note-v362{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.nursing-note-v362>div{min-width:0;flex:1}
.nursing-note-v362.is-archived{background:#faf8fc;border-color:#e5dced}
.note-archive-btn-v4319{flex:0 0 auto;align-self:center;min-width:92px}
.note-archived-status-v4319{flex:0 0 auto;align-self:flex-start}
.note-archive-meta-v4319{display:block;margin-top:9px;color:#786f84;font-size:.74rem}
.nursing-archive-v4319{margin-top:16px}
@media(max-width:620px){
  .nursing-note-v362{flex-direction:column}
  .note-archive-btn-v4319,.note-archived-status-v4319{width:100%;justify-content:center;text-align:center}
}

/* V4.3.24 — fichas administrativas editables y separación real de Licencias/Pagos */
.admin-profile-card-v4323,.supervisor-admin-list article[data-profile-v4323="1"]{display:grid!important;grid-template-columns:minmax(230px,1.2fr) auto minmax(360px,1.8fr);gap:16px!important;align-items:center!important;padding:20px!important;overflow:visible}
.admin-profile-identity-v4323{display:flex;align-items:center;gap:14px;min-width:0}
.admin-profile-identity-v4323>div{min-width:0}.admin-profile-identity-v4323 h3{font-size:1.1rem;overflow-wrap:anywhere}.admin-profile-identity-v4323 p{font-size:.82rem}
.admin-avatar-v4323{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,#5e27c7,#b45bdc);color:#fff;font-size:.96rem;font-weight:950;letter-spacing:.04em;box-shadow:0 9px 20px rgba(94,39,199,.2)}
.admin-avatar-v4323.large{width:62px;height:62px;border-radius:20px;font-size:1.15rem}
.admin-profile-meta-v4323{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;grid-column:1/-1}
.admin-profile-meta-v4323 span{padding:11px 12px;border:1px solid #eadff6;border-radius:14px;background:#fbf8ff;min-width:0}
.admin-profile-meta-v4323 small,.admin-profile-meta-v4323 strong{display:block}.admin-profile-meta-v4323 small{font-size:.67rem;color:#82778e;text-transform:uppercase;letter-spacing:.08em}.admin-profile-meta-v4323 strong{margin-top:4px;color:#30213e;font-size:.86rem;overflow-wrap:anywhere}
.admin-edit-btn-v4323{white-space:nowrap}.supervisor-admin-list article[data-profile-v4323="1"]>.status{justify-self:end}
.supervisor-admin-list article[data-profile-v4323="1"]>.admin-edit-btn-v4323,.supervisor-admin-list article[data-profile-v4323="1"]>[data-sg-admin],.supervisor-admin-list article[data-profile-v4323="1"]>.danger-action-btn{grid-row:3;margin:0}
.supervisor-admin-list article[data-profile-v4323="1"]>.admin-edit-btn-v4323{grid-column:1}.supervisor-admin-list article[data-profile-v4323="1"]>[data-sg-admin]{grid-column:2}.supervisor-admin-list article[data-profile-v4323="1"]>.danger-action-btn{grid-column:3;justify-self:end;width:auto!important}
.admin-modal-backdrop-v4323{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px;background:rgba(31,20,47,.58);backdrop-filter:blur(5px)}
.admin-modal-v4323{width:min(720px,100%);max-height:92vh;overflow:auto;background:#fff;border:1px solid #e5d8f4;border-radius:26px;padding:22px;box-shadow:0 26px 80px rgba(28,14,48,.3)}
.admin-modal-head-v4323{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.admin-modal-person-v4323{display:flex;gap:14px;align-items:center}.admin-modal-person-v4323 span:not(.admin-avatar-v4323){display:block;color:#7137cf;font-size:.68rem;font-weight:900;letter-spacing:.13em}.admin-modal-person-v4323 h3{margin:5px 0 2px;font-size:1.35rem;color:#2d213e}.admin-modal-person-v4323 p{margin:0;color:#7d7289}
.admin-modal-close-v4323{border:0;width:40px;height:40px;border-radius:13px;background:#f3edfb;color:#6730bd;font-size:1.5rem;cursor:pointer}
.admin-modal-summary-v4323{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.admin-modal-summary-v4323 span{padding:12px;border-radius:15px;background:#faf7fe;border:1px solid #ece2f6}.admin-modal-summary-v4323 small,.admin-modal-summary-v4323 strong{display:block}.admin-modal-summary-v4323 small{color:#82778e;font-size:.68rem;text-transform:uppercase;letter-spacing:.08em}.admin-modal-summary-v4323 strong{margin-top:5px;color:#30213e;font-size:.88rem;overflow-wrap:anywhere}.ok-text-v4323{color:#16785a!important}.danger-text-v4323{color:#bd2d4d!important}
.admin-profile-form-v4323{display:grid;grid-template-columns:1fr 1fr;gap:14px}.admin-profile-form-v4323 label{display:flex;flex-direction:column;gap:7px;color:#5d5269;font-size:.78rem;font-weight:800}.admin-profile-form-v4323 input{width:100%;border:1px solid #ddcfed;border-radius:14px;padding:12px 13px;background:#fff;color:#30213e}.admin-profile-form-v4323 input:focus{outline:2px solid rgba(113,55,207,.2);border-color:#8e5cda}.admin-readonly-v4323 input{background:#f7f4fa;color:#857b8e}.admin-modal-note-v4323{grid-column:1/-1;margin:0;padding:12px 14px;border-radius:14px;background:#f7f2ff;color:#675b74;font-size:.8rem;line-height:1.45}.admin-modal-actions-v4323{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
.commercial-tabs-v4323{display:flex;gap:8px;margin:14px 0;padding:6px;border:1px solid #e4d7f2;border-radius:18px;background:#fff;box-shadow:0 8px 22px rgba(70,38,106,.05)}.commercial-tabs-v4323 button{flex:1;border:0;border-radius:13px;padding:12px;background:transparent;color:#6b5e79;font-weight:900;cursor:pointer}.commercial-tabs-v4323 button.active{background:linear-gradient(135deg,#6327c9,#9a4cd5);color:#fff;box-shadow:0 8px 18px rgba(99,39,201,.2)}
.license-purpose-v4323{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;padding:16px 18px;border:1px solid #dceee7;border-radius:19px;background:linear-gradient(135deg,#f3fbf8,#fff)}.license-purpose-v4323 strong,.license-purpose-v4323 span{display:block}.license-purpose-v4323 strong{color:#216d58;font-size:1rem}.license-purpose-v4323 span{margin-top:4px;color:#6e7d77;font-size:.82rem}
.payment-summary-v4323{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:14px 0}.payment-summary-v4323 article{padding:18px;border:1px solid #e5d9f2;border-radius:20px;background:#fff;box-shadow:0 10px 26px rgba(70,38,106,.06)}.payment-summary-v4323 span,.payment-summary-v4323 small{display:block;color:#7d7288}.payment-summary-v4323 span{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em}.payment-summary-v4323 strong{display:block;margin:7px 0 3px;color:#5b27bb;font-size:1.6rem}
.payment-help-v4323{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px;padding:14px;border:1px solid #eadff6;border-radius:22px;background:#fbf8ff}.payment-help-v4323>div{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:16px;background:#fff}.payment-help-v4323 b{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#6d31c8;color:#fff}.payment-help-v4323 strong,.payment-help-v4323 small{display:block}.payment-help-v4323 strong{color:#342245}.payment-help-v4323 small{margin-top:3px;color:#7b7186;line-height:1.35}
.payment-grid-v4323{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.payment-card-v4323{padding:18px;border:1px solid #e5d9f2;border-left:5px solid #6e35c7;border-radius:21px;background:#fff;box-shadow:0 11px 28px rgba(70,38,106,.065)}.payment-card-head-v4323{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.payment-card-head-v4323 span:first-child{font-size:.67rem;letter-spacing:.12em;font-weight:900;color:#7137cf}.payment-card-head-v4323 h3{margin:5px 0 2px;color:#30213e}.payment-card-head-v4323 p{margin:0;color:#81768c;font-size:.82rem}.payment-amount-v4323{margin:15px 0;padding:14px;border-radius:16px;background:linear-gradient(135deg,#f4ecff,#fff)}.payment-amount-v4323 span{display:block;color:#7b7087;font-size:.75rem}.payment-amount-v4323 strong{display:block;margin-top:4px;color:#5a24b5;font-size:1.45rem}.payment-form-v4323{display:grid;grid-template-columns:1fr 1fr;gap:10px}.payment-form-v4323 label{font-size:.73rem;color:#756a80}.payment-form-v4323 input{width:100%;margin-top:5px;border:1px solid #dfd1ef;border-radius:12px;padding:10px}.payment-detail-v4323{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:11px}.payment-detail-v4323 span{padding:10px;border-radius:13px;background:#faf7fe}.payment-detail-v4323 small,.payment-detail-v4323 strong{display:block}.payment-detail-v4323 small{color:#81768c;font-size:.68rem}.payment-detail-v4323 strong{margin-top:4px;color:#30213e;font-size:.84rem}.payment-actions-v4323{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.payment-actions-v4323 button{flex:1}
@media(max-width:900px){.admin-profile-card-v4323,.supervisor-admin-list article[data-profile-v4323="1"]{grid-template-columns:1fr auto}.admin-profile-meta-v4323{grid-template-columns:1fr 1fr}.supervisor-admin-list article[data-profile-v4323="1"]>.admin-edit-btn-v4323,.supervisor-admin-list article[data-profile-v4323="1"]>[data-sg-admin],.supervisor-admin-list article[data-profile-v4323="1"]>.danger-action-btn{grid-row:auto;grid-column:auto;justify-self:stretch;width:100%!important}.payment-grid-v4323{grid-template-columns:1fr}}
@media(max-width:680px){.admin-profile-card-v4323,.supervisor-admin-list article[data-profile-v4323="1"]{grid-template-columns:1fr}.supervisor-admin-list article[data-profile-v4323="1"]>.status{justify-self:start}.admin-profile-meta-v4323,.admin-modal-summary-v4323,.admin-profile-form-v4323,.payment-summary-v4323,.payment-help-v4323,.payment-form-v4323,.payment-detail-v4323{grid-template-columns:1fr}.admin-modal-v4323{padding:17px;border-radius:22px}.admin-modal-actions-v4323{display:grid}.license-purpose-v4323{align-items:flex-start;flex-direction:column}.license-purpose-v4323 button{width:100%}.payment-actions-v4323{display:grid}.payment-actions-v4323 button{width:100%}}

/* Bernard Health SeniorCare V4.3.24 — contrato modular y pagos por módulos */
.module-panel-focus-v4324{animation:moduleFocusV4324 2.2s ease;scroll-margin-top:18px}
@keyframes moduleFocusV4324{0%,100%{box-shadow:0 0 0 0 rgba(112,45,210,0)}25%,75%{box-shadow:0 0 0 6px rgba(112,45,210,.18)}}
.module-contract-summary-v4324{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0;padding:14px;border:1px solid #e7dafb;border-radius:18px;background:linear-gradient(135deg,#fbf8ff,#f5efff)}
.module-contract-summary-v4324 span{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:14px;background:#fff}
.module-contract-summary-v4324 small{color:#746b83;font-weight:700}
.module-contract-summary-v4324 strong{font-size:1.08rem;color:#45208d}
.module-contract-note-v4324{margin:0 0 16px;padding:12px 14px;border-left:4px solid #7335d1;border-radius:12px;background:#f8f3ff;color:#554c63;line-height:1.45}
.module-contract-note-v4324 strong{color:#49208f}
.supervisor-module-grid [data-sg-module]{position:relative;transition:.18s ease}
.supervisor-module-grid [data-sg-module].contracted-v4324{border-color:#8c51df;background:linear-gradient(180deg,#fff,#faf6ff);box-shadow:0 8px 22px rgba(92,42,165,.09)}
.module-base-badge-v4324{display:inline-flex;align-items:center;justify-content:center;width:max-content;margin-top:8px;padding:5px 9px;border-radius:999px;background:#eee3ff;color:#5b25ae;font-size:.73rem;font-weight:800;letter-spacing:.02em}
.module-actions-v4324{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.module-contract-strip-v4324{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0;padding:12px 14px;border:1px solid #e6d9fb;border-radius:16px;background:#fbf8ff}
.module-contract-strip-v4324>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.module-contract-strip-v4324 span{font-size:.69rem;font-weight:900;letter-spacing:.14em;color:#7130c5}
.module-contract-strip-v4324 strong{color:#342342}
.module-contract-strip-v4324 small{color:#756d7e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:650px}
.admin-contract-v4324{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;margin-top:12px;padding:13px 14px;border:1px solid #e5d8fa;border-radius:16px;background:#fbf8ff}
.admin-contract-v4324>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.admin-contract-v4324 small{color:#756b82;font-weight:700}
.admin-contract-v4324 strong{color:#45208d}
.admin-contract-v4324 span{font-size:.82rem;color:#756d7e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:680px}
.admin-code-expiry-note-v4324{margin:0 0 14px;padding:12px 14px;border-radius:14px;background:#f7f1ff;border:1px solid #e3d2fb;color:#5f5669;line-height:1.45}
.admin-code-expiry-note-v4324 strong{color:#4b218d}
.admin-modal-contract-v4324{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;margin:0 22px 18px;padding:16px;border:1px solid #e4d6fa;border-radius:17px;background:linear-gradient(135deg,#fbf8ff,#f3ebff)}
.admin-modal-contract-v4324>div{display:flex;flex-direction:column;gap:5px}
.admin-modal-contract-v4324 span{font-size:.7rem;letter-spacing:.13em;font-weight:900;color:#7431c6}
.admin-modal-contract-v4324 h4{margin:0;color:#342342;font-size:1.05rem}
.admin-modal-contract-v4324 p{margin:0;color:#746c7d;line-height:1.4}
.admin-modal-contract-v4324 small{color:#746c7d;font-weight:700}
.admin-modal-contract-v4324>div:last-child{align-items:flex-end}
.admin-modal-contract-v4324>div:last-child strong{font-size:1.2rem;color:#4a218f}
.module-pricing-rule-v4324{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 18px;padding:15px 17px;border-radius:17px;border:1px solid #e4d6fa;background:linear-gradient(135deg,#fbf8ff,#f2eaff)}
.module-pricing-rule-v4324>div{display:flex;flex-direction:column;gap:4px}
.module-pricing-rule-v4324 strong{color:#46208c}
.module-pricing-rule-v4324 span{color:#6e6577}
.payment-modular-card-v4324{gap:13px}
.payment-amount-v4323 small{display:block;margin-top:3px;color:#746c7d;font-weight:700}
.module-payment-list-v4324{display:grid;gap:7px;padding:12px;border-radius:14px;background:#faf7ff;border:1px solid #eadffb}
.module-payment-list-v4324>span{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;border-radius:10px;background:#fff}
.module-payment-list-v4324 b{color:#43384e;font-size:.88rem}
.module-payment-list-v4324 strong{color:#5d28ad;font-size:.9rem}
.payment-sync-warning-v4324{padding:10px 12px;border-radius:12px;background:#fff8e7;border:1px solid #f1ddb0;color:#79622a;font-size:.84rem;line-height:1.4}
.payment-form-v4323.single-v4324{grid-template-columns:minmax(220px,360px)}
.empty-state.compact-v4324{padding:10px 8px;min-height:0}
@media(max-width:760px){
 .module-contract-summary-v4324{grid-template-columns:1fr}
 .module-contract-strip-v4324,.admin-contract-v4324,.module-pricing-rule-v4324{align-items:stretch;flex-direction:column}
 .module-contract-strip-v4324 small,.admin-contract-v4324 span{max-width:100%;white-space:normal}
 .admin-modal-contract-v4324{grid-template-columns:1fr;margin:0 14px 16px}
 .admin-modal-contract-v4324>div:last-child{align-items:flex-start}
 .module-actions-v4324{justify-content:stretch}
 .module-actions-v4324 button{width:100%}
}
.license-summary-v4324{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.license-summary-v4324 article{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid #e6d9fa;border-radius:17px;background:#fff}
.license-summary-v4324 span{color:#746b7e;font-weight:800}
.license-summary-v4324 strong{font-size:1.55rem;color:#49208f}
.license-summary-v4324 small{color:#857d8e}
.license-grid-v4324{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:16px}
.license-card-v4324{display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid #e6d9fa;border-radius:20px;background:#fff;box-shadow:0 12px 28px rgba(53,26,92,.06)}
.license-card-head-v4324{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.license-card-head-v4324 span:first-child{font-size:.7rem;letter-spacing:.13em;font-weight:900;color:#7431c6}
.license-card-head-v4324 h3{margin:3px 0;color:#31253e}
.license-card-head-v4324 p{margin:0;color:#776f80}
.license-data-v4324{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.license-data-v4324 span{display:flex;flex-direction:column;gap:3px;padding:11px;border-radius:13px;background:#f9f6fd}
.license-data-v4324 small{color:#7c7485;font-weight:700}
.license-data-v4324 strong{color:#44364f}
.license-module-tags-v4324{display:flex;flex-wrap:wrap;gap:7px}
.license-module-tags-v4324 span{padding:6px 9px;border-radius:999px;background:#eee3ff;color:#5b25ad;font-size:.78rem;font-weight:800}
.license-module-tags-v4324 .empty-tag-v4324{background:#f3f0f5;color:#7b7381}
.license-reason-v4324{margin:0;padding:10px 12px;border-radius:12px;background:#fff0f2;color:#a23b4b}
.license-actions-v4324{display:flex;gap:9px;flex-wrap:wrap;margin-top:auto}
@media(max-width:760px){.license-summary-v4324{grid-template-columns:1fr}.license-grid-v4324{grid-template-columns:1fr}.license-data-v4324{grid-template-columns:1fr}.license-actions-v4324 button{width:100%}}

/* V4.3.25 — historial financiero y seguridad */
.payment-history-v4325{margin:22px 0 100px;padding:22px;border:1px solid #e4d7f7;border-radius:24px;background:#fff;box-shadow:0 10px 30px rgba(63,32,103,.07)}
.payment-history-head-v4325{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:16px}
.payment-history-head-v4325 span{font-size:.72rem;letter-spacing:.16em;font-weight:900;color:#7436d3}
.payment-history-head-v4325 h2{margin:4px 0;font-size:1.35rem;color:#2d2338}
.payment-history-head-v4325 p{margin:0;color:#756b82}
.payment-history-head-v4325>strong{display:grid;place-items:center;min-width:46px;height:46px;border-radius:15px;background:#f1e9ff;color:#6728c7;font-size:1.1rem}
.payment-history-list-v4325{display:grid;gap:10px}
.payment-history-list-v4325 article{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:15px 17px;border:1px solid #eee6f8;border-radius:17px;background:#fcfbfe}
.payment-history-list-v4325 article h3{margin:2px 0 3px;font-size:1rem;color:#30263c}
.payment-history-list-v4325 article p,.payment-history-list-v4325 article small{margin:0;color:#7c7188;font-size:.82rem}
.payment-history-list-v4325 article>div:last-child{text-align:right}.payment-history-list-v4325 article>div:last-child strong{display:block;color:#5f24be;font-size:1.08rem;margin-bottom:3px}
@media(max-width:620px){.payment-history-head-v4325,.payment-history-list-v4325 article{align-items:flex-start}.payment-history-list-v4325 article{flex-direction:column}.payment-history-list-v4325 article>div:last-child{text-align:left}}

/* ===== V4.3.26 · Alertas de medicación (Enfermería) ===== */
.med-alert-setup-warning{margin:0 0 18px;padding:15px 18px;border:1px solid #f2c66d;background:#fff8e8;border-radius:18px;display:flex;flex-direction:column;gap:4px;color:#6d4b09}.med-alert-setup-warning strong{font-size:15px}.med-alert-setup-warning span{font-size:13px;line-height:1.45}
.med-alert-control{margin:0 0 18px;padding:20px;border-radius:24px;background:linear-gradient(135deg,#5b2ab4,#8649de);color:#fff;display:flex;justify-content:space-between;align-items:center;gap:18px;box-shadow:0 16px 34px rgba(91,42,180,.2)}.med-alert-control.denied{background:linear-gradient(135deg,#8b3748,#c15b71)}.med-alert-control.enabled{background:linear-gradient(135deg,#45249a,#7137cf)}.med-alert-control-copy span,.med-section-head span{font-size:11px;font-weight:800;letter-spacing:.12em}.med-alert-control-copy h3{margin:5px 0 6px;font-size:21px}.med-alert-control-copy p{margin:0;max-width:720px;opacity:.9;line-height:1.45}.med-alert-control-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.med-alert-control .primary-btn{background:#fff;color:#5828ad}.med-alert-control .secondary-btn{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.4)}
.med-dose-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.med-dose-summary article{background:#fff;border:1px solid #ebe7f4;border-radius:20px;padding:17px;box-shadow:0 8px 20px rgba(45,33,79,.06);display:flex;flex-direction:column;gap:3px}.med-dose-summary span{font-size:12px;font-weight:800;color:#655d74}.med-dose-summary strong{font-size:30px;line-height:1;color:#2d2440}.med-dose-summary small{font-size:11px;color:#81788f}.med-dose-summary .overdue{border-left:5px solid #d84b60}.med-dose-summary .due{border-left:5px solid #ef9f31}.med-dose-summary .upcoming{border-left:5px solid #6d5bd0}.med-dose-summary .completed{border-left:5px solid #3caa78}
.med-dose-section,.med-schedules-section{background:#fff;border:1px solid #ebe7f4;border-radius:24px;padding:20px;margin-bottom:20px;box-shadow:0 10px 28px rgba(45,33,79,.06)}.med-section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.med-section-head h2{margin:4px 0;font-size:22px;color:#2d2440}.med-section-head p{margin:0;color:#766e83;font-size:13px}.med-dose-list{display:flex;flex-direction:column;gap:10px}
.med-dose-card{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:15px;align-items:center;padding:15px;border:1px solid #ece8f2;border-radius:18px;background:#fcfbfe;transition:.2s}.med-dose-card.overdue{border-color:#ef9aa8;background:#fff5f7}.med-dose-card.due{border-color:#f0c274;background:#fffaf0}.med-dose-card.soon{border-color:#b8a9ed;background:#f9f7ff}.med-dose-card.administered{border-color:#b8e1ce;background:#f4fbf7}.med-dose-card.not-administered{border-color:#d4cedc;background:#f7f5f8}.med-dose-time{display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:15px;background:#f0ebfa;padding:10px;min-height:62px}.med-dose-time strong{font-size:22px;color:#4e2b93}.med-dose-time span{font-size:10px;text-align:center;font-weight:800;color:#716581}.med-dose-copy span{font-size:11px;color:#6f6380;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.med-dose-copy h3{margin:3px 0;font-size:17px;color:#2e2540}.med-dose-copy p{margin:0;color:#6f6878;font-size:13px}.med-dose-copy small{display:block;margin-top:5px;color:#4d896b;font-size:11px}.med-dose-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.dose-action{border:0;border-radius:11px;padding:9px 11px;font-weight:800;font-size:11px;cursor:pointer}.dose-action.administered{background:#dff4e8;color:#176c45}.dose-action.snooze{background:#fff0d7;color:#8b5708}.dose-action.missed{background:#f5e4e7;color:#9a3346}.focused-dose-v4326{outline:4px solid rgba(113,55,207,.18);transform:scale(1.01)}
.med-schedule-form-v4326{margin:0 0 16px}.med-reminder-toggle{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;padding:13px 14px;background:#f7f3ff;border-radius:14px}.med-reminder-toggle input{width:20px!important;height:20px}.med-reminder-toggle span{font-weight:800;color:#4f367d}.med-schedule-row-v4326 small{display:block;margin-top:4px;color:#7a7186}
.med-home-widget-v4326{margin:14px 0 18px}.med-home-widget-v4326 button{width:100%;border:1px solid #d9ccef;background:linear-gradient(135deg,#faf8ff,#f0e9ff);border-radius:20px;padding:17px 19px;display:flex;justify-content:space-between;align-items:center;text-align:left;color:#3a275d;cursor:pointer}.med-home-widget-v4326.attention button{border-color:#edb176;background:linear-gradient(135deg,#fff9ef,#fff0dd)}.med-home-widget-v4326 span{font-size:10px;font-weight:900;letter-spacing:.1em}.med-home-widget-v4326 h3{font-size:19px;margin:3px 0}.med-home-widget-v4326 p{margin:0;font-size:12px;color:#766986}.med-home-widget-v4326 strong{font-size:13px}
.medication-alarm-overlay-v4326{position:fixed;inset:0;z-index:99999;background:rgba(26,18,42,.76);backdrop-filter:blur(8px);display:grid;place-items:center;padding:18px}.medication-alarm-card-v4326{width:min(520px,100%);background:#fff;border-radius:28px;padding:28px;text-align:center;box-shadow:0 28px 90px rgba(0,0,0,.35);animation:bhscAlarmPulse 1.4s ease-in-out infinite}.medication-alarm-icon-v4326{width:74px;height:74px;border-radius:50%;margin:0 auto 12px;background:#f3e9ff;color:#7137cf;display:grid;place-items:center}.medication-alarm-icon-v4326 svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:2}.medication-alarm-card-v4326>span{font-size:11px;font-weight:900;letter-spacing:.14em;color:#8a4c13}.medication-alarm-card-v4326 h2{font-size:25px;margin:7px 0 2px;color:#332748}.medication-alarm-card-v4326 h3{font-size:20px;margin:0 0 7px;color:#7137cf}.medication-alarm-card-v4326 p{color:#696172;margin:0}.medication-alarm-actions-v4326{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:22px}.medication-alarm-actions-v4326 button{border:0;border-radius:14px;padding:13px 10px;font-weight:900;cursor:pointer}.medication-alarm-actions-v4326 button:first-child{grid-column:1/-1;background:#287a55;color:#fff}.medication-alarm-actions-v4326 button:nth-child(2){background:#f4dfb9;color:#704708}.medication-alarm-actions-v4326 button:nth-child(3){background:#eed9de;color:#8d2e42}@keyframes bhscAlarmPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.015)}}
@media(max-width:900px){.med-dose-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.med-alert-control{align-items:flex-start;flex-direction:column}.med-alert-control-actions{justify-content:flex-start}.med-dose-card{grid-template-columns:86px 1fr}.med-dose-actions{grid-column:1/-1;justify-content:stretch}.dose-action{flex:1}.med-section-head{align-items:flex-start;flex-direction:column}}
@media(max-width:520px){.med-dose-summary{gap:8px}.med-dose-summary article{padding:13px}.med-dose-summary strong{font-size:25px}.med-dose-section,.med-schedules-section{padding:14px;border-radius:18px}.med-dose-card{grid-template-columns:72px minmax(0,1fr);padding:12px;gap:10px}.med-dose-time strong{font-size:18px}.med-alert-control{padding:17px;border-radius:20px}.med-alert-control-actions{width:100%}.med-alert-control-actions button{width:100%}.medication-alarm-card-v4326{padding:22px 16px}}


/* V4.3.28 — facturación fija y corrección de contrato modular */
.module-fixed-price-note-v4328{display:inline-flex;align-items:center;min-height:42px;padding:0 14px;border-radius:14px;background:#f4edff;color:#5b25ae;font-weight:800;font-size:.86rem}
.supervisor-module-panel .sg-price[readonly]{background:#f8f6fb;color:#332744;cursor:not-allowed;font-weight:800}
@media(max-width:720px){.module-fixed-price-note-v4328{width:100%;justify-content:center;text-align:center}}

/* V4.3.30 — historial financiero único y total acumulado */
.payment-history-total-v4329{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:-2px 0 14px;padding:13px 16px;border-radius:15px;background:linear-gradient(135deg,#f5efff,#fff);border:1px solid #eadff8}
.payment-history-total-v4329 span{color:#746a80;font-size:.82rem;font-weight:700}
.payment-history-total-v4329 strong{color:#5f24be;font-size:1.12rem}
@media(max-width:620px){.payment-history-total-v4329{align-items:flex-start;flex-direction:column;gap:4px}}

/* V4.3.30 — precios modulares editables e historial con desglose */
.supervisor-module-panel .sg-price:not([readonly]){background:#fff;color:#332744;cursor:text;font-weight:800}
.supervisor-module-panel .sg-price:not([readonly]):focus{border-color:#7a3bd4;box-shadow:0 0 0 3px rgba(122,59,212,.12);outline:none}
.payment-history-breakdown-v4330{display:block;margin-top:5px;color:#5f5470;font-size:.78rem;font-weight:700}


/* V4.3.31 — historial financiero administrable y módulos sin leyenda redundante */
.supervisor-module-panel .module-base-badge-v4324{display:none!important}
.payment-history-card-v4331{position:relative}
.payment-history-copy-v4331{min-width:0;flex:1}
.payment-history-side-v4331{display:flex!important;flex-direction:column;align-items:flex-end;gap:4px;min-width:190px;text-align:right}
.payment-history-actions-v4331{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-top:8px}
.payment-history-actions-v4331 .mini-btn{padding:7px 11px;min-height:34px}
.payment-history-delete-v4331{background:#fff0f2!important;color:#a73449!important;border-color:#f2c8d0!important}
.payment-history-card-v4331.is-archived{background:#faf8fc;opacity:.84}
.payment-history-more-v4331{display:flex;margin:14px auto 0;justify-content:center}
.payment-history-archive-v4331{margin-top:18px;border:1px solid #e8def2;border-radius:18px;background:#fbf9fd;padding:0 14px 14px}
.payment-history-archive-v4331>summary{cursor:pointer;padding:15px 2px;font-weight:850;color:#5f2abc}
.payment-history-archive-v4331[open]>summary{margin-bottom:4px}
@media(max-width:620px){.payment-history-side-v4331{align-items:flex-start;min-width:0;text-align:left;width:100%}.payment-history-actions-v4331{justify-content:flex-start;width:100%}.payment-history-actions-v4331 .mini-btn{flex:1}.payment-history-more-v4331{width:100%}}

/* V4.3.34 — edición de información general del residente */
.resident-profile-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:auto}
.resident-edit-btn{min-height:44px;white-space:nowrap}
@media(max-width:720px){.profile-hero .resident-profile-actions{width:100%;margin-left:0}.resident-profile-actions>button{flex:1 1 180px}}

/* V4.3.45 — restauración del botón original de administración */
.med-schedule-row-v4326 .card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.med-schedule-row-v4326 .card-actions .mini-btn,.med-schedule-row-v4326 .card-actions .icon-delete{min-height:36px}
.med-admin-green-v4345{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;padding:8px 14px!important;min-height:36px;border-radius:12px!important;border:1px solid #2fbe7a!important;background:linear-gradient(180deg,#42cc8a 0%,#27a565 100%)!important;color:#fff!important;font-weight:850!important;font-size:.76rem!important;letter-spacing:.01em;box-shadow:0 8px 18px rgba(39,165,101,.20)!important;transition:transform .15s ease,box-shadow .18s ease,filter .18s ease}
.med-admin-green-v4345::before{content:'✓';font-weight:900;font-size:.84rem;line-height:1}
.med-admin-green-v4345:hover{background:linear-gradient(180deg,#39c282 0%,#21965b 100%)!important;border-color:#21965b!important;box-shadow:0 10px 22px rgba(33,150,91,.24)!important;transform:translateY(-1px)}
.med-admin-green-v4345:active{transform:translateY(0)!important;box-shadow:0 5px 12px rgba(33,150,91,.18)!important}
.med-admin-green-v4345:focus-visible{outline:3px solid rgba(72,196,131,.22);outline-offset:2px}
.status-completed-v4345{display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:7px 12px!important;border-radius:12px!important;background:#e8f8ee!important;color:#18714a!important;border:1px solid #bfe6ce!important;font-weight:850!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.65)}
.status-pending-v4345{display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:7px 12px!important;border-radius:12px!important;background:#fff5dd!important;color:#9a6508!important;border:1px solid #efd9a1!important;font-weight:850!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6)}

/* V4.3.47: hora de dosis en una sola línea */
.med-dose-time strong{white-space:nowrap;word-break:normal;line-height:1.05;font-size:20px}
.med-dose-time{min-width:118px}
@media(max-width:900px){.med-dose-time{min-width:0;width:100%}.med-dose-time strong{font-size:18px}}

/* V4.3.48 — presentación móvil profesional del módulo de medicación */
@media (max-width:640px){
  .med-dose-section,.med-schedules-section{
    padding:16px!important;
    border-radius:22px!important;
    box-shadow:0 12px 30px rgba(49,32,82,.07)!important;
  }
  .med-dose-section .med-section-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:12px!important;
  }
  .med-dose-section .med-section-head .secondary-btn{
    width:auto!important;
    min-width:108px;
    padding:10px 14px!important;
  }
  .med-schedules-section .med-section-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:14px!important;
  }
  .med-schedules-section .med-section-head .primary-btn{
    width:100%!important;
    justify-content:center!important;
  }

  .med-dose-card{
    grid-template-columns:96px minmax(0,1fr)!important;
    gap:14px!important;
    padding:15px!important;
    border-radius:20px!important;
  }
  .med-dose-time{
    min-width:96px!important;
    min-height:78px!important;
    padding:11px 8px!important;
    border-radius:16px!important;
  }
  .med-dose-time strong{
    font-size:19px!important;
    line-height:1.05!important;
    white-space:nowrap!important;
  }
  .med-dose-time span{
    margin-top:6px!important;
    font-size:10px!important;
    line-height:1.15!important;
  }
  .med-dose-copy h3{
    font-size:18px!important;
    line-height:1.15!important;
  }
  .med-dose-copy p{
    line-height:1.35!important;
  }

  .med-schedule-row-v4326{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-areas:
      "time main status"
      "actions actions actions"!important;
    align-items:start!important;
    gap:12px 14px!important;
    padding:16px!important;
    border-radius:21px!important;
    box-shadow:0 10px 25px rgba(57,35,88,.065)!important;
    overflow:hidden!important;
  }
  .med-schedule-row-v4326 .time-badge{
    grid-area:time!important;
    min-width:82px!important;
    padding:10px 11px!important;
    border-radius:14px!important;
    white-space:nowrap!important;
    font-size:.9rem!important;
    line-height:1!important;
  }
  .med-schedule-row-v4326 .row-main{
    grid-area:main!important;
    min-width:0!important;
  }
  .med-schedule-row-v4326 .row-main strong{
    font-size:1.02rem!important;
    line-height:1.18!important;
    color:#2d2440!important;
  }
  .med-schedule-row-v4326 .row-main span{
    margin-top:5px!important;
    font-size:.88rem!important;
    line-height:1.4!important;
    overflow-wrap:anywhere!important;
  }
  .med-schedule-row-v4326 .row-main small{
    margin-top:7px!important;
    font-size:.76rem!important;
    line-height:1.38!important;
    overflow-wrap:anywhere!important;
  }
  .med-schedule-row-v4326>.status-pill{
    grid-area:status!important;
    align-self:start!important;
    justify-self:end!important;
    min-height:34px!important;
    padding:7px 11px!important;
    border-radius:12px!important;
    white-space:nowrap!important;
    font-size:.73rem!important;
  }
  .med-schedule-row-v4326 .card-actions{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    width:100%!important;
    padding-top:12px!important;
    margin-top:2px!important;
    border-top:1px solid #eee8f5!important;
  }
  .med-schedule-row-v4326 .card-actions .med-admin-green-v4345,
  .med-schedule-row-v4326 .card-actions .mini-btn{
    flex:1 1 0!important;
    min-width:0!important;
    min-height:42px!important;
    padding:10px 13px!important;
    border-radius:13px!important;
    font-size:.82rem!important;
  }
  .med-schedule-row-v4326 .card-actions .icon-delete{
    flex:0 0 44px!important;
    width:44px!important;
    height:42px!important;
    min-height:42px!important;
    border-radius:13px!important;
    margin:0!important;
  }
}

@media (max-width:420px){
  .med-schedule-row-v4326{
    grid-template-columns:74px minmax(0,1fr)!important;
    grid-template-areas:
      "time status"
      "main main"
      "actions actions"!important;
  }
  .med-schedule-row-v4326 .time-badge{
    min-width:74px!important;
    justify-self:start!important;
  }
  .med-schedule-row-v4326>.status-pill{
    justify-self:end!important;
  }
  .med-schedule-row-v4326 .row-main{
    padding-top:2px!important;
  }
}

/* V4.3.50 — tratamientos informativos; administración únicamente desde Dosis del día */
.status-neutral-v4350{display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:7px 12px!important;border-radius:12px!important;background:#f3eff8!important;color:#746a7e!important;border:1px solid #e2d9ea!important;font-weight:850!important}
.status-not-administered-v4350{display:inline-flex!important;align-items:center;justify-content:center;min-height:34px;padding:7px 12px!important;border-radius:12px!important;background:#fae9ec!important;color:#9c3c50!important;border:1px solid #efc7d0!important;font-weight:850!important}
@media(max-width:760px){.med-schedule-row-v4326 .status-pill{justify-self:end}.med-schedule-row-v4326 .card-actions{grid-column:1/-1;display:grid!important;grid-template-columns:1fr auto;gap:9px;width:100%}.med-schedule-row-v4326 .card-actions .mini-btn{width:100%;min-height:42px}.med-schedule-row-v4326 .card-actions .icon-delete{width:48px;min-height:42px}}

/* V4.3.51 — estabilidad de medicación */
.treatment-dose-summary-v4351{white-space:nowrap;max-width:260px;text-align:center;line-height:1.15}
.status-mixed-v4351{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 12px;border-radius:12px;background:#eef7ff;color:#315f8b;border:1px solid #c9e0f3;font-weight:850}
.medication-alarm-overlay-v4326 [aria-busy="true"]{opacity:.72;cursor:wait}
@media(max-width:760px){.treatment-dose-summary-v4351{white-space:normal;max-width:none;width:100%;font-size:.72rem}.med-schedule-row-v4326>.status-pill{grid-column:2/-1;justify-self:start}}

/* V4.3.53 · selección múltiple de exámenes e imágenes */
.medical-study-selector-v4353{border:1px solid var(--line);border-radius:18px;padding:16px;background:#fcfbfe}
.medical-study-selector-v4353 legend{padding:0 8px;font-weight:900;color:var(--purple-dark)}
.medical-study-selector-v4353>p{margin:0 0 12px;color:var(--muted);font-size:.8rem}
.medical-study-grid-v4353{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.medical-study-option-v4353{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;border:1px solid #e6dcef;border-radius:14px;padding:11px 12px;background:#fff;cursor:pointer;transition:.16s ease}
.medical-study-option-v4353:hover{border-color:#cbb3e8;box-shadow:0 7px 18px rgba(78,43,147,.07)}
.medical-study-option-v4353 input{width:19px;height:19px;accent-color:var(--purple);margin:0}
.medical-study-option-v4353 span{display:block;min-width:0}
.medical-study-option-v4353 b,.medical-study-option-v4353 small{display:block}
.medical-study-option-v4353 b{color:var(--ink);font-size:.84rem;line-height:1.25}
.medical-study-option-v4353 small{color:var(--muted);font-size:.68rem;margin-top:3px}
.medical-study-option-v4353:has(input:checked){border-color:#9f73da;background:#f6f0ff;box-shadow:0 7px 18px rgba(78,43,147,.09)}
@media(max-width:700px){.medical-study-grid-v4353{grid-template-columns:1fr}.medical-study-selector-v4353{padding:13px}.medical-study-option-v4353{padding:12px}}

/* V4.3.67 — Tarjeta premium exclusiva del panel médico principal */
.doctor-dashboard-premium{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:22px;align-items:center;overflow:hidden;isolation:isolate;min-height:235px;padding:30px 32px!important;box-shadow:0 24px 58px rgba(24,44,94,.24)!important}
.doctor-dashboard-copy{position:relative;z-index:2;min-width:0}
.doctor-dashboard-eyebrow{display:block;font-size:11px!important;letter-spacing:.2em!important;opacity:.82!important}
.doctor-dashboard-premium h2{max-width:720px;margin:10px 0 10px!important;font-size:clamp(30px,4.2vw,46px)!important;line-height:1.05;letter-spacing:-.035em}
.doctor-dashboard-premium p{max-width:650px;font-size:15px;line-height:1.5}
.doctor-dashboard-date{width:max-content;max-width:100%;display:flex;align-items:center;gap:8px;margin-top:18px;border:1px solid rgba(255,255,255,.2);border-radius:13px;padding:8px 11px;background:rgba(255,255,255,.11);color:rgba(255,255,255,.92);font-size:11px;font-weight:800;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.doctor-dashboard-date>span{font-size:14px!important;letter-spacing:0!important;opacity:.95!important}
.doctor-dashboard-mark{position:relative;z-index:2;width:104px;height:104px;border-radius:30px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(255,255,255,.24),rgba(255,255,255,.09));box-shadow:inset 0 1px 0 rgba(255,255,255,.23),0 18px 36px rgba(9,26,66,.2);color:#fff}
.doctor-dashboard-mark svg{width:54px;height:54px}
.doctor-dashboard-orb{position:absolute;z-index:-1;display:block;border-radius:999px;pointer-events:none;border:1px solid rgba(255,255,255,.12)}
.doctor-dashboard-orb.one{width:245px;height:245px;right:-60px;bottom:-125px;background:rgba(255,255,255,.06)}
.doctor-dashboard-orb.two{width:105px;height:105px;right:130px;top:32px;background:rgba(255,255,255,.035)}
@media(max-width:760px){
 .doctor-dashboard-premium{grid-template-columns:minmax(0,1fr) 72px;gap:14px;min-height:0;padding:24px 22px 26px!important;border-radius:24px!important}
 .doctor-dashboard-premium h2{font-size:clamp(28px,8.2vw,36px)!important;line-height:1.06}
 .doctor-dashboard-premium p{font-size:14px;line-height:1.45}
 .doctor-dashboard-mark{width:72px;height:72px;border-radius:22px}
 .doctor-dashboard-mark svg{width:38px;height:38px}
 .doctor-dashboard-date{font-size:10px;margin-top:15px;padding:7px 9px}
}
@media(max-width:390px){
 .doctor-dashboard-premium{grid-template-columns:minmax(0,1fr) 62px;padding-left:18px!important;padding-right:18px!important}
 .doctor-dashboard-mark{width:62px;height:62px;border-radius:19px}
 .doctor-dashboard-date{width:100%;box-sizing:border-box}
}


/* V4.3.68 — eliminación visible y tipografía ampliada, limitada a Personal y Residentes */
.entity-delete-btn-v4368,.resident-delete-btn-v4368{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  font-size:.94rem;
  line-height:1.2;
  white-space:nowrap;
}
.entity-delete-btn-v4368:disabled,.resident-delete-btn-v4368:disabled{opacity:.58;cursor:wait}
.global-staff-dashboard span,.global-staff-dashboard small{font-size:.86rem}
.global-staff-card .staff-name strong{font-size:1.08rem}
.global-staff-card .staff-name span{font-size:.9rem}
.global-staff-card .staff-card-pro-body span{font-size:.79rem}
.global-staff-card .staff-card-pro-body strong{font-size:.96rem}
.global-staff-card .attendance-log span{font-size:.79rem}
.global-staff-card .attendance-log strong{font-size:.92rem}
.global-staff-card .staff-card-pro-actions button{font-size:.9rem;min-height:44px}
.professional-resident-card .resident-card-copy strong{font-size:1.08rem}
.professional-resident-card .resident-card-copy span{font-size:.92rem}
.professional-resident-card .resident-card-copy small{font-size:.84rem;line-height:1.4}
.profile-hero .profile-main-copy h3{font-size:1.38rem}
.profile-hero .profile-main-copy p{font-size:.98rem}
.profile-hero + .info-grid article span{font-size:.82rem}
.profile-hero + .info-grid article strong{font-size:1rem}
@media(max-width:640px){
  .professional-resident-card .resident-card-copy strong{font-size:1.02rem}
  .professional-resident-card .resident-card-copy span{font-size:.88rem}
  .professional-resident-card .resident-card-copy small{font-size:.8rem}
  .global-staff-card .staff-name strong{font-size:1.03rem}
  .global-staff-card .staff-name span{font-size:.86rem}
  .global-staff-card .staff-card-pro-body strong{font-size:.94rem}
  .global-staff-card .staff-card-pro-actions{grid-template-columns:1fr 1fr}
  .global-staff-card .staff-card-pro-actions .entity-delete-btn-v4368{width:100%}
  .resident-profile-actions .resident-delete-btn-v4368{flex:1 1 180px}
}

/* Bernard Health SeniorCare Enterprise V4.3.70
   Tipografía móvil optimizada exclusivamente para las pantallas principales.
   No modifica estructura, navegación, eventos, formularios ni módulos internos. */
@media (max-width:640px){
  .admin-welcome .eyebrow{
    font-size:12px!important;
    line-height:1.3!important;
    letter-spacing:.145em!important;
  }
  .admin-welcome h2{
    font-size:28px!important;
    line-height:1.12!important;
    letter-spacing:-.025em!important;
  }
  .admin-welcome p{
    font-size:15px!important;
    line-height:1.5!important;
  }
  .quick-heading{
    padding:12px 15px!important;
    border-radius:18px!important;
  }
  .quick-heading h2{
    font-size:20px!important;
    line-height:1.2!important;
    letter-spacing:-.012em!important;
  }
  .admin-stat small{
    font-size:15px!important;
    line-height:1.3!important;
  }
  .admin-stat strong{
    font-size:24px!important;
    line-height:1.08!important;
  }
  .admin-stat p{
    font-size:14px!important;
    line-height:1.42!important;
  }
  .quick-card strong{
    font-size:17px!important;
    line-height:1.28!important;
    letter-spacing:-.008em!important;
  }
  .quick-card small{
    font-size:14px!important;
    line-height:1.45!important;
  }
  .priority-head h2{
    font-size:18px!important;
    line-height:1.25!important;
  }
  .priority-body strong{
    font-size:15px!important;
    line-height:1.3!important;
  }
  .priority-body small{
    font-size:14px!important;
    line-height:1.42!important;
  }
  .bottom-nav .nav-item{
    font-size:12px!important;
    line-height:1.15!important;
  }
}
@media (max-width:390px){
  .admin-welcome h2{
    font-size:26px!important;
  }
  .admin-welcome p{
    font-size:14.5px!important;
  }
  .quick-heading h2{
    font-size:19px!important;
  }
  .quick-card strong{
    font-size:16.5px!important;
  }
  .quick-card small{
    font-size:13.5px!important;
  }
}
