.list-refine { color: var(--muted); font-size: 13px; }
.list-refine summary { display: grid; place-items: center; list-style: none; height: 40px; width: 40px; border: 1px solid var(--line); background: white; border-radius: 9px; cursor: pointer; }
.list-refine summary::-webkit-details-marker { display:none; }
.list-refine[open] summary, .list-refine.is-filtered summary { border-color: #dfc3bd; background: var(--tint); color: var(--wine); }
.list-refine .icon { width: 18px; height: 18px; }
.list-refine>div { position: absolute; top: calc(100% - 5px); left: 12px; right: 12px; z-index: 1; background: white; padding: 14px; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 26px #3920191c; display: grid; gap: 10px; }
.list-refine .text-btn { min-height: 31px; justify-self: start; }
.work-fold summary { cursor: pointer; min-height: 36px; }
.report-tools, .day-checks, .report-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.list-refine label,.work-form label,.work-settings-card>label { display: grid; gap: 6px; font-size: 14px; color: var(--ink); }
.list-refine select,.reply-tools select,.work-form input:not([type=checkbox]),.work-form textarea,.work-form select,.work-settings-card>label select,.report-tools select { width: 100%; min-width: 0; min-height: 39px; border: 1px solid var(--edge); border-radius: 8px; background: var(--paper); padding: 7px 10px; color: var(--ink); font: inherit; }
.reply-tools select { width: auto; max-width: 46%; margin-right: auto; font-size: 13px; }
.file-pick { cursor: pointer; position: relative; overflow: hidden; flex: none; display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-height: 36px; border-radius: 9px; color: var(--wine); font-size: 12px; font-weight: 650; padding: 6px; }
.file-pick .icon { width: 18px; height: 18px; }
.file-pick:hover { background: var(--tint); }
.file-pick input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-pick:focus-within { outline: 2px solid var(--wine); }
.file-remove { margin: 4px 0 0; background: transparent; border: 0; font-size: 12px; color: var(--wine); }
.work-fold { border-bottom: 1px solid var(--line); }
.work-fold summary { color: var(--wine); padding: 10px 0; font-size: 13px; font-weight: 650; }
.fold-body { display: grid; gap: 10px; padding: 2px 0 14px; }
.work-form,.work-items,.work-item { display: grid; gap: 8px; }
.work-form { min-width: 0; }
.work-form .button { justify-self: start; min-height: 34px; padding: 5px 10px; font-size: 12px; }
.work-form textarea { resize: vertical; }
.work-item { background: var(--sand); border-radius: 8px; padding: 9px; color: var(--ink); gap: 5px; font-size: 12px; overflow-wrap: anywhere; }
.work-item p,.empty-work,.delivery-status { margin: 0; white-space: pre-line; font-size: 12px; line-height: 1.45; }
.work-item small,.empty-work { color: var(--muted); }
.client-contact p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.client-contact a { color: var(--wine); text-decoration: underline; }
.delivery-status { padding: 10px 0; }
.delivery-status:empty { padding: 4px 0; }
#dialog-work { margin-bottom: 10px; }
#workspace-settings { display: grid; gap: 14px; }
.work-settings-card { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; align-content: start; }
.work-settings-card .work-form { max-width: 600px; gap: 15px; }
.work-settings-card .work-form > button { padding: 9px 14px; min-height: 40px; font-size: 14px; background: var(--wine); border-color: var(--wine); color: white; }
.work-settings-card .work-form > button:hover { background: var(--wine-hover); }
.work-settings-card .work-form textarea { line-height: 1.5; }
.work-settings-card > .text-btn { justify-self: start; }
.work-settings-card h2 { font-size: 22px; }
.work-settings-card > p { margin: 0 !important; }
.work-settings-card > form:first-of-type { margin-top: 3px; }
.work-settings-card label { min-width: 0; font-weight: 550; }
.work-settings-card :is(input:not([type=checkbox]), textarea, select) { font-weight: 400; background-color: #fffefd; }
.work-settings-card label:has(input:not([type=checkbox]):focus-visible),
.work-settings-card label:has(textarea:focus-visible) { color: var(--wine); }
.work-settings-card .work-form > label:has(> input[type=checkbox]) {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 48px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
}
.work-settings-card .work-form > label:has(> input[type=checkbox]):hover { background: #fcf9f7; }
.work-settings-card .work-form > label > input[type=checkbox] {
  flex: none; appearance: none; cursor: pointer; margin: 0; width: 36px; height: 22px; border-radius: 22px;
  border: 1px solid #989198; background: radial-gradient(circle closest-side, #fff 96%, transparent) 3px center / 14px 14px no-repeat #938a91;
}
.work-settings-card .work-form > label > input:checked { border-color: #722d38; background-color: #722d38; background-position: right 3px center; }
.work-settings-card .work-form > label:has(input:disabled) { color: var(--muted); cursor: default; }
.work-settings-card .work-form > label > input:disabled { opacity: .48; cursor: default; }
.paired-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-settings-card .work-form.route-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.work-settings-card .route-row > button { border-color: var(--edge); background: white; color: var(--wine); }
.work-settings-card .route-row > button:hover { background: var(--tint); }
.day-checks { border: 0; padding: 0; min-width: 0; gap: 5px; }
.day-checks label { display: inline-flex; cursor: pointer; min-width: 40px; min-height: 36px; align-items: center; justify-content: center; border: 1px solid var(--edge); border-radius: 7px; color: var(--muted); position: relative; }
.day-checks label:has(:checked) { background: var(--tint); border-color: #d3b6b5; color: var(--wine); }
.day-checks label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.day-checks input { position: absolute; width: 100%; height: 100%; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.day-checks legend,.report-stats small { color: var(--muted); font-size: 12px; }
.day-checks legend { color: var(--ink); margin-bottom: 6px; font-size: 14px; font-weight: 550; }
@media (forced-colors: active) {
  .work-settings-card .work-form > label > input[type=checkbox] { appearance: auto; }
  .day-checks label:has(:checked) { border: 2px solid Highlight; }
}
.report-tools { align-items: center; gap: 15px; }
.report-tools select { width: 120px; }
.report-stats>div { display: grid; gap: 5px; padding: 10px 14px; background: var(--sand); border-radius: 8px; flex: 1 1 105px; }
.report-stats b { font-size: 22px; color: var(--wine); }
.settings-card .report-groups p { margin: 2px 0; }
@media (max-width:780px) {
  .work-form input:not([type=checkbox]),.work-form textarea,.work-form select { font-size: 16px; }
  .list-refine summary { min-height: 29px; }
  .reply-tools { gap: 4px; }
  .reply-tools select { flex: 1 1 120px; max-width: 190px; text-overflow: ellipsis; }
  .reply-tools .file-pick { width: 36px; }
  .reply-tools .file-pick span { display: none; }
  .reply-tools .reply-send { flex: none; }
}
@media (max-width: 365px) { .reply-tools .reply-send { padding-inline: 8px; } }

.team-room-card details { width:100%; min-width:0; }
.team-room-card summary { cursor:pointer; font-weight:650; }
.team-feed { max-height:22rem; overflow:auto; margin:12px 0; }
.team-feed article { border-top:1px solid var(--line); padding:9px 0; }
.team-feed article p { white-space:pre-wrap; overflow-wrap:anywhere; margin:4px 0; }
.team-room-card form { display:grid; gap:8px; }
.team-room-card label { display:grid; gap:6px; font-size:13px; }
.team-room-card textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:9px; font:inherit; }
.team-room-card form button { justify-self:start; }
#product-picker { width: min(460px, calc(100vw - 24px)); max-height: 84dvh; padding: 18px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 15px; box-shadow: 0 16px 70px #17132333; }
#product-picker::backdrop { background: #17132366; }
#product-picker header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
#product-picker h2 { margin: 0; color: var(--navy); font-size: 19px; }
#product-picker header button { font-size: 20px; padding: 4px 11px; }
#product-picker label { display: block; margin: 0 0 5px; font-size: 13px; }
#product-query { width: 100%; padding: 10px; border: 1px solid var(--edge); border-radius: 8px; background: var(--paper); color: var(--ink); font-size: 16px; }
#product-results { overflow: auto; overscroll-behavior: contain; max-height: 48dvh; margin-top: 12px; color: var(--muted); font-size: 13px; }
#product-results button { display: grid; width: 100%; text-align: left; gap: 4px; background: transparent; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line); color: var(--navy); }
#product-results button:hover, #product-results button:focus-visible { background: var(--sand); }
#product-results strong { font-size: 14px; font-weight: 500; }
#product-results small { color: var(--muted); }

#settings-nav { display:flex; flex-wrap:wrap; gap:5px; align-self:start; }
#settings-nav[hidden],.outside-group { display:none!important; }
#settings-nav button { display:flex; align-items:center; gap:8px; border:1px solid transparent; background:transparent; color:var(--muted); border-radius:8px; padding:10px 12px; cursor:pointer; font:580 14px var(--font); }
#settings-nav button:hover { background:white; }
#settings-nav button[aria-pressed=true] { border-color:#e1c4bf; color:var(--wine); background:#f7eae6; }
#settings-nav button .icon { width:17px; height:17px; }
.embed-code { width:100%; margin:0; resize:vertical; font:13px/1.5 monospace; padding:10px 12px; border:1px solid var(--line); background:var(--sand); border-radius:8px; }
.callback-number { display:block; color:var(--wine); font-weight:650; margin:6px 0; text-decoration:underline; }
@media (min-width:1051px) {
  #settings-nav { display:grid; position:sticky; top:0; gap:4px; background:white; padding:5px; border:1px solid var(--line); border-radius:13px; }
}
@media (max-width:780px) {
  #settings-nav { display:flex; padding-bottom:11px; border-bottom:1px solid var(--line); }
  #settings-nav button { min-height:40px; padding:7px 8px; gap:5px; }
  .work-settings-card h2 { font-size: 20px; }
  .work-settings-card .work-form { gap: 12px; }
  .settings-inner { gap:12px; }
  .list-refine select { font-size:16px; }
}
@media (max-width:440px) {
  .paired-fields { gap: 8px; }
  .work-settings-card .work-form > button:not(.route-row > button) { width: 100%; }
  .team-form { grid-template-columns: minmax(0,1fr); }
  .settings-card:not(.work-settings-card) { grid-template-columns: minmax(0,1fr); }
  .settings-card:not(.work-settings-card) .setting-icon { display: none; }
  .reply-tools .reply-send { min-width:41px; min-height:41px; padding:7px; }
  .reply-send span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
  .reply-tools select { min-width:0; max-width:100%; flex:1; }
  .reply-send .icon { width:20px; height:20px; }
}
