/* ==========================================================================
   Custom admin controls (static/vue/admin/controls.js)
   Replaces native selects, date/time pickers, number spinners, colour pickers
   and checkboxes so they look the same everywhere.
   ========================================================================== */
.adm-popover {
  z-index: 2100; background: #fff; border: 1px solid #e5e7e3; border-radius: 12px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: #1b2a2d; font-size: .9rem;
  overflow: auto; animation: adm-pop .12s ease-out;
}
@keyframes adm-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- select ---------- */
.adm-select { position: relative; min-width: 0; }
.adm-toolbar .adm-select { min-width: 180px; }
.adm-select-btn {
  width: 100%; display: flex; align-items: center; gap: .55rem; min-height: 40px; padding: .5rem .75rem;
  border: 1px solid #d4d8d2; border-radius: 10px; background: #fff; color: #1b2a2d;
  font: inherit; font-size: .92rem; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.adm-select-btn:hover:not(:disabled) { border-color: #b9c2bd; }
.adm-select-btn:focus-visible, .adm-select.is-open .adm-select-btn { outline: none; border-color: #0f7e7a; box-shadow: 0 0 0 3px rgba(15, 126, 122, .15); }
.adm-select-btn:disabled { opacity: .55; cursor: not-allowed; background: #f8f8f6; }
.adm-select-value { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-select-value i { color: #0f7e7a; }
.adm-select-placeholder { flex: 1; color: #94a3a6; }
.adm-select-chevron { font-size: .72rem; color: #66757a; transition: transform .15s; margin-left: auto; }
.adm-select.is-open .adm-select-chevron { transform: rotate(180deg); }
.adm-select.is-sm .adm-select-btn { min-height: 34px; padding: .35rem .65rem; font-size: .85rem; }
.adm-select-list { padding: .3rem; max-height: 320px !important; }
.adm-option {
  width: 100%; display: flex; align-items: center; gap: .55rem; padding: .55rem .65rem; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; white-space: nowrap;
}
.adm-option.is-active { background: #f1f5f4; }
.adm-option.is-selected { color: #0b5755; font-weight: 700; }
.adm-option i:not(.adm-option-check) { color: #0f7e7a; width: 1rem; text-align: center; }
.adm-option-label { flex: 1; }
.adm-option-check { color: #0f7e7a; font-size: .8rem; }
.adm-option.is-empty { color: #94a3a6; cursor: default; }

/* ---------- checkbox ---------- */
.adm-check { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; font-size: .88rem; color: #1b2a2d; }
.adm-check-box {
  width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; padding: 0;
  border: 1.5px solid #b9c2bd; border-radius: 6px; background: #fff; color: #fff; font-size: .68rem;
  transition: background .15s, border-color .15s, box-shadow .15s; cursor: pointer;
}
.adm-check-box:hover:not(:disabled) { border-color: #0f7e7a; }
.adm-check-box:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(15, 126, 122, .2); }
.adm-check.is-checked .adm-check-box, .adm-check-box[aria-checked="mixed"] { background: #0f7e7a; border-color: #0f7e7a; }
.adm-check.is-disabled { opacity: .5; cursor: not-allowed; }
.adm-check-label { line-height: 1.35; }

/* ---------- date ---------- */
.adm-date-wrap { position: relative; min-width: 0; }
.adm-date-wrap .adm-date {
  width: 100%; font: inherit; font-size: .92rem; color: #1b2a2d; text-align: left;
  display: flex; align-items: center; gap: .55rem; min-height: 40px; padding: 0 .75rem;
  border: 1px solid #d4d8d2; border-radius: 10px; background: #fff; cursor: pointer;
}
.adm-date-wrap .adm-date:focus-visible, .adm-date-wrap .adm-date.is-open { outline: none; border-color: #0f7e7a; box-shadow: 0 0 0 3px rgba(15, 126, 122, .15); }
.adm-date-wrap .adm-date > span { flex: 1; white-space: nowrap; }
.adm-date-clear { color: #94a3a6; padding: .3rem; margin-right: -.3rem; border-radius: 6px; }
.adm-date-clear:hover { color: #b83b5e; background: #fbe7ed; }
.adm-toolbar .adm-date-wrap { min-width: 160px; }
.adm-calendar-pop { width: 296px; padding: .75rem; }
.adm-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.adm-cal-head strong { text-transform: capitalize; font-size: .95rem; }
.adm-cal-head .adm-icon-btn { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #66757a; cursor: pointer; }
.adm-cal-head .adm-icon-btn:hover { background: #f1f5f4; color: #1b2a2d; }
.adm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.adm-cal-wd { text-align: center; font-size: .7rem; font-weight: 700; color: #94a3a6; padding: .3rem 0; text-transform: uppercase; }
.adm-cal-day {
  aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: .86rem;
  color: #1b2a2d; cursor: pointer; display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.adm-cal-day:hover:not(:disabled) { background: #eef6f5; }
.adm-cal-day.is-weekend { color: #8a5a5a; }
.adm-cal-day.is-outside { color: #c3c9c6; }
.adm-cal-day.is-today { box-shadow: inset 0 0 0 1.5px #0f7e7a; font-weight: 700; }
.adm-cal-day.is-selected { background: #0f7e7a; color: #fff; font-weight: 700; }
.adm-cal-day:disabled { color: #d6dad8; cursor: not-allowed; }
.adm-cal-foot { display: flex; justify-content: space-between; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #eef0ec; }
.adm-cal-foot .adm-btn { font-family: inherit; }

/* ---------- time ---------- */
.adm-time-wrap { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.adm-time-wrap input.adm-time { width: 112px !important; min-width: 0 !important; padding-right: 2.2rem !important; font-variant-numeric: tabular-nums; }
.adm-time-icon { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #66757a; width: 28px; height: 28px; border-radius: 7px; cursor: pointer; }
.adm-time-icon:hover { background: #f1f5f4; color: #0f7e7a; }
.adm-time-wrap.is-invalid input.adm-time { border-color: #b83b5e !important; box-shadow: 0 0 0 3px rgba(184, 59, 94, .15) !important; }
.adm-time-pop { display: flex; gap: .25rem; padding: .4rem; height: 236px; overflow: hidden !important; }
.adm-time-col { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: .15rem; scrollbar-width: thin; }
.adm-time-col + .adm-time-col { border-left: 1px solid #eef0ec; padding-left: .3rem; }
.adm-time-col button { border: 0; background: transparent; border-radius: 7px; padding: .4rem .9rem; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; color: #1b2a2d; }
.adm-time-col button:hover { background: #eef6f5; }
.adm-time-col button.is-selected { background: #0f7e7a; color: #fff; font-weight: 700; }

/* ---------- number ---------- */
.adm-number { display: inline-flex; align-items: stretch; border: 1px solid #d4d8d2; border-radius: 10px; background: #fff; overflow: hidden; min-height: 40px; max-width: 220px; }
.adm-number:focus-within { border-color: #0f7e7a; box-shadow: 0 0 0 3px rgba(15, 126, 122, .15); }
.adm-number input[type=text] { border: 0 !important; box-shadow: none !important; width: 64px !important; min-height: 0 !important; text-align: center; padding: 0 .25rem !important; font-weight: 700; font-variant-numeric: tabular-nums; background: transparent !important; }
.adm-number-suffix { align-self: center; color: #66757a; font-size: .85rem; padding-right: .4rem; }
.adm-number-btn { border: 0; background: #f8f8f6; color: #34474b; width: 38px; cursor: pointer; font-size: .78rem; }
.adm-number-btn:hover:not(:disabled) { background: #e3f2f1; color: #0f7e7a; }
.adm-number-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- colour ---------- */
.adm-color-btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; padding: .4rem .75rem .4rem .45rem; border: 1px solid #d4d8d2; border-radius: 10px; background: #fff; font-size: .9rem; cursor: pointer; font-family: ui-monospace, monospace; color: #1b2a2d; }
.adm-color-btn:focus-visible { outline: none; border-color: #0f7e7a; box-shadow: 0 0 0 3px rgba(15, 126, 122, .15); }
.adm-color-swatch { width: 28px; height: 28px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.adm-color-pop { padding: .75rem; width: 236px; }
.adm-color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: .7rem; }
.adm-color-grid button { aspect-ratio: 1; border: 0; border-radius: 7px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.adm-color-grid button.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1b2a2d; }
.adm-color-hex { display: flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; color: #66757a; }
.adm-color-hex input { flex: 1; border: 1px solid #d4d8d2; border-radius: 8px; padding: .4rem .55rem; font-family: ui-monospace, monospace; font-size: .85rem; color: #1b2a2d; outline: none; }
.adm-color-hex input:focus { border-color: #0f7e7a; }

/* ---------- recurring day + month ---------- */
.adm-monthday { display: flex; gap: .4rem; }
.adm-monthday .adm-monthday-day { width: 86px; flex: none; }
.adm-monthday .adm-select:last-child { flex: 1; }

/* ---------- topbar ---------- */
.adm-mini-toggle { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: #66757a; cursor: pointer; margin: 0; position: relative; }
.adm-mini-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.adm-mini-toggle .adm-toggle-track { width: 34px; height: 20px; }
.adm-mini-toggle .adm-toggle-thumb { width: 14px; height: 14px; }
.adm-mini-toggle input:checked + .adm-toggle-track { background: #0f7e7a; }
.adm-mini-toggle input:checked + .adm-toggle-track .adm-toggle-thumb { transform: translateX(14px); }
.adm-mini-toggle input:focus-visible + .adm-toggle-track { box-shadow: 0 0 0 3px rgba(15, 126, 122, .25); }
.adm-back-web { white-space: nowrap; }

/* search inputs: hide the native clear "x" */
.adm-root input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- restore-version dialog ---------- */
.adm-swal-text { margin: 0 0 .8rem; color: #66757a; font-size: .92rem; }
.adm-swal-list { display: flex; flex-direction: column; gap: .35rem; max-height: 320px; overflow-y: auto; text-align: left; }
.adm-swal-option { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .65rem .8rem; border: 1px solid #e5e7e3; border-radius: 10px; background: #fff; font-size: .9rem; cursor: pointer; color: #1b2a2d; }
.adm-swal-option i { color: #0f7e7a; }
.adm-swal-option small { display: block; color: #66757a; font-size: .78rem; }
.adm-swal-option:hover { border-color: #b9e0dd; background: #f7fbfa; }
.adm-swal-option.is-selected { border-color: #0f7e7a; background: #e3f2f1; box-shadow: 0 0 0 2px rgba(15, 126, 122, .2); }

@media (max-width: 680px) {
  .adm-toolbar .adm-select { flex: 1 1 150px; min-width: 0; }
  .adm-toolbar .adm-date-wrap { flex: 1 1 140px; min-width: 0; }
  .adm-back-web { padding: .4rem .6rem; }
}
