/* MBC Staff interface finish. Load last; brand.css remains the colour authority. */
:root {
  --mbc-ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mbc-polish-border: #d9cdbb;
  --mbc-polish-shadow: 0 2px 4px rgb(10 35 66 / 2%), 0 10px 28px rgb(10 35 66 / 4%);
  font-family: var(--mbc-ui-font);
}

body {font-family: var(--mbc-ui-font); color: var(--mbc-navy); background: var(--mbc-cream);}
button, input, select, textarea {font-family: var(--mbc-ui-font);}
h1, h2, h3, .weeklabel, .metric strong, .dayhead b, .rating {font-family: var(--mbc-ui-font);}
h1 {font-size: clamp(28px, 2.6vw, 35px); font-weight: 680; letter-spacing: -1.1px; line-height: 1.15;}
h2 {font-size: 21px; font-weight: 650; letter-spacing: -.5px; line-height: 1.3;}
h3 {font-weight: 650; letter-spacing: -.2px; line-height: 1.4;}
a {text-underline-offset: 3px;}
.small {line-height: 1.6;}
.eyebrow {font-size: 10px; letter-spacing: 1.7px; font-weight: 750;}
.brand b {font-family: Georgia, "Times New Roman", serif; font-size: 20px; letter-spacing: -.65px;}
.brandmark {width: 42px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 1px rgb(242 183 5 / 30%), 0 3px 9px rgb(10 35 66 / 10%);}
.brand .small {font-size: 11px; margin-top: 2px;}

