/* ===== schedlog1106 (Nov 6 2026): Schedule & Log matched to Calculator + Stacks + Journals =====
   Scope: #panel-log only. Staging alias schedlog1106. Nothing live. */

/* Card rhythm: 8px like --sd-g / --std-row (kills leftover inline margin-top:16px) */
html body[data-page="stack"] #panel-log .log-grid{gap:8px!important}
html body[data-page="stack"] #panel-log .log-grid > *{display:flex;flex-direction:column;gap:8px}
html body[data-page="stack"] #panel-log .log-grid .card,
html body[data-page="stack"] #panel-log .log-grid .card-grad,
html body[data-page="stack"] #panel-log .ruo-strip{
  margin-top:0!important;margin-bottom:0!important
}
html body[data-page="stack"] #panel-log > .ruo-strip{margin-top:8px!important}

/* Card heads: 6px under title row (kills inline margin-bottom:12/14px) */
html body[data-page="stack"] #panel-log .card-head{margin-bottom:6px!important;gap:6px!important}
html body[data-page="stack"] #panel-log .card-head .h3,
html body[data-page="stack"] #panel-log .card-head h2{
  font-size:15px!important;line-height:1.2!important;margin:0!important
}

/* Status hero figure stays a figure (not a 15px card title); keep readable, not 26px phone blow-up */
html body[data-page="stack"] #panel-log #stTitle.status-title{
  font-size:22px!important;font-weight:850;letter-spacing:-.02em;margin-top:2px!important;line-height:1.15!important
}

/* Action row already centered via .stk-acts; keep 8px under it before cmp-tabs */
html body[data-page="stack"] #panel-log .stk-acts{margin:0 0 8px!important;justify-content:center!important;gap:6px!important}
html body[data-page="stack"] #panel-log .cmp-tabs{
  display:flex!important;flex-wrap:wrap!important;justify-content:center!important;
  gap:6px!important;margin:0 0 8px!important;overflow-x:auto;scrollbar-width:none
}
html body[data-page="stack"] #panel-log .cmp-tabs::-webkit-scrollbar{display:none}
html body[data-page="stack"] #panel-log .cmp-tabs button{
  min-height:0!important;height:28px!important;padding:0 12px!important;font-size:13px!important;
  line-height:1!important;border-radius:999px!important;flex:0 0 auto!important
}

/* Exclusive single-select: unselected quieter; only .active / [aria-checked=true] / [aria-pressed=true] keeps selected tint.
   Mirrors trackers1105 Journals fix against the global :where(main button) ring. */
