/* AYUKKI v21 — Popup & interaction system. Scoped: doesn't alter tables, data, or server logic. */
:root{--ay-pop-bg:#fffdfc;--ay-pop-ink:#2f2524;--ay-pop-muted:#927d78;--ay-pop-line:#eadbd6;--ay-pop-soft:#fff3ef;--ay-pop-red:#810D0D;--ay-pop-shadow:0 24px 58px rgba(49,19,17,.14),0 5px 16px rgba(49,19,17,.06)}
.ay-source-hidden{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;clip-path:inset(50%)!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important}
.ay-date-control,.ay-select-control{position:relative;width:100%;min-width:0}
.ay-date-trigger,.ay-select-trigger{width:100%;min-height:46px;display:flex;gap:10px;align-items:center;justify-content:space-between;text-align:left;border:1px solid #e7d5d0;border-radius:14px;background:linear-gradient(180deg,#fff,#fffcfb);padding:10px 13px;color:#362b28;font:500 12.5px/1.45 Poppins,system-ui,sans-serif;cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.ay-date-trigger:hover,.ay-select-trigger:hover{background:#fffaf9;border-color:#d1a49b}
.ay-date-trigger:focus-visible,.ay-select-trigger:focus-visible,.ay-open-trigger{outline:none;border-color:#ac5959!important;box-shadow:0 0 0 4px rgba(129,13,13,.075),0 6px 16px rgba(129,13,13,.055)}
.ay-date-trigger:disabled,.ay-select-trigger:disabled{opacity:.54;cursor:not-allowed}
.ay-date-label,.ay-select-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.ay-input-icon{flex-shrink:0;width:17px;height:17px;color:#986a65;display:inline-flex;align-items:center;justify-content:center}
.ay-input-icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ay-floating{position:fixed;z-index:1800;width:min(350px,calc(100vw - 20px));max-height:min(440px,calc(100dvh - 26px));overflow:hidden;display:flex;flex-direction:column;background:var(--ay-pop-bg);border:1px solid var(--ay-pop-line);border-radius:18px;box-shadow:var(--ay-pop-shadow);opacity:0;transform:translateY(-7px) scale(.985);transform-origin:top left;transition:transform .19s cubic-bezier(.2,.8,.2,1),opacity .16s ease;pointer-events:none;color:var(--ay-pop-ink);font:500 12px/1.5 Poppins,system-ui,sans-serif}
.ay-floating.ay-open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.ay-float-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px 15px 11px;border-bottom:1px solid #f1e6e2}
.ay-float-title{font-size:12px;font-weight:700;color:var(--ay-pop-ink)}
.ay-float-hint{font-size:10px;color:var(--ay-pop-muted);font-weight:400}
.ay-calendar-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 13px 9px}
.ay-calendar-month{font-weight:700;font-size:13px;min-width:0;white-space:nowrap}
.ay-calendar-arrows{display:flex;gap:7px;align-items:center}
.ay-mini-button{background:#fff7f4!important;border:1px solid #f0e0da!important;border-radius:10px!important;padding:0!important;min-width:32px!important;width:32px!important;height:32px!important;display:grid!important;place-items:center!important;box-shadow:none!important;color:#66433f!important;cursor:pointer;font-size:16px}
.ay-mini-button:hover{background:#fce9e4!important;border-color:#eac7bd!important}
.ay-mini-button:disabled{opacity:.28;cursor:not-allowed}
.ay-calendar-jump{display:flex;gap:8px;align-items:center;padding:0 13px 12px}
.ay-calendar-jump select{appearance:auto!important;border:1px solid #efdfda!important;border-radius:10px!important;background:white!important;padding:7px 9px!important;min-height:36px!important;flex:1;font:500 11px Poppins,system-ui,sans-serif;min-width:0}
.ay-calendar-jump select:last-child{flex:.65}
.ay-weekdays,.ay-daygrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:0 13px}
.ay-weekdays{margin-bottom:6px}
.ay-weekdays span{text-align:center;color:#9b8580;font-weight:600;font-size:10px;padding:5px 0}
.ay-daygrid{padding-bottom:13px}
.ay-day{appearance:none!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-width:0!important;height:35px!important;width:100%!important;border-radius:10px!important;padding:0!important;display:grid!important;place-items:center!important;font:500 11.5px Poppins,system-ui,sans-serif!important;color:#4d3c37!important;cursor:pointer}
.ay-day:hover:not(:disabled){background:#fff1ec!important;color:#810D0D!important}
.ay-day:disabled{opacity:.2!important;cursor:default!important}
.ay-day.ay-outside{color:#b5a4a0!important}
.ay-day.ay-today{border-color:#e7beb7!important;color:#810D0D!important;font-weight:700!important}
.ay-day.ay-chosen,.ay-day.ay-chosen:hover{background:linear-gradient(135deg,#a82a2a,#810D0D)!important;color:#fff!important;border-color:transparent!important;font-weight:700!important;box-shadow:0 5px 13px rgba(129,13,13,.17)!important}
.ay-calendar-footer{display:flex;align-items:center;justify-content:space-between;padding:10px 14px 13px;border-top:1px solid #f1e8e4}
.ay-link-btn{appearance:none;background:transparent!important;border:0!important;box-shadow:none!important;color:#810D0D!important;font:600 11px Poppins,system-ui,sans-serif!important;cursor:pointer;padding:6px 8px!important;border-radius:9px!important}
.ay-link-btn:hover{background:#fff0ec!important}
.ay-link-btn:disabled{opacity:.32;cursor:default}
.ay-list-head{padding:14px 14px 10px;font-weight:700;color:#3a2b29;font-size:12px;border-bottom:1px solid #f2e9e5}
.ay-list-search{margin:10px 12px 8px!important;width:calc(100% - 24px)!important;border-radius:11px!important;min-height:39px!important;box-shadow:none!important;font:400 12px Poppins,system-ui,sans-serif!important}
.ay-list-options{overflow-y:auto;min-height:0;max-height:min(292px,43dvh);padding:7px;overscroll-behavior:contain}
.ay-option{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;border:0!important;box-shadow:none!important;border-radius:11px!important;padding:10px 11px!important;font:500 12px Poppins,system-ui,sans-serif!important;background:transparent!important;color:#584742!important;cursor:pointer;min-height:38px}
.ay-option:hover,.ay-option:focus-visible{background:#fff3ef!important;color:#810D0D!important;outline:0!important}
.ay-option[aria-selected=true]{background:#fae9e5!important;color:#810D0D!important;font-weight:700!important}
.ay-option:disabled{opacity:.3;cursor:default}
.ay-option-check{color:#810D0D;font-size:13px}
.ay-empty{color:var(--ay-pop-muted);padding:18px 12px;text-align:center;font-size:11px}
/* Autocomplete and existing panels keep their current behavior; visual refinements only. */
.customer-suggestions{border-radius:17px!important;background:#fffdfc!important;box-shadow:var(--ay-pop-shadow)!important;border-color:var(--ay-pop-line)!important;animation:ay-pop-in .21s cubic-bezier(.2,.8,.2,1) both;overflow:hidden}
.customer-suggestion{border-radius:12px!important;transition:background-color .16s ease,transform .16s ease}
.customer-suggestion:hover{background:#fff3ef!important;transform:translateX(2px)}
#customer-detail-panel,.login-box{border-radius:22px!important;box-shadow:0 20px 50px rgba(49,19,17,.1)}
/* Confirm / prompt modal: never bypasses backend validations. */
.ay-dialog-backdrop{position:fixed;inset:0;background:rgba(30,15,15,.45);backdrop-filter:blur(5px);z-index:2800;display:flex;justify-content:center;align-items:center;padding:16px;opacity:0;transition:opacity .18s ease}
.ay-dialog-backdrop.ay-visible{opacity:1}
.ay-dialog{width:min(440px,100%);border:1px solid #ecded9;background:#fffdfc;border-radius:22px;box-shadow:0 32px 95px rgba(27,13,13,.24);padding:25px;transform:translateY(12px) scale(.985);transition:transform .2s cubic-bezier(.2,.9,.25,1)}
.ay-dialog-backdrop.ay-visible .ay-dialog{transform:translateY(0) scale(1)}
.ay-dialog-icon{display:grid;place-items:center;background:#fff1ed;color:#810D0D;border:1px solid #efd9d2;border-radius:14px;width:42px;height:42px;font-size:19px;margin-bottom:13px}
.ay-dialog-title{font-size:17px;font-weight:700;line-height:1.3;margin-bottom:8px;color:#251e1b}
.ay-dialog-message{white-space:pre-line;color:#78635e;font-size:12px;line-height:1.8;max-height:35vh;overflow:auto;margin-bottom:15px;overflow-wrap:anywhere}
.ay-dialog-input{width:100%!important;margin-bottom:16px!important;min-height:46px}
.ay-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.ay-dialog-actions button{min-width:96px;border-radius:12px;padding:11px 15px;font:600 12px Poppins,system-ui,sans-serif;cursor:pointer}
.ay-dialog-cancel{border:1px solid #ebdad4;background:#fffaf8;color:#6c5550}
.ay-dialog-submit{background:linear-gradient(135deg,#af2929,#810D0D);color:white;border:1px solid #810D0D;box-shadow:0 7px 18px rgba(129,13,13,.14)}
.ay-dialog-submit.danger{background:linear-gradient(135deg,#c13b3b,#810D0D)}
.ay-dialog-cancel:hover{background:#fff0ec}.ay-dialog-submit:hover{filter:brightness(1.06)}
.ay-dialog-backdrop button:focus-visible,.ay-day:focus-visible,.ay-link-btn:focus-visible{outline:2px solid #b34b4b!important;outline-offset:2px}
/* Non-blocking toast feedback. */
.ay-toasts{position:fixed;z-index:3300;right:18px;bottom:18px;display:flex;flex-direction:column;gap:9px;align-items:flex-end;pointer-events:none;max-width:min(400px,calc(100vw - 32px))}
.ay-toast{display:flex;gap:11px;align-items:flex-start;padding:13px 14px;border-radius:15px;background:linear-gradient(140deg,#fff,#fff9f7);border:1px solid #eadbd5;box-shadow:0 16px 38px rgba(45,22,22,.16);font:500 11.5px/1.65 Poppins,system-ui,sans-serif;color:#493a35;pointer-events:auto;max-width:100%;min-width:210px;animation:ay-pop-in .22s cubic-bezier(.2,.8,.2,1) both;overflow-wrap:anywhere}
.ay-toast-mark{font-size:15px;color:#36815c;flex:none}.ay-toast.error .ay-toast-mark{color:#bd3333}
.ay-toast-close{margin-left:auto;flex:none;border:0!important;background:transparent!important;box-shadow:none!important;color:#b29e98!important;cursor:pointer;padding:0 3px!important;font-size:18px!important;line-height:1!important}
@keyframes ay-pop-in{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:600px){.ay-floating{max-height:calc(100dvh - 20px);border-radius:17px}.ay-date-trigger,.ay-select-trigger{min-height:47px}.ay-calendar-nav{padding-top:11px}.ay-day{height:38px!important}.ay-toasts{bottom:12px;right:12px;left:12px;max-width:none;align-items:stretch}.ay-dialog{padding:21px}}
@media(prefers-reduced-motion:reduce){.ay-floating,.ay-dialog-backdrop,.ay-dialog,.ay-date-trigger,.ay-select-trigger,.customer-suggestions,.customer-suggestion,.ay-toast{transition:none!important;animation:none!important;transform:none!important}}
