.appointment-detail{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-width:760px;max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #d8e3de;border-radius:24px;padding:32px;color:#19382d;background:#fff;box-shadow:0 20px 80px #12332830}.appointment-detail::backdrop{background:#10282066;backdrop-filter:blur(3px)}.detail-eyebrow{font-size:11px;letter-spacing:2px;color:#667d71}.detail-heading{border-bottom:1px solid #e4ebe6;padding-bottom:22px}.detail-heading h2{font-size:30px;margin:6px 0 15px;overflow-wrap:anywhere}.appointment-state{display:inline-flex;gap:8px;align-items:center;border:1px solid var(--state-color);border-radius:30px;padding:6px 12px;font-size:14px;font-weight:650;color:var(--state-color);background:white}.appointment-state:before{content:'';width:9px;height:9px;border-radius:50%;background:var(--state-color)}.detail-facts{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:26px 0}.detail-facts dt{font-size:12px;color:#687c71;margin-bottom:7px}.detail-facts dd{margin:0;font-size:16px;line-height:1.5;overflow-wrap:anywhere}.detail-notes{display:block;padding:20px;background:#f4f7f1;border-radius:14px}.detail-notes h3{font-size:14px;margin:0 0 8px}.detail-notes p{white-space:pre-wrap;font-size:15px;margin:0;line-height:1.6}.detail-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:28px}.detail-actions button{min-height:44px;padding:11px 18px}.detail-help{color:#61776c;line-height:1.5}.status-scheduled{--appointment-state:#2463b5}.status-confirmed{--appointment-state:#b17c00}.status-completed{--appointment-state:#23815b}.status-no_show{--appointment-state:#b63d78}.status-cancelled{--appointment-state:#68736f}.event[class*=status-]{border-inline-start:5px solid var(--appointment-state);}.event.status-cancelled{border-inline-start-style:dashed}
@media(max-width:600px){.appointment-detail{padding:22px;border-radius:20px}.detail-heading h2{font-size:25px}.detail-facts{grid-template-columns:1fr;gap:18px}.detail-actions{display:grid;grid-template-columns:1fr 1fr}.detail-actions button{width:100%}}
.event.status-scheduled{--appointment-bg:#e9f1fe;--appointment-ink:#17477e;background:var(--appointment-bg);color:var(--appointment-ink);border-left-color:var(--appointment-state)}.event.status-confirmed{--appointment-bg:#fff3c5;--appointment-ink:#745200;background:var(--appointment-bg);color:var(--appointment-ink);border-left-color:var(--appointment-state)}.event.status-completed{--appointment-bg:#e2f3e8;--appointment-ink:#155d3e;background:var(--appointment-bg);color:var(--appointment-ink);border-left-color:var(--appointment-state)}.event.status-no_show{--appointment-bg:#fce6f0;--appointment-ink:#87325b;background:var(--appointment-bg);color:var(--appointment-ink);border-left-color:var(--appointment-state)}.event.status-cancelled{--appointment-bg:#edf0ee;--appointment-ink:#505c56;background:var(--appointment-bg);color:var(--appointment-ink);border-left-color:var(--appointment-state)}.professional-appointment{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;width:100%;text-align:left;background:white;border:1px solid #dfe7df;border-radius:14px;padding:18px;margin:14px 0;font:inherit;color:inherit}@media(max-width:600px){.professional-appointment{grid-template-columns:1fr;gap:10px}}

.detail-status-editor{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;padding:20px;background:#f4f7f1;border-radius:14px;margin:20px 0}.detail-status-editor label{display:grid;gap:8px;font-size:13px;font-weight:650}.detail-status-editor select{font:inherit;min-height:46px;padding:10px;border:1px solid #cddbd2;border-radius:9px;background:#fff;color:#19382d}.detail-status-editor button{min-height:46px}.detail-status-message{grid-column:1/-1;font-size:13px;margin:0;line-height:1.5}.detail-status-message:empty{display:none}@media(max-width:480px){.detail-status-editor{grid-template-columns:1fr}}

/* Immediate status choices: same state colors as the calendar. */
.detail-status-palette{display:block}.detail-status-label{margin:0 0 16px;font-weight:650;font-size:14px}.detail-status-colors{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:8px 0 12px}.detail-status-color{position:relative;display:grid;place-items:center;width:42px;height:42px;min-width:42px;min-height:42px;padding:0;border:2px solid transparent;border-radius:50%;background:transparent;color:var(--status-color);cursor:pointer}.detail-status-color:before{content:'';width:28px;height:28px;border-radius:50%;background:var(--status-color);box-shadow:0 3px 9px #173b3015}.detail-status-color.selected{border-color:var(--status-color)}.detail-status-color.selected:after{content:'✓';position:absolute;color:white;font-weight:800;font-size:17px;line-height:1}.detail-status-color:focus-visible{outline:3px solid #19382d;outline-offset:4px}.detail-status-color:disabled{cursor:wait;opacity:.55}.detail-status-tooltip{position:absolute;bottom:calc(100% + 9px);left:50%;transform:translateX(-50%);padding:7px 10px;border-radius:8px;white-space:nowrap;background:#19382d;color:white;font-size:12px;font-weight:600;line-height:1.3;pointer-events:none;opacity:0;z-index:2}.detail-status-color:hover .detail-status-tooltip,.detail-status-color:focus-visible .detail-status-tooltip{opacity:1}.detail-status-palette .detail-status-message{margin:10px 0 0}@media(prefers-reduced-motion:no-preference){.detail-status-color:before{transition:transform .15s}.detail-status-color:hover:before{transform:scale(1.1)}}

/* Compact appointment card: clear reading order and bounded notes. */
.appointment-detail{width:min(720px,calc(100vw - 28px));max-width:720px;padding:0;background:#f7f9f5;border-radius:22px;font-family:system-ui,sans-serif}
.appointment-detail .detail-heading{position:relative;padding:24px 64px 20px 26px;background:white;border-bottom:1px solid #e1e8dc;border-radius:22px 22px 0 0}
.appointment-detail .detail-eyebrow{font-size:10px;letter-spacing:.12em;text-transform:uppercase;margin:0 0 8px;color:#869771;font-weight:700}
.appointment-detail .detail-heading h2{font-size:25px;line-height:1.25;letter-spacing:-.035em;margin:0 0 12px}
.appointment-detail .appointment-state{font-size:11px;padding:5px 10px;gap:6px;background:color-mix(in srgb,var(--state-color) 7%,white);border-color:color-mix(in srgb,var(--state-color) 24%,white)}
.appointment-detail .appointment-state:before{width:6px;height:6px}
.appointment-detail .detail-close{position:absolute;top:22px;right:22px;width:34px;height:34px;min-height:34px;padding:0;border:1px solid #dce5d5;border-radius:50%;background:#f7f9f4;color:#59734e;font-size:23px;cursor:pointer}
.appointment-detail .detail-facts{grid-template-columns:1fr 1fr;gap:16px 24px;padding:22px 26px;margin:0;background:white}
.appointment-detail .detail-facts dt{font-size:10px;margin-bottom:5px;color:#7b8c73;font-weight:550}
.appointment-detail .detail-facts dd{font-size:14px;line-height:1.5;color:#284d3d}
.appointment-detail .detail-facts [data-fact=Servicio],.appointment-detail .detail-facts [data-fact=Correo]{grid-column:1/-1}
.appointment-detail .detail-facts [data-fact=Servicio] dd{font-weight:650;font-size:15px}
.appointment-detail .detail-payment-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:18px 26px;border:1px solid #dfe7d8;border-radius:13px;background:white;overflow:hidden}
.appointment-detail .detail-payment-summary>div{padding:13px 16px;min-width:0}.appointment-detail .detail-payment-summary>div+div{border-left:1px solid #e5ebdf}.appointment-detail .detail-payment-summary span{display:block;font-size:10px;color:#7c8f70;margin-bottom:5px}.appointment-detail .detail-payment-summary strong{font-size:16px;color:#284f3b;overflow-wrap:anywhere}.appointment-detail .detail-payment-summary>div:last-child{background:#f0f5e8}
.appointment-detail .detail-status-editor{margin:18px 26px;padding:16px 18px;border:1px solid #e0e8da;border-radius:13px;background:white}
.appointment-detail .detail-status-label{font-size:12px;margin:0 0 8px;color:#496841}.appointment-detail .detail-status-colors{gap:13px;padding:4px 0}.appointment-detail .detail-status-color{width:36px;height:36px;min-width:36px;min-height:36px}.appointment-detail .detail-status-color:before{width:24px;height:24px}.appointment-detail .detail-status-color.selected:after{font-size:15px}
.appointment-detail .detail-status-message{font-size:11px;color:#708068}.appointment-detail .detail-status-color.pending{border-style:dashed;border-color:var(--status-color);opacity:1;animation:detail-state-saving 1.2s ease-in-out infinite}@keyframes detail-state-saving{50%{opacity:.45}}
.appointment-detail .detail-notes{margin:18px 26px;padding:16px 18px;border:1px solid #e0e8da;border-radius:13px;background:#f0f5e9}.appointment-detail .detail-notes h3{font-size:11px;color:#6e855c;margin:0 0 8px}.appointment-detail .detail-notes p{font-size:13px;line-height:1.7;max-height:150px;overflow:auto;overflow-wrap:anywhere}
.appointment-detail .detail-actions{gap:8px;margin:0;padding:18px 26px;background:white;border-top:1px solid #e0e7da;justify-content:flex-end}.appointment-detail .detail-actions button{font-size:12px;min-height:38px;padding:9px 13px;border-radius:10px;cursor:pointer}.appointment-detail button:focus-visible{outline:3px solid #809e62;outline-offset:3px}
@media(max-width:600px){.appointment-detail{width:calc(100vw - 20px);max-height:92dvh;padding:0;border-radius:18px}.appointment-detail .detail-heading{padding:20px 58px 18px 20px}.appointment-detail .detail-heading h2{font-size:23px}.appointment-detail .detail-facts{padding:20px;gap:14px 16px}.appointment-detail .detail-facts dd{font-size:13px}.appointment-detail .detail-facts [data-fact=Servicio] dd{font-size:14px}.appointment-detail .detail-payment-summary,.appointment-detail .detail-status-editor,.appointment-detail .detail-notes{margin:16px 20px}.appointment-detail .detail-payment-summary>div{padding:12px 10px}.appointment-detail .detail-payment-summary strong{font-size:14px}.appointment-detail .detail-actions{padding:16px 20px;grid-template-columns:1fr 1fr}.appointment-detail .detail-actions button{font-size:11px}.appointment-detail .detail-status-editor{display:block}}
@media(prefers-reduced-motion:reduce){.appointment-detail .detail-status-color.pending{animation:none}}
.appointment-detail .detail-actions .secondary{border:1px solid #d5dfcf;background:white;color:#4b6844;box-shadow:none}.appointment-detail .detail-actions .primary{border:1px solid #1c503e;background:#1c503e;color:white;box-shadow:none}.appointment-detail .detail-actions button:disabled{opacity:.55;cursor:wait}