html body[data-page="stack"] #panel-log .seg > button:not(.active):not([aria-checked=true]):not([aria-pressed=true]),
html body[data-page="stack"] #panel-log .seg > button:not(.active):not([aria-checked=true]):not([aria-pressed=true]):hover,
html body[data-page="stack"] #panel-log .cmp-tabs > button:not(.active),
html body[data-page="stack"] #panel-log .cmp-tabs > button:not(.active):hover,
html body[data-page="stack"] #panel-log .freq-days > button:not(.active):not([aria-pressed=true]),
html body[data-page="stack"] #panel-log .freq-days > button:not(.active):not([aria-pressed=true]):hover,
html body[data-page="stack"] #panel-log .tz-mode > button:not([aria-checked=true]),
html body[data-page="stack"] #panel-log .tz-mode > button:not([aria-checked=true]):hover,
html body[data-page="stack"] #panel-log .sites .chip:not(.active):not([aria-pressed=true]),
html body[data-page="stack"] #panel-log .sites .chip:not(.active):not([aria-pressed=true]):hover{
  background:rgba(255,255,255,.04)!important;
  border:1.5px solid rgba(255,255,255,.14)!important;
  color:var(--muted,#A9A9BC)!important;
  box-shadow:none!important;
  filter:none!important
}
html body[data-page="stack"] #panel-log .seg > button.active,
html body[data-page="stack"] #panel-log .seg > button.active:hover,
html body[data-page="stack"] #panel-log .seg > button[aria-checked=true],
html body[data-page="stack"] #panel-log .seg > button[aria-pressed=true],
html body[data-page="stack"] #panel-log .cmp-tabs > button.active,
html body[data-page="stack"] #panel-log .cmp-tabs > button.active:hover,
html body[data-page="stack"] #panel-log .freq-days > button.active,
html body[data-page="stack"] #panel-log .freq-days > button[aria-pressed=true],
html body[data-page="stack"] #panel-log .tz-mode > button[aria-checked=true],
html body[data-page="stack"] #panel-log .tz-mode > button[aria-checked=true]:hover,
html body[data-page="stack"] #panel-log .sites .chip.active,
html body[data-page="stack"] #panel-log .sites .chip[aria-pressed=true]{
  background:var(--pw-tint2,linear-gradient(90deg,rgba(230,25,230,.38),rgba(128,0,255,.38) 55%,rgba(0,128,255,.38))) padding-box,linear-gradient(var(--btn-fill,#0E0E16),var(--btn-fill,#0E0E16)) padding-box,var(--btn-ring,linear-gradient(90deg,#E619E6,#0080FF)) border-box!important;
  border:1.5px solid transparent!important;
  color:#fff!important
}

/* Center exclusive seg / unit rows */
html body[data-page="stack"] #panel-log .seg{
  width:max-content!important;max-width:100%;margin-left:auto;margin-right:auto
}
html body[data-page="stack"] #panel-log .field:has(> .seg),
html body[data-page="stack"] #panel-log div:has(> .seg#hlRange),
html body[data-page="stack"] #panel-log .tz-per-row{
  display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:6px!important
}
html body[data-page="stack"] #panel-log .tz-per-row{justify-content:space-between!important}
html body[data-page="stack"] #panel-log .freq-days{
  display:flex!important;flex-wrap:wrap!important;justify-content:center!important;gap:6px!important;margin-top:8px!important
}
html body[data-page="stack"] #panel-log .freq-days > button{
  min-height:0!important;height:34px!important;min-width:34px!important;padding:0 8px!important;
  font-size:13px!important;line-height:1!important;border-radius:999px!important;aspect-ratio:auto!important
}

/* Titration mode cards: keep two-col grid, quieter unselected already set above */
html body[data-page="stack"] #panel-log .tz-mode{margin-top:8px!important;gap:6px!important}
html body[data-page="stack"] #panel-log .tz-mode > button{text-align:left;min-height:0!important;height:auto!important;padding:10px 12px!important;border-radius:14px!important}
html body[data-page="stack"] #panel-log .tz-mode > button b{font-size:13.5px!important;line-height:1.25;color:inherit}
html body[data-page="stack"] #panel-log .tz-mode > button span{font-size:12px!important;line-height:1.3;color:var(--muted,#A9A9BC)}

/* Primary block CTAs ~40px like Check-In Save / Calc btn-lg */
html body[data-page="stack"] #panel-log :is(#lSave,#tSave,#logCta,.card-grad > a.btn-grad.btn-block,a.btn-grad.btn-lg.btn-block){
  height:auto!important;min-height:40px!important;padding:0 16px!important;font-size:14px!important;
  line-height:1!important;border-radius:999px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important
}
html body[data-page="stack"] #panel-log .btn-block{width:100%}

