/* Reference work controls, request source and city statistics. */
.prime-manager-panel { display:grid; gap:12px; margin-top:14px; }
.prime-manager-main { position:relative; min-width:0; }
.mmm-city-glyph { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; flex-shrink:0; border-radius:8px; color:var(--city-color,var(--accent)); background:color-mix(in srgb,var(--city-color,var(--accent)) 14%,var(--card)); }
.mmm-city-table th .mmm-city-glyph { width:24px; height:24px; margin-right:7px; vertical-align:middle; }
.prime-city-row { display:flex; align-items:center; gap:12px; width:100%; border:0; border-bottom:1px solid var(--cardbr); padding:13px 0; color:var(--text); background:none; text-align:left; cursor:pointer; }
.prime-city-row > span:nth-child(2) { flex:1; min-width:0; }
.prime-city-row b,.prime-city-row small { display:block; }
.prime-city-row b { font-size:13px; }
.prime-city-row small { font-size:11px; color:var(--hint); margin-top:4px; }
.prime-popup-totals { display:flex; flex-wrap:wrap; gap:10px; padding:14px 0; border-bottom:1px solid var(--cardbr); }
.prime-popup-totals > div { flex:1 1 100px; min-width:0; }
.prime-popup-totals small { display:block; color:var(--hint); font-size:11px; }
.prime-popup-totals b { display:block; font-size:17px; margin-top:5px; overflow-wrap:anywhere; }
.prime-ticket-number { font-size:40px; font-weight:750; color:var(--accent); text-align:center; padding:22px 0; }
.prime-work-folders { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; overflow:visible; }
.prime-work-folders.prime-history-folders { grid-template-columns:repeat(4,minmax(0,1fr)); }
.prime-work-folders .chip { position:relative; flex-direction:column; gap:5px; min-width:0; height:76px; padding:8px 4px; font-size:11px; border-radius:8px; background:var(--card); }
.prime-work-folders .chip > i { display:flex; align-items:center; justify-content:center; height:27px; width:27px; color:var(--accent); background:color-mix(in srgb,var(--accent) 12%,var(--card)); border-radius:8px; }
.prime-work-folders .chip.active { border-color:var(--accent); box-shadow:inset 0 -2px 0 var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--card)); }
.prime-work-folders .chip .cb { position:absolute; top:5px; right:6px; font-size:9px; opacity:.75; }
.request-quickbar:has(.mmm-card-actions) { flex-wrap:wrap; }
.request-quickbar .mmm-card-actions { flex:1 1 100%; padding:5px; }
.request-quickbar .mmm-card-actions .btn { flex:1; min-height:32px; min-width:0; }
.prime-permissions { padding:0; margin:17px 0; border:0; }
.prime-permissions legend { font-weight:750; font-size:13px; margin-bottom:9px; }
.prime-permissions label { display:flex; align-items:center; gap:11px; padding:10px 0; border-bottom:1px solid var(--cardbr); font-size:12px; line-height:1.4; }
.prime-permissions input { flex-shrink:0; width:17px; height:17px; accent-color:var(--accent); }
.mmm-company-name { width:100%; text-align:left; border:0; background:none; color:var(--text); cursor:pointer; }
.mmm-company-name .ui-icon { color:var(--accent); }
@media(max-width:350px) { .prime-history-folders .chip { font-size:10px; } }
.mmm-source { border-top:1px solid var(--cardbr); margin-top:14px; padding-top:12px; }
.mmm-source summary { color:var(--accent); cursor:pointer; font-size:12px; }
.prime-source-text {
  white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:12px; line-height:1.7; padding:12px; margin:10px 0 8px; user-select:text;
  border:1px solid color-mix(in srgb,var(--accent) 18%,var(--cardbr)); border-radius:8px;
  background:linear-gradient(145deg,color-mix(in srgb,var(--card2) 82%,transparent),color-mix(in srgb,var(--accent) 6%,var(--card)));
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--text) 8%,transparent);
}
.mmm-source .mmm-icon-button { width:42px; height:38px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:8px; }
.prime-theme-preview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:11px; }
.prime-theme-preview > span { display:block; height:23px; border:1px solid #ffffff1c; border-radius:5px; }
.prime-theme-preview > span:first-child { grid-column:1/-1; height:35px; }
.thcard { position:relative; border-radius:8px; }
.thcard .thfav { display:flex; align-items:center; justify-content:center; width:32px; height:32px; border:0; border-radius:50%; color:var(--text); background:var(--card2); }
.thcard.active { outline:2px solid var(--accent); outline-offset:-2px; }
body[data-theme-style=glass] .request-card,body[data-theme-style=glass] .profile-hero,body[data-theme-style=glass] .sheet { background:color-mix(in srgb,var(--card) 90%,transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
body[data-theme-style=metal] .profile-hero { border-color:color-mix(in srgb,var(--accent) 25%,var(--cardbr)); }
.sheet-bg.open { background:rgba(0,0,0,.66); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); }
.sheet.open { box-shadow:0 -18px 65px #0005; }
body.reduced .sheet-bg,body.reduced .sheet,body.reduced .profile-hero,body.reduced .request-card { backdrop-filter:none; -webkit-backdrop-filter:none; }

.prime-worker-profile .profile-hero { padding:17px; border-radius:8px; margin-bottom:24px; }
.prime-worker-profile .profile-top { margin-bottom:17px; }
.prime-worker-profile .profile-name { font-size:18px; white-space:normal; overflow-wrap:anywhere; text-overflow:clip; line-height:1.3; }
.prime-worker-profile .profile-role { font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.prime-worker-profile .settings-group { background:none; border:0; border-radius:0; box-shadow:none; margin-bottom:24px; }
.prime-worker-profile .settings-group .setrow { padding:13px 2px; border-bottom:1px solid var(--cardbr); min-height:56px; }
.prime-worker-profile .setval { display:inline-flex; align-items:center; gap:5px; flex-wrap:wrap; justify-content:flex-end; min-width:0; max-width:45%; }
.prime-worker-profile .setval .ui-icon { flex-shrink:0; }
.prime-worker-profile .sub { letter-spacing:0; text-transform:none; font-size:12px; margin:18px 0 8px; }
body[data-theme-style=glass] .request-card,body[data-theme-style=metal] .request-card,body[data-theme-style=light] .request-card { backdrop-filter:blur(var(--blur)); -webkit-backdrop-filter:blur(var(--blur)); box-shadow:inset 0 1px 0 #ffffff12,0 12px 30px #0002; }
body[data-theme-style] .profile-hero { backdrop-filter:blur(var(--blur)); -webkit-backdrop-filter:blur(var(--blur)); }
body[data-theme-style] .sheet { background:color-mix(in srgb,var(--bg) 94%,transparent); }
body[data-theme-style] .settings-group { backdrop-filter:blur(var(--blur)); -webkit-backdrop-filter:blur(var(--blur)); }
body.reduced .profile-hero,body.reduced .request-card,body.reduced .settings-group { backdrop-filter:none; -webkit-backdrop-filter:none; }

body .prime-profile .profile-hero { background:transparent; border:0; border-radius:0; box-shadow:none; padding:12px 2px; }
.prime-profile * { letter-spacing:0; }
.prime-profile .setval { display:inline-flex; align-items:center; justify-content:flex-end; gap:5px; max-width:45%; min-width:0; flex-wrap:wrap; }
.prime-profile .setval .ui-icon { flex-shrink:0; }
.prime-profile .profile-name { font-size:19px; letter-spacing:0; overflow-wrap:anywhere; white-space:normal; line-height:1.3; }
.prime-manager-main { padding:15px; backdrop-filter:blur(var(--blur)); -webkit-backdrop-filter:blur(var(--blur)); }
.prime-master-folders { grid-template-columns:repeat(2,minmax(0,1fr)); }
.prime-original { margin:12px 0 0; }
.prime-original-text { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; font-size:12px; line-height:1.7; }
.prime-channel-topic { margin:10px 0 18px; font-size:12px; }
.prime-channel-state { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--hint); }
.prime-channel-state .ui-icon { color:var(--accent); }
.prime-delivery-state { margin:8px 0 13px; padding:9px 0; border-top:1px solid var(--cardbr); border-bottom:1px solid var(--cardbr); font-size:12px; }
.prime-delivery-state small { display:block; margin-top:5px; color:var(--hint); font-size:11px; }
body[data-theme-style] .btn,body[data-theme-style] .chip,body[data-theme-style] .sbtn { box-shadow:inset 0 1px 0 #ffffff16,0 3px 6px #0002; }
body[data-theme-style] .btn:hover:not(:disabled),body[data-theme-style] .chip:hover:not(:disabled) { box-shadow:inset 0 1px 0 #ffffff20,0 0 0 1px color-mix(in srgb,var(--accent) 32%,transparent),0 5px 18px color-mix(in srgb,var(--accent) 9%,transparent); }
body[data-theme-style] .btn:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.mmm-field input:focus,.mmm-field select:focus,.mmm-field textarea:focus { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 14%,transparent); }
.mmm-field input[type=datetime-local] { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
@media(prefers-reduced-motion:reduce) { .prime-manager-main { backdrop-filter:none; -webkit-backdrop-filter:none; } }