/* Navigation stays across the top, including on phones. */
.top {
  background: var(--mbc-cream);
  border-bottom: 1px solid var(--mbc-polish-border);
  box-shadow: 0 3px 16px rgb(10 35 66 / 3%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topline {padding-top: 18px; padding-bottom: 12px; gap: 18px;}
.account {gap: 8px; min-width: 0;}
.accountname {margin-right: 4px; line-height: 1.5;}
.accountname b {font-weight: 650;}
.account .btn {min-height: 44px; box-shadow: none; font-size: 12px; padding: 9px 13px;}
.account .interface-sound {min-width: 44px; flex-shrink: 0; gap: 6px;}
.interface-sound svg {width: 17px; height: 17px; flex-shrink: 0;}
.interface-sound[aria-pressed="true"] {background: #f7e7ba; color: var(--mbc-navy); border-color: #c7a652;}
.nav {display: flex; flex-direction: row; flex-wrap: nowrap; gap: 5px; padding-top: 3px; padding-bottom: 12px; overflow-x: auto; overscroll-behavior-x: contain;}
.nav button {flex: 0 0 auto; min-height: 44px; margin: 3px 0; padding: 10px 17px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 600; color: #5c554a;}
.nav button:hover {background: var(--mbc-beige); color: var(--mbc-navy);}
.nav button[aria-selected="true"], .nav button[aria-selected="true"]:hover {color: var(--mbc-surface); background: var(--mbc-navy); border-color: var(--mbc-navy); box-shadow: 0 3px 9px rgb(10 35 66 / 13%), inset 0 1px 0 rgb(255 255 255 / 10%);}
.nav button[aria-selected="true"]::after {display: none;}

/* Quiet surfaces give status, ownership and actions the visual priority. */
.wrap {padding-top: 30px; padding-bottom: 48px;}
.sectionhead {margin-bottom: 25px; gap: 16px;}
.sectionhead p {max-width: 72ch; font-size: 14px; line-height: 1.65;}
.panel, .metric, .person, .toolbar, .calendar {border-color: var(--mbc-polish-border); background: var(--mbc-surface); box-shadow: var(--mbc-polish-shadow);}
.panel {border-radius: 22px; padding: 23px;}
.panelhead {margin-bottom: 18px;}
.metric {border-radius: 20px; padding: 20px;}
.metric strong {font-size: 34px; font-weight: 650; letter-spacing: -1.4px; font-variant-numeric: tabular-nums;}
.metric span {font-size: 12px; font-weight: 600;}
.person {border-radius: 20px; padding: 19px;}
.person:hover {border-color: #b8a788; box-shadow: var(--mbc-polish-shadow); transform: none;}
.toolbar {border-radius: 18px; padding: 14px 16px;}
.calendar {border-radius: 20px;}
.weeklabel {font-weight: 600; letter-spacing: -.3px; font-variant-numeric: tabular-nums;}
.avatar {background: var(--mbc-beige); border-color: #d6c5a9; font-weight: 650;}
.pill {font-size: 11px; line-height: 1.45; font-weight: 600; padding: 4px 9px;}
.progress {height: 6px; background: #e2d7c6;}
.notice {border-radius: 14px; padding: 13px 15px;}
.empty {padding: 36px 20px;}
.loading {font-size: 14px;}

.btn {min-height: 44px; padding: 11px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; letter-spacing: -.1px; box-shadow: 0 2px 5px rgb(13 59 140 / 10%), inset 0 1px 0 rgb(255 255 255 / 12%); text-decoration: none;}
.btn:hover:not(:disabled) {box-shadow: 0 3px 9px rgb(13 59 140 / 14%);}
.btn.secondary {background: #fffaf1; border-color: #cfc0a7; box-shadow: 0 1px 2px rgb(10 35 66 / 3%);}
.btn.secondary:hover:not(:disabled) {background: var(--mbc-beige); border-color: #bba885; box-shadow: none;}
.btn.soft {background: #f6e8c0; border-color: #deca91; box-shadow: none;}
.btn.soft:hover:not(:disabled) {background: #f1dfaa; border-color: #c9ae69; box-shadow: none;}
.btn.danger, .btn.danger:hover:not(:disabled) {box-shadow: none;}
.btn.tiny {min-height: 44px; padding: 8px 11px; border-radius: 11px;}
.iconbtn {width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-radius: 12px;}
button:disabled {cursor: not-allowed; opacity: .6;}
.segmented {padding: 4px; gap: 3px; background: #e8dcc8; border: 1px solid #d8c8ad;}
.segmented button {min-height: 44px; font-size: 12px; font-weight: 600; padding: 9px 14px;}
.ops-subnav .btn {min-height: 44px;}

label {color: #474237; font-weight: 600; line-height: 1.5;}
input:not([type="checkbox"]):not([type="radio"]), select, textarea {min-height: 44px; padding: 11px 12px; border: 1px solid #c6b89f; border-radius: 12px; background: #fffdf8; color: var(--mbc-navy); font-size: 14px; box-shadow: inset 0 1px 2px rgb(10 35 66 / 2%);}
textarea {min-height: 100px; line-height: 1.6;}
input::placeholder, textarea::placeholder {color: #776c5c; opacity: 1;}
input:focus, select:focus, textarea:focus {border-color: var(--mbc-blue); background: #fffdf8; box-shadow: 0 0 0 3px rgb(13 59 140 / 12%);}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {outline: 3px solid var(--mbc-blue); outline-offset: 3px;}
.task-camera-dialog button:focus-visible, .task-camera-dialog select:focus-visible {outline: 3px solid var(--mbc-blue); outline-offset: 3px;}
fieldset {border-radius: 15px; border-color: var(--mbc-polish-border);}
.cb, .bundle, .checkrow {min-height: 44px;}
.checkrow {gap: 12px; padding: 12px 0; line-height: 1.6;}
.checkrow input, .cb input, .bundle input {min-height: 20px; height: 20px; width: 20px; border-radius: 5px; flex-shrink: 0; accent-color: var(--mbc-blue);}
.qtybox {font-variant-numeric: tabular-nums;}

.task {border-color: var(--mbc-polish-border); border-radius: 17px; background: var(--mbc-surface);}
.task summary {min-height: 52px; padding: 17px 18px; align-items: flex-start;}
.task summary b {font-size: 14px; font-weight: 600; line-height: 1.5;}
.task summary .muted {font-size: 12px; line-height: 1.5;}
.taskbody {background: #fffaf2; padding: 18px;}
.requirement {border-radius: 14px; background: #f2e8d8; border-color: var(--mbc-polish-border);}
.proof, .briefing-photo {border-radius: 13px;}
.evidence-card {border-radius: 15px; border-color: var(--mbc-polish-border); background: #fffaf2;}
.evidence-card figcaption {gap: 6px; padding: 12px 14px;}
.employee-photo-tag {color: var(--mbc-navy); font-weight: 600;}
.evidence-history, .submission-history {border-radius: 15px; border-color: var(--mbc-polish-border);}
.evidence-history summary, .submission-history summary {min-height: 44px; display: flex; align-items: center;}
.tablewrap {border-radius: 16px;}
th {font-size: 11px; font-weight: 650; padding: 13px 14px;}
td {padding: 13px 14px;}
.event {box-shadow: 0 2px 5px rgb(10 35 66 / 5%);}

/* Drawers use a light glass header; content and evidence remain opaque. */
dialog {background: var(--mbc-cream); color: var(--mbc-navy); border-left: 1px solid #cdbb9e; box-shadow: -18px 0 60px rgb(10 35 66 / 16%);}
dialog::backdrop {background: rgb(10 35 66 / 42%); backdrop-filter: none; -webkit-backdrop-filter: none;}
#drawer {border-radius: 24px 0 0 24px;}
.drawerhead {padding: 20px 24px; background: var(--mbc-surface); border-color: var(--mbc-polish-border); backdrop-filter: none; -webkit-backdrop-filter: none;}
.drawercontent {padding: 24px; background: var(--mbc-cream);}
.drawerfooter {gap: 9px; flex-wrap: wrap; border-color: var(--mbc-polish-border);}
.task-camera-dialog {inset: 0; margin: auto; height: auto; width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 22px; border: 1px solid #cdbb9e; border-radius: 24px; background: var(--mbc-surface); color: var(--mbc-navy); box-shadow: 0 24px 80px rgb(10 35 66 / 24%);}
.task-camera-video {border: 1px solid var(--mbc-navy); border-radius: 16px; background: var(--mbc-navy);}
.task-camera-slot {font-size: 12px; font-weight: 600; gap: 7px;}
.task-camera-slot select {min-height: 44px; padding: 11px 12px; border-radius: 12px; border-color: #c6b89f; background: #fffdf8; color: var(--mbc-navy);}
.task-camera-queue {padding: 14px; border: 1px solid var(--mbc-polish-border); border-radius: 14px; background: #f0e5d3;}
.task-camera-flash-controls [aria-pressed="true"] {background: #f8e6ad; color: var(--mbc-navy); border-color: #a2822e; box-shadow: inset 0 1px 0 rgb(255 255 255 / 40%);}
.task-camera-flash-hint {color: #5a5245;}
.task-camera-flash-hint.required {color: #754612;}

.briefing-panel {border-left-color: var(--mbc-gold);}
.briefing-copy {font-size: 14px; line-height: 1.75;}
.briefing-card {border-color: var(--mbc-polish-border); padding: 19px 0;}
.briefing-status, .automation-details dt {color: #625849;}
.automation-filters {gap: 12px; padding: 15px; border: 1px solid var(--mbc-polish-border); border-radius: 16px; background: #f4eadb;}
.automation-filters label {gap: 7px;}
.automation-run {padding: 17px 0;}
.automation-run summary {min-height: 48px; font-size: 14px; line-height: 1.55;}
.automation-details {gap: 11px 18px; line-height: 1.6; font-size: 13px;}
.automation-run [data-automation-publications] {padding-left: 17px; border-left-color: #d7c7ab;}
.automation-pagination {padding-top: 18px; border-color: var(--mbc-polish-border);}
.bar-hour-list {border-radius: 20px;}
.bar-hour-time > strong {font-size: 24px; font-weight: 600; letter-spacing: -.7px; font-variant-numeric: tabular-nums;}
.bar-hour-row {border-color: var(--mbc-polish-border);}
.bar-hour-warning {color: #754612;}
.login {border-radius: 26px; background: var(--mbc-surface); border-color: var(--mbc-polish-border); box-shadow: 0 18px 60px rgb(10 35 66 / 9%);}
.login h1 {font-size: 32px;}
#toast:not(:empty) {border-radius: 14px; padding: 13px 18px; background: var(--mbc-navy); color: #fff; border: 1px solid rgb(242 183 5 / 35%); box-shadow: 0 10px 30px rgb(10 35 66 / 18%);}

@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .top {background: rgb(243 233 216 / 88%); backdrop-filter: blur(16px) saturate(1.08); -webkit-backdrop-filter: blur(16px) saturate(1.08);}
  .drawerhead {background: rgb(251 246 237 / 91%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);}
}

@media (max-width: 650px) {
  .topline {padding: 12px 14px 8px; gap: 12px;}
  .brand b {font-size: 18px;}
  .brandmark {width: 38px; height: 38px; border-radius: 12px;}
  .nav {padding: 3px 14px 10px; gap: 4px;}
  .nav button {font-size: 12px; padding: 10px 14px; min-height: 44px;}
  .account .btn {padding: 9px 10px; min-height: 44px;}
  .wrap {padding: 23px 14px 38px;}
  .sectionhead {margin-bottom: 20px;}
  .panel {padding: 18px; border-radius: 19px;}
  .metric {padding: 17px; border-radius: 17px;}
  .metric strong {font-size: 30px;}
  .person {padding: 17px; border-radius: 18px;}
  .task summary {padding: 15px; gap: 10px;}
  .taskbody {padding: 15px;}
  input:not([type="checkbox"]):not([type="radio"]), select, textarea, .task-camera-slot select {font-size: 16px;}
  .drawerhead {padding: 18px;}
  .drawercontent {padding: 18px;}
  #drawer {border-radius: 0;}
  .task-camera-dialog {padding: 16px; border-radius: 20px;}
  .automation-filters {padding: 12px; gap: 10px;}
  .automation-pagination {flex-wrap: wrap;}
}

@media (max-width: 560px) {
  .topline {flex-wrap: wrap; row-gap: 10px;}
  .brand {flex: 1 1 145px;}
  .account {margin-left: auto; gap: 6px;}
  .account .interface-sound {padding: 9px;}
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .iconbtn, .nav button, .segmented button, .person {transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 100ms ease;}
  .btn:active:not(:disabled), .iconbtn:active:not(:disabled), .nav button:active:not(:disabled), .segmented button:active:not(:disabled) {transform: scale(.975);}
  .person:active:not(:disabled) {transform: scale(.995);}
  dialog[open] {animation: mbc-polish-drawer 180ms cubic-bezier(.2, .7, .2, 1);}
  .task-camera-dialog[open] {animation: mbc-polish-camera 160ms ease-out;}
  @keyframes mbc-polish-drawer {from {transform: translateX(12px); opacity: .7;} to {transform: translateX(0); opacity: 1;}}
  @keyframes mbc-polish-camera {from {transform: translateY(5px) scale(.99); opacity: .7;} to {transform: translateY(0) scale(1); opacity: 1;}}
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {animation: none !important; transition: none !important; scroll-behavior: auto !important;}
  .person:hover, .btn:active, .iconbtn:active, .nav button:active, .segmented button:active {transform: none;}
}

@media (prefers-reduced-transparency: reduce) {
  .top {background: var(--mbc-cream); backdrop-filter: none; -webkit-backdrop-filter: none;}
  .drawerhead {background: var(--mbc-surface); backdrop-filter: none; -webkit-backdrop-filter: none;}
  dialog::backdrop {background: #435064; backdrop-filter: none; -webkit-backdrop-filter: none;}
}

@media (forced-colors: active) {
  .top, .drawerhead, .panel, .metric, .person, .toolbar, .task, .taskbody, .requirement, .automation-filters, .task-camera-dialog, .task-camera-queue {background: Canvas; color: CanvasText; border-color: CanvasText; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none;}
  .btn, .iconbtn, .nav button, .segmented button, input, select, textarea {forced-color-adjust: auto; border: 1px solid ButtonText; box-shadow: none;}
  .nav button[aria-selected="true"], .segmented button.active, .interface-sound[aria-pressed="true"], .task-camera-flash-controls [aria-pressed="true"] {background: Highlight; color: HighlightText; border-color: Highlight;}
  button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .task-camera-dialog button:focus-visible, .task-camera-dialog select:focus-visible {outline-color: Highlight;}
}