/* Date / time / datetime-local: vertical ink center (reinforce startdate1105 inside this panel) */
html body[data-page="stack"] #panel-log input:is([type=date],[type=time],[type=datetime-local]){
  display:flex!important;align-items:center!important;
  height:34px!important;min-height:0!important;
  padding-top:0!important;padding-bottom:0!important;
  line-height:normal!important;box-sizing:border-box!important;
  -webkit-appearance:none!important;appearance:none!important
}
html body[data-page="stack"] #panel-log input:is([type=date],[type=time],[type=datetime-local])::-webkit-date-and-time-value{
  margin:0!important;padding:0!important;min-height:0!important;line-height:normal!important;text-align:left
}
html body[data-page="stack"] #panel-log input:is([type=date],[type=time],[type=datetime-local])::-webkit-datetime-edit{
  padding:0!important;margin:0!important;line-height:normal!important;display:flex;align-items:center
}
html body[data-page="stack"] #panel-log input:is([type=date],[type=time],[type=datetime-local])::-webkit-datetime-edit-fields-wrapper{
  padding:0!important;line-height:normal!important
}

/* No clip on date/select at phone width — stack narrow row2 */
@media (max-width:430px){
  html body[data-page="stack"] #panel-log .row2{
    grid-template-columns:minmax(0,1fr)!important;gap:8px!important
  }
  html body[data-page="stack"] #panel-log .row2 .field{margin:0!important}
  html body[data-page="stack"] #panel-log input:is([type=date],[type=time],[type=datetime-local]),
  html body[data-page="stack"] #panel-log select.input,
  html body[data-page="stack"] #panel-log .tz-select{
    width:100%!important;max-width:100%!important;min-width:0!important
  }
}

/* Selects / inputs stay 34px std */
html body[data-page="stack"] #panel-log select.input,
html body[data-page="stack"] #panel-log .input:not(textarea){
  height:34px!important;min-height:0!important;box-sizing:border-box!important
}

/* Soft pills (Edit, Hold, Export) stay btn-sm 28px — already from stack-std */
html body[data-page="stack"] #panel-log .card-head .btn-sm{
  height:28px!important;min-height:0!important;padding:0 11px!important;font-size:13px!important
}

/* Notify / dose reminders block: tighter padding to match card pad */
html body[data-page="stack"] #panel-log .notify-opt{
  margin-top:8px!important;padding:10px 12px!important;border-radius:14px!important;gap:10px!important
}
html body[data-page="stack"] #panel-log .notify-opt .txt b{font-size:14px!important}
html body[data-page="stack"] #panel-log .notify-opt .btn-sm{
  height:28px!important;min-height:0!important;padding:0 11px!important;font-size:12.5px!important;flex:none!important
}

/* History export control: quiet pill, not a full selected CTA */
html body[data-page="stack"] #panel-log #csvBtn{
  background:rgba(255,255,255,.04)!important;border:1.5px solid rgba(255,255,255,.14)!important;
  color:var(--muted,#A9A9BC)!important;box-shadow:none!important;
  height:28px!important;min-height:0!important;padding:0 12px!important;font-size:12.5px!important;
  border-radius:999px!important
}

/* Chromium @1280: datetime-local in a 2-col row2 clipped (~240px value in ~219px cell).
   Span Date & time full width so Amount drops under it — no truncation. */
html body[data-page="stack"] #panel-log #logForm .row2{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px!important
}
html body[data-page="stack"] #panel-log #logForm .row2 > .field:has(#lWhen){
  grid-column:1 / -1!important;min-width:0!important
}
html body[data-page="stack"] #panel-log #lWhen{
  width:100%!important;max-width:100%!important;min-width:0!important;
  padding-left:10px!important;padding-right:10px!important
}
@media (max-width:430px){
  html body[data-page="stack"] #panel-log #logForm .row2{
    grid-template-columns:minmax(0,1fr)!important
  }
}

