/* Phone Farm (SFW space). Page-scoped like remotes.css; only studio tokens, so the theme retints it.
   Sidebar gate (fail-closed): only with html.has-phone-farm (auth.js: private account + org flag + role),
   never outside SFW. navigateTo rebounds the route as well. */
html:not(.has-phone-farm) .sidebar__item[data-page="phonefarm"],
html:not(.has-phone-farm) .sidebar__group-label[data-group="phonefarm"],
html:not(.has-sfw-full) .sidebar__item[data-page="phonefarm"],
html:not(.has-sfw-full) .sidebar__group-label[data-group="phonefarm"],
html:not([data-space="sfw"]) .sidebar__item[data-page="phonefarm"],
html:not([data-space="sfw"]) .sidebar__group-label[data-group="phonefarm"] { display: none !important; }

#page-phonefarm { min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 4px; }
#page-phonefarm [hidden], .pf-modal [hidden] { display: none !important; }
.pf-page { width: 100%; max-width: 1500px; margin: 0 auto; color: var(--text-soft); }
.pf-page:has(.pf-dashboard) { max-width: none; }
.pf-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pf-help { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin: 4px 0; }
.pf-status { font-size: 12px; line-height: 1.6; color: var(--text-muted); margin: 8px 0; overflow-wrap: anywhere; }
.pf-status:empty { display: none; }
.pf-status.is-error, .pf-events.is-error, .pf-picker.is-error { color: #ffaaa5; }
.pf-warning { color: var(--warning); font-size: 12px; line-height: 1.55; margin: 6px 0; }

.pf-tabs-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 10px; }
.pf-tabs-row > .pf-btn { flex: none; min-height: 36px; }
.pf-tabs { display: flex; flex: 1; min-width: 0; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.pf-tabs .pf-tab { flex: none; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 10px; min-height: 36px; color: var(--text-muted); }
.pf-tab.is-active { color: var(--text-primary); border-bottom-color: var(--accent); background: none; }
.pf-tab:hover:not(:disabled) { background: var(--accent-soft); border-color: transparent; border-bottom-color: var(--accent-ring); }

.pf-card { min-width: 0; border: 1px solid var(--border-soft); border-radius: 16px; background: rgba(255,255,255,.025); padding: 20px; margin-bottom: 18px; }
.pf-card h3 { margin: 0 0 6px; color: var(--text-primary); font-size: 14px; font-weight: 600; }

.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border: 1px solid var(--border-medium); border-radius: 8px; padding: 7px 12px; background: rgba(255,255,255,.045); color: var(--text-soft); font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.pf-btn:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-ring); }
.pf-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pf-btn--primary:hover:not(:disabled) { background: var(--accent); opacity: .88; }
.pf-btn--danger { color: #ffaaa5; }
.pf-btn--toggle.is-on { color: #9be7b0; border-color: rgba(155, 231, 176, .45); }
.pf-btn:disabled { opacity: .42; cursor: not-allowed; }
.pf-btn:focus-visible, .pf-input:focus-visible, .pf-tile:focus-visible, .pf-device:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pf-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border-medium); border-radius: 8px; padding: 9px 11px; background: rgba(0,0,0,.22); color: var(--text-primary); font-family: inherit; font-size: 13px; min-width: 0; color-scheme: dark; }
textarea.pf-input { resize: vertical; }
.pf-select { width: auto; min-width: 160px; }
.pf-select option { background: #111; color: #eee; }
.pf-label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--text-muted); min-width: 0; }
.pf-label-text { font-size: 11px; color: var(--text-muted); }
.pf-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pf-form > .pf-btn { align-self: flex-start; }
.pf-inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.pf-inline-form .pf-label { flex: 1; min-width: 180px; }
.pf-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
.pf-toolbar--tight { margin: 0; }
.pf-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pf-row > .pf-label { flex: 1; min-width: 160px; }
.pf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.pf-check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* status dots */
.pf-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.pf-state--online .pf-dot { background: #3ccf7a; }
.pf-state--busy .pf-dot { background: var(--warning); }
.pf-state--error .pf-dot { background: #ff6b63; }
.pf-state--offline .pf-dot { background: var(--text-faint); }

/* phones grid */
.pf-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 12px; }
.pf-grid > .pf-device { flex: 0 1 max(280px, calc(var(--pf-card-height, 600px) * .5)); max-width: 100%; }
.pf-device { display: flex; flex-direction: column; gap: 6px; height: var(--pf-card-height, auto); min-height: min-content; box-sizing: border-box; text-align: left; padding: 10px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.025); color: inherit; font: inherit; min-width: 0; transition: border-color .15s; }
.pf-device:hover { border-color: var(--accent-ring); }
.pf-device.is-selected { border-color: var(--accent-ring); background: var(--accent-soft); }
.pf-device-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex-shrink: 0; }
.pf-device-top { display: flex; justify-content: space-between; gap: 4px; align-items: flex-start; flex-wrap: wrap; }
.pf-device-name { color: var(--text-primary); font-size: 13px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; margin: 0; }
.pf-device-handle { font-size: 11px; line-height: 1.4; color: var(--text-soft); overflow-wrap: anywhere; }
.pf-empty-card h3 { font-size: 16px; }
.pf-fleet-head { margin-bottom: 10px; }
.pf-fleet-head h3 { margin: 0; color: var(--text-primary); font-size: 15px; }
.pf-fleet-head .pf-help { font-size: 11px; line-height: 1.4; margin: 0; }
.pf-preview { position: relative; display: flex; justify-content: center; align-items: center; height: 100%; min-height: 0; width: 100%; contain: size; overflow: hidden; background: #050506; border: 1px solid var(--border-soft); border-radius: 12px; }
.pf-preview img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.pf-preview .pf-screen-empty { padding: 14px; }
.pf-preview.is-controlling { touch-action: none; cursor: crosshair; }
.pf-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-device-footer { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.pf-device-footer > .pf-toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.pf-device-footer > .pf-toolbar:last-child { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-device-footer .pf-btn { min-width: 0; min-height: 30px; padding: 5px 4px; font-size: 11px; line-height: 1.2; }
.pf-preview-status { color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.pf-device-display { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: start; gap: 8px; flex: 1 1 0px; min-height: min-content; }
.pf-side-controls { display: grid; grid-template-columns: repeat(2, 40px); gap: 4px; align-content: start; }
.pf-side-btn { width: 40px; min-height: 32px; padding: 4px 2px; font-size: 10px; }
.pf-side-btn[data-label^="Swipe"] { font-size: 17px; }
.pf-device-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: start; flex-shrink: 0; }
.pf-device-editor .pf-input { height: 36px; min-height: 36px; line-height: 1.25; padding: 6px 8px; }
.pf-device-editor .pf-toolbar { margin: 0; gap: 4px; flex-wrap: nowrap; }
.pf-device-editor .pf-btn { min-height: 32px; padding: 5px 7px; font-size: 11px; }
.pf-control-status { margin: 0; flex-shrink: 0; }
.pf-mode-controls { margin: 0; flex-shrink: 0; }
.pf-focus-bar { margin-bottom: 14px; }
.pf-dashboard, .pf-phone-layout { animation: pf-enter .16s ease-out; }
@keyframes pf-enter { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pf-dashboard, .pf-phone-layout { animation: none; }
}

.pf-token { border: 1px solid var(--accent-ring); background: var(--accent-soft); border-radius: 12px; padding: 14px; margin: 12px 0; }
.pf-token-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pf-token-value { flex: 1; min-width: 200px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.pf-agent-list { margin-top: 8px; }
.pf-agent { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.pf-agent-info { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pf-agent-info strong { color: var(--text-soft); font-size: 13px; }

/* phone detail */
.pf-phone-layout { display: grid; grid-template-columns: minmax(280px, max(380px, calc(var(--pf-card-height, 760px) * .6))) minmax(260px, 1fr); gap: 18px; align-items: start; }
.pf-phone-side { min-width: 0; }
.pf-phone-layout .pf-device { padding: 8px; }
.pf-phone-layout .pf-device-display { min-height: min-content; }
.pf-focus-controls .pf-mode-controls { margin-top: 12px; }
.pf-focus-controls .pf-device-editor { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
.pf-focus-controls .pf-device-editor .pf-input { height: 80px; min-height: 80px; }
.pf-focus-controls .pf-device-editor .pf-toolbar { justify-content: flex-end; }
.pf-screen-empty { position: absolute; max-width: 300px; padding: 24px; text-align: center; color: var(--text-muted); font-size: 12px; line-height: 1.6; }

/* schedule */
.pf-calendar { overflow-wrap: anywhere; }
.pf-calendar .pf-toolbar { min-width: 0; max-width: 100%; }
.pf-calendar .pf-select { max-width: 100%; }
.pf-calendar-nav { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.pf-calendar-month { flex: 1; margin: 0; min-width: 0; color: var(--text-primary); font-size: 21px; font-weight: 600; line-height: 1.3; }
.pf-calendar-month-controls { display: flex; gap: 4px; flex: none; }
.pf-calendar-arrow { min-width: 36px; padding: 3px 10px; font-size: 23px; line-height: 1; }
.pf-calendar-today { flex: none; }
.pf-calendar-weekdays, .pf-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; min-width: 0; }
.pf-calendar-weekdays { margin: 18px 0 8px; text-align: center; color: var(--text-muted); font-size: 11px; font-weight: 600; }
.pf-calendar-day { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; min-height: 162px; padding: 6px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-secondary); text-align: left; }
.pf-calendar-day.is-adjacent .pf-calendar-date { color: var(--text-muted); }
.pf-calendar-day.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pf-calendar-date { box-sizing: border-box; justify-content: space-between; min-height: 30px; min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text-primary); }
.pf-calendar-number { display: inline-flex; align-items: center; justify-content: center; min-width: 27px; height: 27px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.pf-calendar-count { padding-right: 4px; font-size: 10px; color: var(--text-muted); }
.pf-calendar-day.is-today .pf-calendar-number { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.pf-calendar-event { box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; min-width: 0; min-height: 39px; width: 100%; border: 1px solid var(--accent-ring); border-left: 3px solid var(--accent); border-radius: 5px; padding: 4px 5px; background: var(--accent-soft); color: var(--text-primary); font-size: 10px; line-height: 1.4; text-align: left; }
.pf-calendar-event-top { display: flex; justify-content: space-between; align-items: center; gap: 3px; min-width: 0; }
.pf-calendar-event-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-calendar-network { font-size: 9px; font-weight: 700; color: var(--accent); }
.pf-calendar-event-phone { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-soft); }
.pf-calendar-more { justify-content: flex-start; min-height: 26px; padding: 2px; border: 0; background: transparent; font-size: 10px; line-height: 1.3; color: var(--accent); }
.pf-calendar-agenda { min-width: 0; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.pf-calendar-agenda h4 { color: var(--text-primary); margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.pf-calendar-empty { margin: 0; padding: 18px; border: 1px dashed var(--border-medium); border-radius: 10px; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.pf-job { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--border-soft); }
.pf-job-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pf-job-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-job-line strong { color: var(--text-primary); font-size: 13px; }
.pf-job-caption { font-size: 12px; color: var(--text-soft); margin: 2px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.pf-job-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.pf-calendar-post { align-items: stretch; justify-content: flex-start; padding: 10px; border-color: transparent; background: transparent; text-align: left; }
.pf-calendar-post .pf-help { margin: 0; }
.pf-calendar-post .pf-job-caption { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-calendar-network-label { border: 1px solid var(--border-medium); border-radius: 999px; padding: 2px 7px; color: var(--text-soft); font-size: 10px; }
.pf-calendar-preview-hint { margin-top: 4px; color: var(--accent); font-size: 11px; }
/* Schedule states: pending (due or in progress), failed (Retry) and not confirmed. */
.pf-calendar-state { border: 1px solid var(--border-medium); border-radius: 999px; padding: 2px 7px; color: var(--text-soft); font-size: 10px; }
.pf-calendar-state--pending { border-color: var(--accent-ring); color: var(--accent); }
.pf-calendar-state--failed { border-color: rgba(255, 107, 99, .45); color: #ff8a84; }
.pf-calendar-state--uncertain { border-color: rgba(255, 196, 92, .45); color: #ffc45c; }
.pf-calendar-event-state { display: block; font-size: 9px; font-weight: 700; }
.pf-calendar-event--pending .pf-calendar-event-state { color: var(--accent); }
.pf-calendar-event--failed { border-color: rgba(255, 107, 99, .45); border-left-color: #ff6b63; background: rgba(255, 107, 99, .08); }
.pf-calendar-event--failed .pf-calendar-event-state { color: #ff8a84; }
.pf-calendar-event--uncertain { border-color: rgba(255, 196, 92, .45); border-left-color: #ffc45c; background: rgba(255, 196, 92, .08); }
.pf-calendar-event--uncertain .pf-calendar-event-state { color: #ffc45c; }
/* Schedule: finished posts stay on the calendar */
.pf-calendar-state--published { border-color: rgba(126, 226, 168, .42); color: #7ee2a8; }
.pf-calendar-state--off { color: var(--text-muted); }
.pf-calendar-event--published { border-color: rgba(126, 226, 168, .42); border-left-color: #7ee2a8; background: rgba(126, 226, 168, .08); }
.pf-calendar-event--published .pf-calendar-event-state { color: #7ee2a8; }
.pf-calendar-event--off { border-color: var(--border-medium); border-left-color: var(--text-muted); background: rgba(255, 255, 255, .03); color: var(--text-muted); }
.pf-calendar-event--off .pf-calendar-event-time { text-decoration: line-through; }
.pf-calendar .pf-toolbar .ss-combo { width: auto; min-width: 170px; }
.pf-calendar-nav { flex-wrap: wrap; }
.pf-calendar-month::first-letter { text-transform: uppercase; }
.pf-calendar-view { min-width: 0; }
.pf-calendar-agenda[hidden] { display: none; }
/* Week / Month / Day switch */
.pf-seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; border: 1px solid var(--border-medium); border-radius: 10px; background: rgba(0, 0, 0, .22); }
.pf-seg-btn { min-height: 28px; padding: 4px 14px; border: 0; border-radius: 7px; background: none; color: var(--text-muted); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.pf-seg-btn:hover { color: var(--text-primary); }
.pf-seg-btn.is-active { background: var(--accent); color: var(--on-accent); }
.pf-seg-btn:focus-visible, .pf-tg-day:focus-visible, .pf-ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 4px; }
.pf-calendar-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.pf-calendar-key::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
/* Post state colours for the hour grid and the legend */
.pf-ev--scheduled, .pf-calendar-key--scheduled { --st: var(--accent); --st-bg: var(--accent-soft); --st-line: var(--accent-ring); }
.pf-ev--pending, .pf-calendar-key--pending { --st: #8cc8ff; --st-bg: rgba(140, 200, 255, .13); --st-line: rgba(140, 200, 255, .45); }
.pf-ev--published, .pf-calendar-key--published { --st: #7ee2a8; --st-bg: rgba(126, 226, 168, .12); --st-line: rgba(126, 226, 168, .42); }
.pf-ev--uncertain, .pf-calendar-key--uncertain { --st: #ffc45c; --st-bg: rgba(255, 196, 92, .1); --st-line: rgba(255, 196, 92, .45); }
.pf-ev--failed, .pf-calendar-key--failed { --st: #ff8a84; --st-bg: rgba(255, 107, 99, .1); --st-line: rgba(255, 107, 99, .45); }
.pf-ev--off, .pf-calendar-key--off { --st: var(--text-muted); --st-bg: rgba(255, 255, 255, .04); --st-line: var(--border-medium); }
/* Week / Day: hour-by-hour grid */
.pf-tg { min-width: 0; }
.pf-tg-scroll { --pf-tg-bg: var(--bg-secondary, #15151a); max-height: min(66dvh, 760px); overflow: auto; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--pf-tg-bg); scrollbar-width: thin; scrollbar-color: var(--border-medium) transparent; overscroll-behavior: contain; }
.pf-tg-inner { min-width: calc(52px + var(--pf-tg-cols) * var(--pf-tg-min, 0px)); }
.pf-tg--day .pf-tg-inner { --pf-tg-min: 150px; }
.pf-tg-head, .pf-tg-body { display: grid; grid-template-columns: 52px repeat(var(--pf-tg-cols), minmax(var(--pf-tg-min, 0px), 1fr)); }
.pf-tg-head { position: sticky; top: 0; z-index: 3; background: var(--pf-tg-bg); border-bottom: 1px solid var(--border-medium); }
.pf-tg-corner { position: sticky; left: 0; z-index: 1; background: var(--pf-tg-bg); }
.pf-tg-day { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 46px; padding: 6px 8px; border: 0; border-left: 1px solid var(--border-soft); background: none; color: var(--text-soft); font-family: inherit; font-size: 12px; }
button.pf-tg-day { cursor: pointer; transition: background .15s; }
button.pf-tg-day:hover { background: var(--accent-soft); }
.pf-tg-day-top { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.pf-tg-day-main { min-width: 0; color: var(--text-primary); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-tg-day.is-today .pf-tg-day-main { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.pf-tg-day-count { flex: none; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-ring); color: var(--accent); font-size: 10px; font-weight: 600; text-align: center; }
.pf-tg-body { height: calc(24 * var(--pf-tg-hour)); }
.pf-tg-hours { position: sticky; left: 0; z-index: 2; background: var(--pf-tg-bg); }
.pf-tg-hour { display: block; height: var(--pf-tg-hour); padding-right: 8px; box-sizing: border-box; color: var(--text-muted); font-size: 10px; line-height: 1; text-align: right; transform: translateY(-5px); font-variant-numeric: tabular-nums; }
.pf-tg-col { position: relative; min-width: 0; border-left: 1px solid var(--border-soft); background: repeating-linear-gradient(to bottom, var(--border-soft) 0, var(--border-soft) 1px, transparent 1px, transparent var(--pf-tg-hour)); }
.pf-tg-col.is-today { background-color: rgba(255, 255, 255, .025); }
.pf-tg-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #ff7a70; z-index: 1; pointer-events: none; }
.pf-tg-now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #ff7a70; }
.pf-ev { position: absolute; display: flex; flex-direction: column; justify-content: center; gap: 1px; box-sizing: border-box; min-width: 0; padding: 3px 7px; border: 1px solid var(--st-line); border-left: 3px solid var(--st); border-radius: 7px; background: linear-gradient(var(--st-bg), var(--st-bg)), var(--pf-tg-bg); color: var(--text-primary); font-family: inherit; text-align: left; overflow: hidden; cursor: pointer; z-index: 1; transition: filter .15s, box-shadow .15s; }
.pf-ev:hover { filter: brightness(1.2); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); z-index: 2; }
.pf-ev-main { font-size: 11px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pf-ev-sub { font-size: 10px; line-height: 1.25; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-tg--day .pf-ev-main { font-size: 12px; }
.pf-tg--day .pf-ev-sub { font-size: 11px; color: var(--st); }
.pf-ev--off .pf-ev-main { color: var(--text-muted); text-decoration: line-through; }
@media (max-width: 700px) {
  .pf-calendar .pf-toolbar .ss-combo { flex: 1; min-width: 0; }
  .pf-calendar-month { flex: 1 1 100%; }
  .pf-seg { margin-right: auto; }
  .pf-tg-inner { --pf-tg-min: 96px; }
  .pf-tg-scroll { max-height: 62dvh; }
}

/* Read-only scheduled-post dialog, using the existing native preview convention. */
.pf-scheduled-dialog { box-sizing: border-box; width: min(900px, calc(100vw - 32px)); overflow-y: auto; padding: 20px; }
.pf-scheduled-dialog [hidden] { display: none !important; }
.pf-scheduled-dialog > .pf-section-head { gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 18px; }
.pf-scheduled-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.pf-scheduled-preview, .pf-scheduled-details { min-width: 0; }
.pf-scheduled-stage { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 180px; border-radius: 10px; overflow: hidden; background: #080809; }
.pf-scheduled-stage:empty { background: var(--accent-soft); }
.pf-scheduled-stage .pf-scheduled-media { display: block; width: 100%; max-width: 100%; max-height: min(58dvh, 580px); height: auto; object-fit: contain; border-radius: 0; }
.pf-scheduled-navigation { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.pf-scheduled-navigation .pf-help { flex: none; }
.pf-scheduled-facts { margin: 0 0 20px; display: flex; flex-direction: column; gap: 14px; }
.pf-scheduled-facts dt { color: var(--text-muted); font-size: 11px; margin-bottom: 4px; }
.pf-scheduled-facts dd { color: var(--text-primary); font-size: 13px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.pf-scheduled-details h4 { color: var(--text-primary); font-size: 13px; margin: 0 0 8px; }
.pf-scheduled-caption { color: var(--text-soft); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; }
.pf-scheduled-dialog .pf-status.is-error { color: var(--text-primary); }
.pf-scheduled-cancel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.pf-scheduled-cancel .pf-help { margin: 0 0 10px; }

/* warm-up */
.pf-ramp { display: inline-block; font-size: 12px; color: var(--accent); border: 1px solid var(--accent-ring); border-radius: 999px; padding: 4px 10px; margin: 6px 0; }
.pf-window { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-window .pf-label-text { min-width: 70px; }
.pf-hour { width: 72px; }
.pf-warmup-preferences { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pf-platforms { min-width: 0; margin: 0; padding: 8px 12px 12px; border: 1px solid var(--border-soft); border-radius: 10px; }
.pf-platforms legend { padding: 0 5px; }
.pf-platform-options { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pf-platform-options .pf-check { min-height: 44px; }
.pf-platform-options input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pf-platforms .pf-help { overflow-wrap: anywhere; }
.pf-warming { color: var(--accent); font-size: 11px; overflow-wrap: anywhere; }
#pf-warm-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
#pf-warm-dialog .sp-modal__head { align-items: flex-start; }
#pf-warm-dialog .sp-modal__head h2 { min-width: 0; overflow-wrap: anywhere; }

/* activity */
.pf-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.pf-summary-item { font-size: 11px; border: 1px solid var(--border-medium); border-radius: 999px; padding: 4px 10px; }
.pf-summary-item strong { color: var(--text-primary); }
.pf-event { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.pf-event-time { font-size: 11px; color: var(--text-muted); }
.pf-event-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-event-text strong { font-size: 12px; color: var(--text-soft); font-weight: 600; }

/* composer modal (appended to <body>: page transforms would break position:fixed) */
.pf-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pf-modal-backdrop { position: absolute; inset: 0; background: rgba(8,6,5,.65); backdrop-filter: blur(4px); }
.pf-modal-card { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg-secondary); border: 1px solid var(--border-medium); border-radius: 16px; padding: 20px; color: var(--text-soft); }
.pf-modal-card h3 { margin: 0; color: var(--text-primary); font-size: 16px; }
.pf-segment { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-seg { min-height: 34px; }
.pf-seg.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.pf-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; font-size: 12px; color: var(--text-muted); }
.pf-picker > .pf-help { grid-column: 1 / -1; }
.pf-picker-item { position: relative; min-width: 0; }
.pf-picker-item > .pf-tile { width: 100%; display: block; }
.pf-picker-item > .pf-tile-preview { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-height: 36px; padding: 6px 10px; background: rgba(0,0,0,.8); color: #fff; border-color: rgba(255,255,255,.4); font-size: 11px; }
.pf-tile { position: relative; aspect-ratio: 9 / 16; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #111; overflow: hidden; cursor: pointer; }
.pf-tile img, .pf-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pf-tile.is-picked { border-color: var(--accent); }
.pf-tile:disabled { opacity: .35; cursor: not-allowed; }
.pf-tile-badge { position: absolute; left: 4px; bottom: 4px; font-size: 9px; padding: 2px 5px; border-radius: 4px; background: rgba(0,0,0,.7); color: #fff; }
.pf-tile-order { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pf-caption { position: relative; }
.pf-counter { align-self: flex-end; font-size: 10px; color: var(--text-faint); }
.pf-schedule-fields { border: 0; padding: 0; margin: 0; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pf-schedule-fields .pb-pop { top: auto; bottom: calc(100% + 6px); }
.pf-schedule-fields .pb-field:last-child .pb-pop { left: auto; right: 0; }
.pf-video-dialog { width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 16px; border: 1px solid var(--border-medium); border-radius: 16px; background: var(--bg-secondary); color: var(--text-soft); }
.pf-video-dialog::backdrop { background: rgba(8,6,5,.8); }
.pf-video-dialog .pf-section-head { margin-bottom: 12px; }
.pf-video-dialog h3 { margin: 0; color: var(--text-primary); font-size: 16px; }
.pf-video-dialog video { display: block; max-width: 100%; max-height: calc(100dvh - 140px); border-radius: 8px; }
.pf-post-progress { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 6px 0; }
.pf-post-progress strong { color: var(--text-primary); font-size: 12px; }
.pf-post-progress .pf-help { margin: 0; }
.pf-post-progress .pf-btn { align-self: flex-start; }
.pf-post-progress + .pf-post-progress { border-top: 1px solid var(--border-soft); padding-top: 8px; }
.pf-progress-bar { appearance: none; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; accent-color: var(--accent); background: var(--border-soft); }
.pf-progress-bar::-webkit-progress-bar { background: var(--border-soft); border-radius: 999px; }
.pf-progress-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.pf-progress-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* Independent Swap-to-Photos dialog; never activates the Phone Farm page. */
.pf-transfer-dialog { width: min(480px, calc(100vw - 32px)); }
.pf-transfer-dialog .sp-modal__head { gap: 16px; }
.pf-transfer-dialog .sp-modal__body { gap: 14px; }
.pf-transfer-dialog .pf-help, .pf-transfer-dialog .pf-status { margin: 0; }
.pf-transfer-dialog .pf-label { font-size: 12px; }
/* Destination iPhone picker: styled like the studio selects (no native look, own chevron). */
.pf-transfer-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  min-height: 42px; padding: 10px 38px 10px 12px; border-radius: 10px; font-size: 13.5px;
  background-color: rgba(255,255,255,0.04); border-color: var(--border-medium); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.6)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color .15s, background-color .15s;
}
.pf-transfer-select:hover:not(:disabled) { border-color: var(--accent-ring, var(--accent)); background-color: rgba(255,255,255,0.06); }
.pf-transfer-select:focus { outline: none; border-color: var(--accent); }
.pf-transfer-select:disabled { opacity: .55; cursor: default; }
.pf-transfer-select option { background: var(--bg-secondary, #16161a); color: var(--text-primary, #fff); }
.pf-transfer-source { margin: 0; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.pf-transfer-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border-soft); }
.pf-transfer-dialog [hidden] { display: none !important; }
html:not(.has-phone-farm) .sw-phone-transfer,
html:not(.has-sfw-full) .sw-phone-transfer,
html:not([data-space="sfw"]) .sw-phone-transfer,
html:not(.has-phone-farm) .pf-transfer-dialog,
html:not(.has-sfw-full) .pf-transfer-dialog,
html:not([data-space="sfw"]) .pf-transfer-dialog { display: none !important; }

@media (min-width: 1600px) and (min-height: 800px) {
  .pf-device-name { font-size: 16px; }
  .pf-device-footer .pf-btn, .pf-device-editor .pf-btn { min-height: 36px; font-size: 12px; }
  .pf-device-handle { font-size: 12px; }
  .pf-preview-status { font-size: 11px; }
}

@media (max-height: 640px) {
  .pf-fleet-head { display: none; }
  .pf-grid > .pf-device, .pf-device-info { row-gap: 4px; }
}

/* Short, wide screens keep the first phone fully visible beside its actions. */
@media (max-height: 560px) and (min-width: 600px) {
  .pf-tabs-row { margin-bottom: 8px; }
  .pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
  .pf-grid > .pf-device { display: grid; height: auto; grid-template-columns: minmax(160px, .8fr) minmax(0, 1.2fr); grid-template-rows: auto auto auto; gap: 4px 12px; align-items: start; }
  .pf-grid .pf-device-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-column: 2; grid-row: 1; gap: 4px 8px; }
  .pf-grid .pf-device-top { display: contents; }
  .pf-grid .pf-device-name { grid-column: 1; grid-row: 1; align-self: center; }
  .pf-grid .pf-device-handle { grid-column: 2; grid-row: 1; max-width: 140px; align-self: center; justify-self: end; text-align: right; }
  .pf-grid .pf-device-top-right { grid-column: 1 / -1; grid-row: 2; }
  .pf-grid .pf-device-info > :not(.pf-device-top):not(.pf-device-handle) { grid-column: 1 / -1; }
  .pf-grid .pf-device-display { grid-column: 1; grid-row: 1 / span 3; min-height: 0; }
  .pf-grid .pf-control-status { grid-column: 2; grid-row: 2; }
  .pf-grid .pf-device-editor { grid-column: 2; grid-row: 3; }
  .pf-grid .pf-preview { height: clamp(140px, calc(100dvh - 180px), 300px); }
}

@media (max-width: 1100px) {
  .pf-phone-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #page-phonefarm { padding: 8px 0 28px; }
  .pf-card { padding: 14px; border-radius: 12px; }
  .pf-btn { min-height: 40px; }
  .pf-device .pf-btn, .pf-tabs-row .pf-btn { min-height: 40px; }
  .pf-device-editor .pf-input { font-size: 16px; height: 40px; min-height: 40px; }
  .pf-fleet-head .pf-help { display: none; }
  .pf-input { font-size: 16px; }
  .pf-tab { padding: 10px 10px; }
  .pf-event { grid-template-columns: 1fr; gap: 2px; }
  .pf-select { width: 100%; }
  .pf-calendar .pf-toolbar { width: 100%; }
  .pf-calendar-nav { gap: 6px; }
  .pf-calendar-month { font-size: 18px; }
  .pf-calendar-weekdays, .pf-calendar-grid { gap: 3px; }
  .pf-calendar-day { min-height: 126px; padding: 3px; gap: 4px; border-radius: 6px; }
  .pf-calendar .pf-calendar-date { min-height: 30px; }
  .pf-calendar-number { min-width: 23px; height: 23px; font-size: 11px; }
  .pf-calendar-count { display: none; }
  .pf-calendar .pf-calendar-event { min-height: 44px; padding: 3px 2px; border-left-width: 2px; font-size: 9px; }
  .pf-calendar-event-top { flex-direction: column; align-items: flex-start; gap: 0; }
  .pf-calendar-network { font-size: 8px; }
  .pf-calendar .pf-calendar-more { min-height: 28px; font-size: 9px; overflow-wrap: anywhere; }
  .pf-scheduled-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .pf-scheduled-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 14px; }
  .pf-scheduled-stage .pf-scheduled-media { max-height: 48dvh; }
  .pf-modal { padding: 0; align-items: flex-end; }
  .pf-modal-card { border-radius: 16px 16px 0 0; max-height: 92dvh; }
  .pf-transfer-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .pf-transfer-dialog .sp-modal__head, .pf-transfer-dialog .sp-modal__body, .pf-transfer-actions { padding: 14px; }
  .pf-transfer-actions > .pf-btn { flex: 1; }
}
@media (max-width: 760px) {
  .pf-focus-bar { flex-wrap: nowrap; }
  .pf-focus-bar > .pf-btn { flex: none; }
  .pf-focus-bar .pf-select { width: auto; min-width: 0; flex: 1; }
}
@media (max-width: 760px) and (min-height: 560px) {
  .pf-phone-layout .pf-device-display { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(160px, 1fr) auto; }
  .pf-phone-layout .pf-side-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pf-phone-layout .pf-side-btn { width: 100%; }
}

@media (max-width: 480px) {
  .pf-grid { gap: 10px; }
  .pf-device { padding: 8px; gap: 6px; }
  .pf-device-name { font-size: 14px; }
  .pf-job-actions { width: 100%; }
  .pf-calendar { padding: 10px 6px; }
  .pf-calendar .pf-job-main { flex-basis: 100%; }
  .pf-calendar-agenda .pf-help, .pf-calendar .pf-job-line strong { overflow-wrap: anywhere; }
  .pf-calendar-arrow { min-width: 30px; padding: 3px 7px; }
  .pf-calendar-day { padding: 2px; }
  .pf-calendar-event-time { font-size: 10px; }
  .pf-calendar .pf-calendar-date { justify-content: center; }
  .pf-calendar .pf-job-actions > .pf-btn { flex: 1; }
  .pf-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Send file: drop zone (click or drag) and background-send notices. */
.pf-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 108px; padding: 18px 14px; border: 1.5px dashed var(--border-medium); border-radius: 12px; background: rgba(255,255,255,0.03); color: var(--text-muted); font-size: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.pf-dropzone strong { color: var(--text-primary); font-size: 13.5px; font-weight: 600; }
.pf-dropzone:hover:not(.is-disabled), .pf-dropzone.is-over { border-color: var(--accent); background: var(--accent-soft, rgba(255,255,255,0.06)); color: var(--text-soft); }
.pf-dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-dropzone.is-disabled { opacity: .5; cursor: default; }
.pf-toast { position: fixed; right: 16px; bottom: 16px; z-index: 10000; max-width: min(380px, calc(100vw - 32px)); padding: 12px 14px; border: 1px solid var(--border-medium); border-radius: 10px; background: var(--bg-secondary, #16161a); color: var(--text-primary, #fff); font-size: 13px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pf-toast.is-error { border-color: rgba(255,120,110,.5); color: #ffaaa5; }
/* Send file queue */
.pf-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.pf-queue[hidden] { display: none !important; }
.pf-queue-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 10px; padding: 8px 10px; border: 1px solid var(--border-soft); border-radius: 8px; font-size: 12px; }
.pf-queue-name { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-queue-state { color: var(--text-muted); white-space: nowrap; }
.pf-queue-note { grid-column: 1 / -1; color: var(--text-soft); }
.pf-queue-item--saved .pf-queue-state { color: #7ee2a8; }
.pf-queue-item--uploading .pf-queue-state, .pf-queue-item--submitting .pf-queue-state,
.pf-queue-item--queued .pf-queue-state, .pf-queue-item--saving .pf-queue-state { color: var(--text-soft); }
.pf-queue-item--failed .pf-queue-state, .pf-queue-item--nothing .pf-queue-state { color: #ffaaa5; }
.pf-queue-item--check .pf-queue-state { color: #f5c97a; }
.pf-device-top-right { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.pf-device-status { position: relative; display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.pf-btn--icon { min-height: 28px; min-width: 28px; padding: 2px 7px; font-size: 15px; line-height: 1; }
.pf-compose-drop { min-height: 72px; padding: 12px; }
.pf-caption-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-heat, .pf-sim-badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; line-height: 1.5; font-weight: 600; border: 1px solid var(--border-soft); }
.pf-heat { cursor: help; }
.pf-heat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-heat--normal { color: #7ee2a8; }
.pf-heat--unknown, .pf-sim-badge { color: var(--text-muted); }
.pf-heat--warm { color: #f5c97a; }
.pf-heat--hot, .pf-heat--critical { color: #ffaaa5; border-color: rgba(255,120,110,.5); }
.pf-heat-tooltip { display: none; position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; width: min(260px, calc(100vw - 56px)); padding: 9px 11px; border: 1px solid var(--border-medium); border-radius: 8px; background: var(--bg-secondary, #16161a); color: var(--text-primary); font-size: 12px; line-height: 1.5; font-weight: 400; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.pf-heat:hover .pf-heat-tooltip, .pf-heat:focus .pf-heat-tooltip { display: block; }
.pf-hotspot-state { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.pf-internet-badge { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.pf-connection-dialog .sp-modal__head h2 { min-width: 0; overflow-wrap: anywhere; }
.pf-connection-dialog .pf-form { margin-top: 0; }
.pf-connection-dialog .pf-check { align-items: flex-start; }
.pf-connection-dialog .pf-check input { flex: none; }
.pf-connection-dialog .pf-input:disabled { opacity: .55; cursor: not-allowed; }
.pf-connection-dialog .pf-transfer-actions { padding: 0; }

/* Warm-up schedule: phone list + one form for the selected phones */
.pf-warm-choose { gap: 8px; }
.pf-warm-count { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-ring); color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.pf-warm-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 8px; }
.pf-warm-row:not(.is-picked) > :not(.pf-btn) { opacity: .55; }
.pf-warm-row.is-picked { background: var(--accent-soft); border-color: var(--accent-ring); }
/* Read-only tick: which phones the form applies to (chosen in the Select devices popup) */
.pf-warm-tick { flex: none; position: relative; width: 16px; height: 16px; border: 1px solid var(--border-medium); border-radius: 4px; box-sizing: border-box; }
.pf-warm-row.is-picked .pf-warm-tick { background: var(--accent); border-color: var(--accent); }
.pf-warm-row.is-picked .pf-warm-tick::after { content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* Select devices popup */
.pf-warm-pick .sp-modal__body { gap: 10px; }
.pf-warm-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pf-warm-pick-count { font-size: 12px; color: var(--text-muted); }
.pf-warm-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: min(52dvh, 420px); overflow-y: auto; padding: 2px; margin: -2px; }
.pf-warm-pick-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; cursor: pointer; min-width: 0; transition: border-color .15s, background .15s; }
.pf-warm-pick-row:hover { border-color: var(--border-medium); }
.pf-warm-pick-row.is-on { background: var(--accent-soft); border-color: var(--accent-ring); }
.pf-warm-pick-row input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pf-warm-pick-row:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-warm-pick-row input:focus-visible { outline: none; }
.pf-warm-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-warm-pick-name { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.pf-warm-pick-sub { font-size: 11px; color: var(--text-muted); overflow-wrap: anywhere; }
.pf-warm-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; min-width: 0; }
.pf-warm-row.is-on { border-color: var(--accent-ring); }
.pf-warm-name { font-weight: 600; min-width: 0; flex: 0 1 200px; overflow-wrap: anywhere; }
.pf-warm-summary { flex: 1 1 220px; min-width: 0; font-size: 12px; opacity: .8; overflow-wrap: anywhere; }
.pf-warm-day { font-size: 11px; color: var(--accent); border: 1px solid var(--accent-ring); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pf-warm-title { margin: 14px 0 2px; font-size: 13px; font-weight: 600; }
.pf-warm-differ { color: var(--accent); }
@media (max-width: 480px) {
  .pf-warm-name { flex-basis: calc(100% - 30px); }
  .pf-warm-summary { flex-basis: 100%; }
}
