/* V29: un único acceso «Horario»; el resto de ajustes viven en esta pantalla. */
#horariosView { padding: 25px; }
.pfh-topnav { display:flex; gap:8px; flex-wrap:wrap; margin:18px 0 22px; border-bottom:1px solid #dfe6f0; padding-bottom:12px; }
.pfh-topnav button, .pfh-subnav button { background:#e8edf5; color:#223149; border-radius:9px; font-weight:600; }
.pfh-topnav button.active, .pfh-subnav button.active { background:#152d55; color:#fff; }
.pfh-banner { background:#fff9e7; border:1px solid #efd591; color:#795614; border-radius:12px; padding:12px 16px; line-height:1.5; margin-bottom:18px; }
.pfh-status { margin:14px 0; padding:10px 15px; border-radius:9px; background:#e8f4ed; color:#14532d; }
.pfh-status.error { background:#fff0f0; color:#8d2222; }
.pfh-panel[hidden] { display:none !important; }
.pfh-subnav { display:flex; gap:7px; flex-wrap:wrap; margin:13px 0 22px; }
.pfh-subnav button { padding:9px 12px; font-size:13px; }
.pfh-card { border:1px solid #dce4ed; border-radius:12px; background:#fff; padding:15px; margin:12px 0; }
.pfh-card h3 { margin:0 0 12px; font-size:17px; }
.pfh-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pfh-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.pfh-field label { font-size:13px; display:block; margin:0 0 6px; }
.pfh-field input,.pfh-field select { width:100%; min-width:0; }
.pfh-field input[type=checkbox] { width:auto; }
.pfh-actions { display:flex; gap:9px; flex-wrap:wrap; margin:15px 0; }
.pfh-actions button { padding:10px 12px; }
.pfh-row { display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.pfh-row > * { min-width:0; }
.pfh-inlinecheck { display:flex; align-items:center; gap:9px; font-weight:500; margin:10px 0; }
.pfh-inlinecheck input { width:18px; height:18px; }
.pfh-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; overflow-x:auto; }
.pfh-day { min-width:105px; border:1px solid #d9e1ed; border-radius:10px; padding:9px; background:#f7f9fc; }
.pfh-day strong { display:block; margin-bottom:9px; }
.pfh-slot { display:block; padding:9px 7px; border-radius:7px; background:#dae7ff; color:#173c70; margin:7px 0; font-size:12px; overflow-wrap:anywhere; }
.pfh-help { font-size:13px; color:#566579; line-height:1.55; }
.pfh-empty { padding:25px; border-radius:12px; text-align:center; background:#f2f5fa; color:#627083; }
.pfh-danger { color:#a12b27; }
.pfh-card .pfh-field { margin:0; }
.pfh-activity-list { display:flex; flex-direction:column; gap:10px; margin:16px 0; }
.pfh-activity-item { border:1px solid #dce4ed; border-radius:12px; background:#fff; padding:14px; }
.pfh-activity-summary { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.pfh-activity-details { display:flex; flex-direction:column; gap:4px; min-width:0; flex:1 1 280px; }
.pfh-activity-details strong { font-size:16px; color:#1b2938; overflow-wrap:anywhere; }
.pfh-activity-meta { color:#566579; font-size:13px; line-height:1.5; }
.pfh-activity-pending { color:#9a5910; font-size:12px; font-weight:700; }
.pfh-activity-controls { display:flex; gap:8px; align-items:center; }
.pfh-activity-controls button { white-space:nowrap; }
.pfh-activity-item > .pfh-card { margin:14px 0 0; background:#f9fbff; }
.pfh-activity-item > .pfh-card .pfh-actions { margin-bottom:0; }
.pfh-panel .settings-layout { grid-template-columns:1fr; }
.pfh-panel .settings-layout .settings-aside { display:none; }
@media(max-width:900px) { .pfh-week { grid-template-columns:repeat(7,minmax(115px,1fr)); } .pfh-grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:620px) { #horariosView{padding:16px} .pfh-grid,.pfh-grid.three{grid-template-columns:1fr} .pfh-week{overflow-x:auto} .pfh-topnav button{flex:1 1 44%;padding:10px 8px} .pfh-card{padding:12px} }
/* V29.3: entrenador compacto + planificación visual semanal */
.pfh-sectiontitle { display:flex; gap:14px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin:22px 0 12px; }
.pfh-sectiontitle h2,.pfh-sectiontitle h3 { margin:0; }
.pfh-sectiontitle .pfh-help{margin:6px 0 0;max-width:700px}
.pfh-slot-list-row{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:8px 0}
.pfh-slot-list-row button{flex:none}
.pfh-resource-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px;align-items:start}
.pfh-resource-filters{padding:13px;border:1px solid #dae4f0;border-radius:12px;background:#fafcff}
.pfh-resource-filters h3{font-size:15px;margin:0 0 10px}
.pfh-filter{display:flex;gap:7px;align-items:center;font-weight:500;font-size:12px;margin:13px 0;line-height:1.35;overflow-wrap:anywhere}
.pfh-filter input{width:17px;height:17px;flex:none;accent-color:#153666}
.pfh-trainer-dot{width:10px;height:10px;border-radius:50%;flex:none}
.pfh-resource-scroll{border:1px solid #dce4ef;border-radius:12px;overflow:auto;max-height:810px;min-width:0}
.pfh-resource-header,.pfh-resource-grid{min-width:820px;display:grid;grid-template-columns:58px repeat(7,minmax(105px,1fr))}
.pfh-resource-header{position:sticky;top:0;z-index:5;background:#f7f9fd;border-bottom:1px solid #dce4ed}
.pfh-resource-header>div{padding:12px 6px;text-align:center;border-right:1px solid #e3e9f2;color:#52667e;font-size:12px;font-weight:700}
.pfh-hour-labels{position:relative;border-right:1px solid #dce4ed;background:#f8fafc}
.pfh-hour-label{position:absolute;transform:translateY(-8px);left:2px;right:2px;font-size:11px;text-align:center;color:#607189;pointer-events:none}
.pfh-date-column{position:relative;touch-action:pan-y;cursor:crosshair;border-right:1px solid #e7ecf5;background:repeating-linear-gradient(to bottom,#fff 0px,#fff 27px,#e9eef6 27px,#e9eef6 28px,#fff 28px,#fff 55px,#dce5f0 55px,#dce5f0 56px)}
.pfh-date-column:hover{background-color:#fbfdff}
.pfh-resource-block{position:absolute;z-index:2;display:block;text-align:left;overflow:hidden;padding:5px 4px 4px 6px;border:0;border-left:4px solid var(--trainer-color);border-radius:6px;background:color-mix(in srgb,var(--trainer-color) 21%,white);color:#142740;font-size:11px;line-height:1.25;box-shadow:0 1px 4px #0002}
.pfh-resource-block:hover{filter:brightness(.97);z-index:3}
.pfh-resource-block strong,.pfh-resource-block span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfh-resource-block strong{font-size:11px}
.pfh-calendar-selection{position:absolute;left:2px;right:2px;z-index:4;pointer-events:none;border:2px dashed #078acf;border-radius:6px;background:#9ad8ff77}
.pfh-drawer-overlay{position:fixed;inset:0;z-index:3000;background:#081526a8;display:flex;justify-content:flex-end;align-items:stretch}
.pfh-drawer-overlay[hidden]{display:none!important}
.pfh-drawer{height:100%;width:min(610px,100vw);background:white;padding:24px 25px 45px;overflow-y:auto;box-shadow:-12px 0 40px #0003;color:#1d2937}
.pfh-drawer-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid #dce4ee;padding-bottom:13px;margin-bottom:17px}
.pfh-drawer-heading h2{font-size:23px;line-height:1.2;margin:0}
.pfh-drawer-heading .pfh-help{margin:7px 0 0}
.pfh-drawer .pfh-field label{font-weight:700;margin:0 0 6px}
.pfh-drawer input,.pfh-drawer select{width:100%;min-height:42px;border:1px solid #cbd7e9;border-radius:8px;padding:9px 12px;font-size:14px;color:#1b293a;background:white}
.pfh-drawer .pfh-actions{justify-content:flex-end;margin-top:22px}
.pfh-drawer .pfh-banner{font-size:13px}
.pfh-error{background:#fff0ec;color:#8c2c1e;padding:12px;border-radius:8px;margin-top:13px}
.pfh-error[hidden]{display:none!important}
@media(max-width:990px){.pfh-resource-layout{grid-template-columns:1fr}.pfh-resource-filters{display:flex;flex-wrap:wrap;gap:5px 14px;align-items:center}.pfh-resource-filters h3{margin:0;width:100%}.pfh-filter{margin:5px 0}}
@media(max-width:640px){.pfh-sectiontitle h2{font-size:20px}.pfh-sectiontitle>.pfh-actions{width:100%}.pfh-sectiontitle>.pfh-actions button{flex:1}.pfh-drawer{padding:16px}.pfh-slot-list-row{align-items:start;flex-wrap:wrap}.pfh-resource-scroll{max-height:65vh}.pfh-resource-header,.pfh-resource-grid{min-width:830px}}

/* V30: reservas verificadas desde D1 */
.pfh-reservation-slot {margin:8px 0;padding:10px;display:flex;flex-direction:column;gap:4px;background:#edf4ff;border:1px solid #c6d7eb;border-radius:9px;min-width:0}
.pfh-reservation-slot strong{color:#102a52}.pfh-reservation-slot span{overflow-wrap:anywhere;font-size:12px}.pfh-trainer-label{font-weight:700;color:#35537c}.pfh-reservation-names{display:flex;flex-direction:column;gap:3px;border-top:1px solid #bacde4;padding-top:7px;margin-top:5px}.pfh-reservation-names span{font-size:11px}
/* Pigmalión V30.1: ficha de actividad detallada a pantalla completa */
.pfh-activity-heading{display:flex;align-items:center;gap:10px}
.pfh-activity-swatch{width:16px;height:16px;border-radius:50%;flex:none;border:1px solid #0001}
.pfh-activity-editor{position:fixed;inset:0;z-index:3500;overflow-y:auto;background:white;color:#1e2530;overscroll-behavior:contain;font-size:15px}
.pfh-activity-editor *{box-sizing:border-box}
.pfh-editor-head{position:sticky;top:0;z-index:3;height:76px;display:flex;align-items:center;justify-content:space-between;background:#040608;color:white;padding:12px clamp(15px,3vw,45px)}
.pfh-editor-back{border:0;background:transparent;color:white;font-size:21px;font-weight:750;display:flex;align-items:center;gap:8px;padding:8px 0}
.pfh-editor-back:hover{color:#cfefff}
.pfh-editor-head img{width:130px;max-height:64px;object-fit:contain;position:absolute;left:50%;transform:translateX(-50%);pointer-events:none}
.pfh-editor-content{max-width:1080px;margin:0 auto;padding:46px 24px 70px}
.pfh-editor-section{display:grid;gap:27px}
.pfh-edit-row{display:grid;grid-template-columns:minmax(190px,300px) minmax(0,1fr);align-items:start;column-gap:42px;min-width:0}
.pfh-edit-label{font-size:15px;font-weight:650;line-height:1.45;padding-top:12px;color:#26313d}
.pfh-edit-value{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.pfh-edit-value>input:not([type=checkbox]),.pfh-edit-value>select,.pfh-edit-value>textarea,.pfh-editor-img-url input{width:100%;min-width:0;max-width:570px;border:1px solid #d6dee8;border-radius:10px;background:#f6f7f9;padding:13px 15px;font-size:15px;color:#1f2937}
.pfh-edit-value>textarea{resize:vertical;min-height:125px}
.pfh-edit-value>input[type=number]{max-width:165px}
.pfh-edit-value>input:focus-visible,.pfh-edit-value>select:focus-visible,.pfh-edit-value>textarea:focus-visible{outline:2px solid #159bdb;outline-offset:2px}
.pfh-edit-checkbox{display:flex;align-items:center;gap:10px;line-height:1.5;font-weight:500;margin:5px 0 4px}
.pfh-edit-checkbox input{width:18px;height:18px;flex:none;accent-color:#0ea5e9}
.pfh-edit-nested{grid-template-columns:200px minmax(0,1fr);width:100%;margin-top:4px;gap:8px}
.pfh-edit-nested .pfh-edit-label{padding-top:12px;font-size:13px}
.pfh-edit-nested .pfh-edit-value{width:100%}
.pfh-edit-nested input{max-width:150px;width:100%}
.pfh-edit-hint{color:#677485;line-height:1.4}
.pfh-editor-image{width:100%;max-width:570px;height:205px;object-fit:cover;border-radius:8px;border:1px solid #dce5ed}
.pfh-editor-image-empty{width:100%;max-width:570px;height:195px;background:#f2f5f9;border:1px dashed #c8d5e3;display:flex;align-items:center;justify-content:center;color:#748294;border-radius:9px}
.pfh-editor-image[hidden],.pfh-editor-image-empty[hidden]{display:none!important}
.pfh-editor-image-actions{display:flex;gap:8px;flex-wrap:wrap}
.pfh-editor-image-actions button,.pfh-editor-img-url button{background:#0e9edb;color:#fff;border-radius:22px;padding:8px 15px;font-size:13px}
.pfh-editor-image-actions button:nth-child(2){background:#eef1f5;color:#37455b}
.pfh-editor-img-url{width:min(100%,570px);font-size:12px;color:#596b80}
.pfh-editor-img-url summary{cursor:pointer;padding:5px 0}
.pfh-editor-img-url input{margin:5px 0 8px}
.pfh-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.pfh-color-palette{display:grid;grid-template-columns:repeat(8,34px);gap:11px;border:1px solid #dae1eb;padding:14px;border-radius:12px;background:#fbfcfe;max-width:max-content}
.pfh-color-chip{width:33px;height:33px;border-radius:50%;border:3px solid transparent;box-shadow:inset 0 0 0 14px var(--color);background:var(--color);padding:0;position:relative;cursor:pointer}
.pfh-color-chip.selected{outline:2px solid #1c2e49;outline-offset:2px}
.pfh-color-chip.selected::after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;font-size:20px;color:#13253b;font-weight:800}
.pfh-editor-rules{margin-top:55px}
.pfh-editor-rules-heading{margin:0 0 18px clamp(0px,30%,342px);font-size:27px;font-weight:550}
.pfh-rules-timeline{border-left:4px solid #15a7e9;margin-left:clamp(0px,30%,342px);padding:5px 0 0 20px;display:flex;flex-direction:column;gap:26px}
.pfh-rule-row{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:start}
.pfh-rule-label{padding-top:10px;font-weight:500;color:#273341;line-height:1.45}
.pfh-rule-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.pfh-rule-controls>select{width:auto;max-width:100%;min-width:160px;background:#f4f6f8;border:1px solid #d4dfe9;border-radius:9px;padding:12px;font-size:14px}
.pfh-rule-amount{width:90px!important;max-width:105px!important;border:1px solid #d4dfe9;border-radius:8px;padding:12px;font-size:14px;background:#f4f6f8}
.pfh-rule-note{font-size:12px;color:#697589;margin:3px 0;width:100%;line-height:1.5}
.pfh-rule-controls>.alt{padding:9px 13px;background:#e8f0fa;font-size:12px}
.pfh-rule-event{color:#2993be;font-weight:700;margin-left:-27px}
.pfh-editor-footer{margin:42px 0 10px;border-top:1px solid #e1e7ee;padding-top:20px;display:flex;align-items:flex-end;gap:14px;justify-content:space-between;flex-wrap:wrap}
.pfh-editor-footer>.pfh-help{flex:1 1 280px}
.pfh-editor-msg{color:#166534;font-size:13px;flex:1 1 100%;min-height:0}
.pfh-editor-msg.error{color:#991b1b;font-weight:700}
.pfh-editor-footer .pfh-actions{margin:0;justify-content:flex-end}
.pfh-editor-footer .pfh-actions button{border-radius:20px;padding:10px 24px}
@media(max-width:870px){.pfh-editor-content{padding:30px 17px 60px}.pfh-edit-row{grid-template-columns:170px minmax(0,1fr);gap:20px}.pfh-editor-rules-heading{margin-left:0}.pfh-rules-timeline{margin-left:0}.pfh-rule-row{grid-template-columns:180px minmax(0,1fr)}}
@media(max-width:620px){.pfh-editor-head{height:64px}.pfh-editor-head img{width:95px;left:auto;right:14px;transform:none}.pfh-editor-back{font-size:17px}.pfh-editor-back span{max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pfh-editor-content{padding:23px 15px 70px}.pfh-editor-section{gap:17px}.pfh-edit-row{grid-template-columns:1fr;gap:5px}.pfh-edit-label{padding-top:0}.pfh-edit-nested{grid-template-columns:1fr}.pfh-editor-image{height:170px}.pfh-color-palette{grid-template-columns:repeat(4,32px)}.pfh-rule-row{grid-template-columns:1fr;gap:5px}.pfh-rules-timeline{margin-left:2px;padding-left:13px}.pfh-editor-rules{margin-top:30px}.pfh-editor-rules-heading{font-size:23px}.pfh-rule-controls>select{min-width:145px}.pfh-rule-event{margin-left:-19px}}

/* V30.2 · creación de eventos administrativos y series semanales */
.pfh-admin-create{margin-top:28px;border:1px solid #b5cbe3;background:#fafdff;padding:20px}
.pfh-admin-create h3{font-size:21px}.pfh-create-form label{font-size:14px;font-weight:600;display:flex;flex-direction:column;gap:7px;color:#21344a}
.pfh-create-form input,.pfh-create-form select,.pfh-create-form textarea{border:1px solid #b9cada;border-radius:9px;padding:11px 12px;min-height:44px;font:inherit;background:white;width:100%;box-sizing:border-box}
.pfh-create-form input[readonly]{background:#eef2f7;color:#3b5065}.pfh-create-form .pfh-inlinecheck{flex-direction:row;align-items:center;margin:20px 0;font-weight:600}.pfh-create-form .pfh-inlinecheck input{width:19px;min-height:19px}
.pfh-create-form #pfhEventRepeatConfig[hidden],.pfh-create-form #pfhEventRepeatCountWrap[hidden],.pfh-create-form #pfhEventRepeatDateWrap[hidden]{display:none!important}
.pfh-create-form textarea{resize:vertical}.pfh-create-form>.pfh-help{margin-top:14px}
.pfh-private-slot{background:#fff2e0;border:1px solid #ecc899;color:#613d1b}.pfh-private-slot strong{color:#613d1b}.pfh-private-cancel{font-size:11px;padding:5px 7px;margin-top:6px;align-self:flex-start}
@media(max-width:620px){.pfh-admin-create{padding:12px}}