/* schedfix2112: owner Schedule & Log corrections; no other panel changes. */
html body[data-page="stack"] #panel-log #lNotes{
  box-sizing:border-box!important;height:44px;min-height:44px!important;
  padding:10px 12px!important;line-height:21px!important;resize:vertical;
  border-radius:22px!important;overflow-y:auto
}
html body[data-page="stack"] #panel-log .hl-controls{
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-wrap:wrap!important;gap:8px!important;background:none!important;border:0!important;
  padding:0!important;box-shadow:none!important
}
html body[data-page="stack"] #panel-log #hlVal{
  width:72px!important;flex:0 0 72px!important;min-width:0!important;
  height:34px!important;padding:0 10px!important;border-radius:999px!important
}
html body[data-page="stack"] #panel-log :is(#hlUnit,#hlRange){
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex-wrap:wrap!important;gap:8px!important;padding:0!important;margin:0 auto!important;
  background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important
}
html body[data-page="stack"] #panel-log :is(#hlUnit,#hlRange)::before,
html body[data-page="stack"] #panel-log :is(#hlUnit,#hlRange)::after{display:none!important}
html body[data-page="stack"] #panel-log :is(#hlUnit,#hlRange)>button{
  flex:0 0 auto!important;height:34px!important;min-height:34px!important;
  margin:0!important;padding:0 12px!important;border-radius:999px!important;
  line-height:1!important;white-space:nowrap!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important
}

/* hlcenter2325: owner 11:20 — Units drawn as compact as Amount (Amount sits in one half of the 2-col row2 above 430px). */
@media (min-width:431px){
  html body[data-page="stack"] #panel-log #logForm .field:has(> .input-group #lUnits) > .input-group{
    width:calc(50% - 4px)!important;max-width:calc(50% - 4px)!important
  }
}

/* hlpills2325: owner 11:22 — one consistent pill system for the Estimated Level controls (Half-life hrs/days + Show 7/14/30).
   Both fields: label centered over a centered 34px control row; same gaps, same pill height/padding/type; brand btn-soft / .seg active only. */
html body[data-page="stack"] #panel-log #hlCard > .row2{align-items:start!important;gap:12px!important}
html body[data-page="stack"] #panel-log #hlCard > .row2 > .field{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;
  flex-wrap:nowrap!important;gap:6px!important;margin:0!important;min-width:0!important
}
html body[data-page="stack"] #panel-log #hlCard > .row2 > .field > label{
  margin:0!important;padding:0!important;width:auto!important;text-align:center!important;line-height:16px!important
}
html body[data-page="stack"] #panel-log #hlCard .hl-controls{
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:6px!important;margin:0!important
}
html body[data-page="stack"] #panel-log #hlCard :is(#hlUnit,#hlRange){
  display:flex!important;flex-wrap:nowrap!important;gap:6px!important;margin:0!important;width:auto!important
}
html body[data-page="stack"] #panel-log #hlCard #hlVal,
html body[data-page="stack"] #panel-log #hlCard :is(#hlUnit,#hlRange) > button{
  box-sizing:border-box!important;height:34px!important;min-height:34px!important;
  font-size:13px!important;font-weight:700!important;line-height:1!important;border-radius:999px!important
}
html body[data-page="stack"] #panel-log #hlCard #hlVal{width:64px!important;flex:0 0 64px!important;padding:0 8px!important;text-align:center!important}
html body[data-page="stack"] #panel-log #hlCard :is(#hlUnit,#hlRange) > button{
  min-width:48px!important;padding:0 12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;white-space:nowrap!important
}

/* histcenter2325: owner 11:22 — History empty-state message centered like its heading/Export pill. Rows (populated) keep their tabular left alignment. */
html body[data-page="stack"] #panel-log #histList > p.muted:only-child{text-align:center!important;margin-left:auto!important;margin-right:auto!important}

/* csvcenter2325: owner 11:23 — History header: title then Export CSV, each centered; pill text centered on both axes. Normal flow, no overlay. */
html body[data-page="stack"] #panel-log .card-head:has(> #csvBtn){
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;gap:6px!important
}
html body[data-page="stack"] #panel-log #csvBtn{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;
  box-sizing:border-box!important;height:28px!important;min-height:28px!important;padding:0 12px!important;
  line-height:1!important;text-align:center!important;vertical-align:middle!important;margin:0!important
}
