/* ===== Agenda ===== */
.weeknav{display:flex;align-items:center;gap:6px}
.icon-btn.sm{width:44px;height:44px;border-radius:14px}
.cal-card{padding:20px 20px 24px}
.cal-legend{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:.8rem;color:var(--muted);font-weight:600;margin:0 0 14px 6px}
.cal-legend span{display:inline-flex;align-items:center;gap:6px}
.lgd{width:12px;height:12px;border-radius:4px;display:inline-block}
.lgd.avail{background:#EEF7FE;border:1px solid #CFE7FB}
.lgd.free{border:1.5px dashed #9FD3F9}
.lgd.off{background:repeating-linear-gradient(45deg,#F3EEFB 0 4px,#E5DCF7 4px 8px)}
.cal-scroll{overflow-x:auto}
.cal{min-width:860px}
.cal-head{display:grid;grid-template-columns:56px repeat(7,1fr);gap:6px;margin-bottom:8px}
.cal-day{display:flex;flex-direction:column;align-items:center;padding:8px 0;border-radius:16px;transition:background .2s}
.cal-day span{font-size:.78rem;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.cal-day b{font-size:1.35rem;font-weight:800}
.cal-day:hover{background:var(--shell)}
.cal-day.today{background:var(--ink);color:#fff}.cal-day.today span{color:#C9C6D6}
.cal-body{display:grid;grid-template-columns:56px repeat(7,1fr);gap:6px;position:relative}
.cal-hours{position:relative}
.cal-hours span{position:absolute;right:8px;transform:translateY(-50%);font-size:.72rem;color:var(--muted);font-weight:600;font-variant-numeric:tabular-nums}
.cal-hours span:first-child{transform:none}
.cal-col{position:relative;border-radius:14px;background:#FBFBFD}
.cal-col.today{background:#F5FAFF}
.cal-col .hl{position:absolute;left:0;right:0;border-top:1px solid #EFEEF4}
.blk{position:absolute;left:3px;right:3px;border-radius:10px}
.blk.avail{background:#EEF7FE;left:0;right:0;border-radius:12px}
.blk.off{background:repeating-linear-gradient(45deg,#F3EEFB 0 6px,#E9E1F8 6px 12px);left:0;right:0;z-index:1;display:flex;align-items:flex-start;justify-content:center;padding-top:8px}
.blk.off span{font-size:.72rem;font-weight:700;color:var(--mango-ink);background:#fff;padding:2px 8px;border-radius:999px}
.blk.free{z-index:2;border:1.5px dashed #D9ECFC;display:flex;align-items:center;gap:4px;padding:0 8px;font-size:.75rem;font-weight:700;color:#B5DCFA;transition:all .15s var(--ease)}
.blk.free svg{width:14px;height:14px}
.blk.free:hover{border-color:#9FD3F9;background:#fff;color:var(--brand-dark)}
.ev{position:absolute;left:4px;right:4px;z-index:3;border-radius:12px;padding:6px 9px;text-align:left;display:flex;flex-direction:column;gap:1px;overflow:hidden;font-size:.8rem;line-height:1.25;border-left:4px solid;box-shadow:0 2px 6px rgba(28,27,34,.06);transition:transform .15s var(--ease),box-shadow .15s}
.ev:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(28,27,34,.12);z-index:4}
.ev b{font-size:.75rem;font-variant-numeric:tabular-nums}
.ev span{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev.s-confirmed{background:#E4E2FB;color:#3B3594;border-color:#7C74E8}
.ev.s-change_req{background:var(--mango-soft);color:#5B3EA0;border-color:var(--mango)}
.ev.s-attended{background:var(--teal-soft);color:#17663A;border-color:var(--teal)}
.ev.s-no_show{background:var(--berry-soft);color:#A12C61;border-color:var(--berry)}
.lgd.s-confirmed{background:#7C74E8}.lgd.s-change_req{background:var(--mango)}.lgd.s-attended{background:var(--teal)}.lgd.s-no_show{background:var(--berry)}
.now{position:absolute;left:-4px;right:0;height:2px;background:var(--berry);z-index:5}
.now::before{content:"";position:absolute;left:-4px;top:-4px;width:10px;height:10px;border-radius:50%;background:var(--berry)}

/* Solicitudes */
.requests{display:flex;flex-direction:column;gap:10px}
.req{display:flex;gap:14px;align-items:flex-start;background:var(--mango-soft);border-radius:18px;padding:14px 16px}
.req.small{background:var(--shell);margin:14px 0 0;align-items:center}
.req.done{opacity:.6}
.req-body{flex:1;min-width:0}
.req-body p{margin-top:4px;line-height:1.45}
.req-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Drawer */
.drawer-wrap{position:fixed;inset:0;z-index:50;pointer-events:none}
.drawer-backdrop{position:absolute;inset:0;background:rgba(28,27,34,.28);opacity:0;transition:opacity .25s var(--ease)}
.drawer{position:absolute;top:12px;right:12px;bottom:12px;width:min(460px,calc(100vw - 24px));background:#fff;border-radius:28px;padding:24px 26px;overflow-y:auto;transform:translateX(110%);transition:transform .3s var(--ease);box-shadow:0 20px 60px rgba(28,27,34,.2)}
.drawer-wrap.open{pointer-events:auto}
.drawer-wrap.open .drawer-backdrop{opacity:1}
.drawer-wrap.open .drawer{transform:none}
.drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.drawer-form{display:flex;flex-direction:column;gap:14px}
.drawer-form .form-actions{margin-top:6px}
.slots{display:flex;flex-wrap:wrap;gap:8px}
.slot{padding:9px 14px;border-radius:12px;background:var(--shell);font-weight:700;font-variant-numeric:tabular-nums;border:1.5px solid transparent;transition:all .15s}
.slot:hover{border-color:var(--brand)}
.slot.on{background:var(--brand);color:#fff}
.was{display:flex;align-items:center;gap:8px;background:var(--shell);padding:12px 14px;border-radius:14px}
.was svg{width:18px;height:18px;color:var(--muted)}
.appt-when{display:flex;gap:16px;align-items:center}
.appt-date{width:72px;height:80px;border-radius:20px;background:var(--brand-soft);display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--brand-dark)}
.appt-date span{font-size:.72rem;font-weight:700;text-transform:uppercase}
.appt-date b{font-size:1.7rem;font-weight:800;line-height:1.1;color:var(--ink)}
.appt-when .status{margin-top:6px}
.drawer-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.drawer-actions.secondary{margin-top:12px;gap:16px}
.link-danger{color:var(--berry-ink);font-weight:600;font-size:.88rem;text-decoration:underline;padding:0}
.mini-hist{list-style:none;padding:0;margin:10px 0 0;display:flex;flex-direction:column;gap:6px}
.mini-hist li{display:flex;justify-content:space-between;align-items:center;font-size:.88rem}
.mini-hist .status{padding:3px 10px;font-size:.75rem}

/* Disponibilidad */
.week-rules{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.wr-row{display:grid;grid-template-columns:120px 1fr;align-items:center;gap:12px;padding:10px 14px;border-radius:16px;background:var(--shell)}
.wr-row.empty{background:#FBFBFD}
.wr-day{font-weight:700}
.wr-chips{display:flex;flex-wrap:wrap;gap:8px}
.wr-chip{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1.5px solid #CFE7FB;color:var(--brand-dark);padding:6px 6px 6px 12px;border-radius:999px;font-weight:700;font-variant-numeric:tabular-nums}
.wr-chip button{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.wr-chip button:hover{background:var(--berry-soft);color:var(--berry-ink)}
.wr-chip svg{width:14px;height:14px}
.add-rule{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.daypick{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.daypick input{display:none}
.daypick span{display:inline-block;padding:10px 16px;border-radius:14px;background:var(--shell);font-weight:700;cursor:pointer;border:1.5px solid transparent;transition:all .15s}
.daypick input:checked+span{background:var(--ink);color:#fff}
.exc-list{list-style:none;padding:0;margin:12px 0 16px;display:flex;flex-direction:column;gap:8px}
.exc-list li{display:flex;align-items:center;gap:12px;background:var(--shell);padding:10px 12px;border-radius:14px}
.exc-list li>svg{color:var(--mango);width:20px;height:20px}
.exc-list li div{flex:1;display:flex;flex-direction:column}
.field .btn-dark{width:100%}

@media (max-width:900px){
  .wr-row{grid-template-columns:1fr}
  .req{flex-direction:column}
}
