/* ==========================================================================
   DATE-PICKER-1 — the Shopify-style calendar, one stylesheet for the whole admin.
   Used by (a) the dashboard period control (.dpk, .dpk-pill, .dpk-menu, .dpk-pop) and
           (b) EVERY <input type="date"> via js/date-picker.js (.dpk-field trigger + .dpk-float popover).
   Calendar cells (.dpk-cal, .dpk-d, ...) are shared. Load after admin.css / page-unify.css / press-effect.css.
   Roll back: remove this <link> and js/date-picker.js (native date inputs come back untouched).
   ========================================================================== */

/* ---- PAGES-UNIFY-2: dashboard period picker (preset pill + date pill + two-month calendar). Desktop only (the bar is display:none on phones). ---- */
.dpk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dpk-host { position: relative; }
.dpk-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 12px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; color: #0F172A; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 20px; cursor: pointer; box-shadow: 0 1px 0 rgba(15, 23, 42, .06), inset 0 -1px 0 rgba(15, 23, 42, .08); }
.dpk-pill:hover { background: #F8FAFC; }
.dpk-pill:active { }
.dpk-pill:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.dpk-pill .ai { width: 16px; height: 16px; color: #616161; }
.dpk-pill[aria-expanded="true"] { background: #F1F5F9; }
.dpk-chev { width: 14px !important; height: 14px !important; }
.dpk-menu, .dpk-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); }
.dpk-menu[hidden], .dpk-pop[hidden] { display: none; }
.dpk-menu { min-width: 190px; padding: 4px; }
.dpk-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: #303030; font-family: inherit; font-size: 13px; font-weight: 500; line-height: 20px; text-align: left; cursor: pointer; }
.dpk-menu button:hover { background: #F1F1F1; }
.dpk-menu button[aria-selected="true"] { background: #E3F4EB; color: var(--color-primary-hover); font-weight: 600; }
.dpk-pop { padding: 12px 16px 12px; width: max-content; }
.dpk-inputs { display: flex; gap: 8px; margin-bottom: 12px; }
.dpk-in { flex: 1; min-width: 0; padding: 4px 12px; border: 1px solid #94A3B8; border-radius: 8px; }
.dpk-in span { display: block; font-size: 12px; line-height: 16px; color: #64748B; }
.dpk-in b { display: block; font-size: 13px; line-height: 20px; font-weight: 600; color: #0F172A; }
.dpk-cals { display: flex; gap: 24px; }
.dpk-cal { width: 224px; }
.dpk-cal-h { display: flex; align-items: center; justify-content: space-between; height: 32px; margin-bottom: 4px; }
.dpk-cal-h b { font-size: 13px; font-weight: 650; color: #0F172A; }
.dpk-nav, .dpk-nav-sp { width: 28px; height: 28px; }
.dpk-nav { display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #616161; cursor: pointer; }
.dpk-nav:hover:not(:disabled) { background: #F1F1F1; color: #303030; }
.dpk-nav:disabled { opacity: .35; cursor: default; }
.dpk-grid { display: grid; grid-template-columns: repeat(7, 32px); row-gap: 2px; }
.dpk-grid i { display: grid; place-items: center; height: 24px; font-style: normal; font-size: 11px; font-weight: 500; color: #64748B; }
.dpk-d { position: relative; height: 32px; width: 32px; border: 0; border-radius: 8px; background: transparent; color: #303030; font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; cursor: pointer; }
.dpk-d:hover:not(:disabled):not(.is-start):not(.is-end) { background: #F1F1F1; }
.dpk-d:disabled { color: #CBD5E1; cursor: default; }
.dpk-d.is-today:not(.is-start):not(.is-end) { box-shadow: inset 0 0 0 1px #94A3B8; }
.dpk-d.in-range { background: #E3F4EB; border-radius: 0; color: #0F172A; }
.dpk-d.in-range:hover { background: #BFE3CE !important; }
.dpk-d.is-start, .dpk-d.is-end { background: var(--color-primary); color: #fff; font-weight: 600; }
.dpk-d.cap-l { border-radius: 8px 0 0 8px; }
.dpk-d.cap-r { border-radius: 0 8px 8px 0; }
.dpk-d:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; z-index: 1; }
.dpk-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #E2E8F0; }
.dpk-foot .btn { width: auto; height: 28px; min-height: 28px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* ---- Every <input type="date">: native input hidden, this trigger shown in its place (js/date-picker.js) ---- */
input.dpk-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; border: 0 !important; opacity: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; pointer-events: none !important; }
button.dpk-field { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 140px; height: 32px; padding: 0 12px; border: 1px solid #94A3B8; border-radius: 8px; background: #fff; color: #0F172A; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 20px; text-align: left; cursor: pointer; box-shadow: none; }
button.dpk-field:hover:not(:disabled) { border-color: #64748B; }
button.dpk-field:focus-visible, button.dpk-field[aria-expanded="true"] { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-focus-ring); }
button.dpk-field:disabled { opacity: .55; cursor: not-allowed; background: #F7F7F7; }
button.dpk-field:not(:disabled):active { translate: none; box-shadow: none; }
button.dpk-field svg { flex: none; width: 16px; height: 16px; color: #616161; }
.dpk-field-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpk-field-tx.is-empty { color: #64748B; }
.edm-date button.dpk-field { width: auto; }
.dpk-float { position: fixed; z-index: 1100; padding: 12px 16px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); }
.dpk-float[hidden] { display: none; }
.dpk-foot .dpk-sp { margin-right: auto; }
.dpk-nav-sp { display: block; }
@media (max-width: 640px) { .dpk-cals { gap: 0; } }
