/* Online adapters for the original SIGMA frontend styles, loaded before this file.
   The original office shell, compact controls and schedule board remain the source. */
:root {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  color: var(--ink);
  background: var(--bg);
  --ink: #172d43;
  --muted: #496075;
  --blue: #235a96;
  --bg: #f3f5f8;
  --border: #708497;
  --line: #cbd5e1;
}
:root.large-text { font-size: 21px; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button:hover, .button:hover { background: #edf3fa; }
button.primary, .button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
button.primary:hover, .button.primary:hover { background: #194b80; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, main:focus-visible {
  outline: 3px solid #be5300;
  outline-offset: 3px;
}
a { color: #174f86; }
h1, h2, h3 { line-height: 1.3; }
p { margin: 8px 0 18px; }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; }
label { display: block; margin: 0 0 16px; font-size: .85rem; font-weight: 600; }
main { width: 100%; min-width: 0; margin: auto; max-width: 1320px; padding: 26px 24px 44px; }
body > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { text-decoration: none; color: inherit; }
.brand > div { min-width: 0; }
.brand strong, .brand small { overflow-wrap: anywhere; }
.brand-mark { border-radius: 50%; }
.header-controls { margin-left: auto; }
#account { display: flex; align-items: center; gap: 12px; font-size: .8rem; }
.account-person { display: grid; text-align: right; line-height: 1.4; }
.account-person small { color: var(--muted); }
body[data-role=office] #account { font-size: .76rem; }
body[data-role=office] #account small { color: #d4e1f0; }
body[data-role=office] #logout { min-height: 34px; font-size: .78rem; color: #fff; background: transparent; border-color: #72869d; }
body[data-role=office] #font-toggle { min-height: 34px; }
#tenant-context { padding: 6px 24px; color: #43556c; background: #edf1f6; border-bottom: 1px solid #d6dee8; font-size: .75rem; }
body[data-role=office] > #tenant-context { grid-column: 1 / -1; padding: 5px 18px; }
body[data-role=office] .sidebar-note { overflow-wrap: anywhere; }
body[data-role=office] .office-nav-item .nav-icon { width: 17px; height: 17px; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 10; padding: 10px 16px; background: #fff; }
.skip-link:focus { top: 8px; }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.welcome { max-width: 650px; margin: 8vh auto; padding: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.welcome h1 { margin: 0 0 18px; }
.welcome p { color: var(--muted); }
.welcome .eyebrow { color: #315579; }
.office-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.office-title .eyebrow { margin: 0 0 4px; font-size: .7rem; }
.schedule-toolbar .office-filter { display: block; margin: 0; font-weight: 600; }
.schedule-toolbar .toolbar-spacer { flex: 1; }
.schedule-toolbar .office-filter input, .schedule-toolbar .office-filter select { margin-top: 5px; }
.schedule-range { gap: 10px; }
.schedule-range h2 { font-size: 1.05rem; }
#appointment-count { font-size: .8rem; color: var(--muted); }
.schedule-scroll { max-width: 100%; }
/* Keep the original seven-day board inside its own scroll region on narrow screens. */
.schedule-board { min-width: 1000px; }
.schedule-board th:first-child { width: 155px; }
.schedule-board td { height: 230px; padding: 8px; }
.schedule-board .current-day { background: #f3f7fe; }
.schedule-board thead .current-day { background: #e4eefc; }
.schedule-board th small { font-weight: 400; }
.schedule-card { overflow-wrap: anywhere; }
.schedule-board .schedule-card { padding: 8px !important; hyphens: auto; }
.schedule-card .time { color: #254a76; font-size: .76rem; }
.schedule-card .badge { margin-top: 0; }
.schedule-empty { font-size: .76rem; }
.empty-roster { margin: 0; padding: 24px; font-size: .9rem; }
.cancelled { border-left-color: #a76368; background: #fbf4f4; }
.cancelled strong { text-decoration: line-through; }
.badge { display: inline-block; background: #e7eef8; color: #24508a; font-size: .7rem; padding: 3px 7px; border-radius: 4px; font-weight: 600; }
.cancelled .badge, .badge.cancelled-label { color: #8c303b; background: #f6e5e8; }
.message { color: #9a2738; font-size: .85rem; line-height: 1.5; }
.message:empty { display: none; }
.sync { margin: 16px 0 0; font-size: .74rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .78rem; font-weight: 400; }
.field-view { max-width: 1120px; }
.field-view .page-heading { margin-bottom: 24px; }
.field-view .page-heading h1 { margin: 0 0 8px; font-size: 1.9rem; }
.field-view .page-heading p { margin: 0; color: var(--muted); }
.field-view .schedule-toolbar { border-radius: 8px; }
.field-day { margin: 26px 0; }
.field-day h3 { font-size: 1rem; margin: 0 0 12px; text-transform: capitalize; }
.field-day h3 span { display: inline-block; padding: 3px 10px; margin-right: 8px; background: #e4ebf5; border-radius: 5px; font-variant-numeric: tabular-nums; }
.field-day.today h3 span { background: #235a96; color: #fff; }
.field-day .later-order { grid-template-columns: 100px minmax(0,1fr) 20px; line-height: 1.5; }
.field-day .later-order .time small { font-size: .73rem; margin-top: 2px; }
.field-day .later-order .badge { margin-top: 6px; }
.field-day .later-list { gap: 10px; }
.field-day .empty { padding: 8px 14px; border-left: 2px solid #d5dfeb; font-size: .85rem; color: #53677b; }
dialog { width: min(740px,calc(100% - 24px)); max-height: calc(100dvh - 24px); border: 1px solid #9eb1c5; padding: 0; border-radius: 7px; color: var(--ink); background: #f5f7f9; box-shadow: 0 18px 70px #112d4c40; }
dialog::backdrop { background: #112b4980; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 0; font-size: 1.2rem; }
.icon-button { min-width: 44px; border: 0; background: transparent; color: #496075; font-size: 1.7rem; padding: 0; }
dialog .record-section { margin: 18px 22px; padding: 16px 18px; min-width: 0; }
dialog legend { padding: 0 7px; font-size: .9rem; font-weight: 650; }
dialog .record-section label:last-child, dialog .record-section p:last-child { margin-bottom: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row label { min-width: 0; }
#form-message { margin: 16px 22px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 22px; background: #fff; border-top: 1px solid var(--line); }
.dialog-actions .danger { margin-right: auto; color: #922f3c; border-color: #c99ba4; }
#details-body { padding: 20px 24px; background: #fff; }
.facts { margin: 0; }
.facts div { padding: 15px 0; }
.facts dd { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70%; }
.instruction { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 0; }
.tenant-panel { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.tenant-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tenant-form label { flex: 1; min-width: 200px; margin: 0; }
.tenant-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.tenant-row small { display: block; color: var(--muted); }
body > footer { padding: 20px 24px; font-size: .75rem; }
@media (max-width:720px) {
  main { padding: 22px 16px; }
  body > header { padding: 12px 16px; gap: 12px; }
  body > header .header-controls { width: auto; margin-left: auto; gap: 8px; }
  .account-person { display: none; }
  #account { gap: 6px; }
  #font-toggle { font-size: .72rem; padding: 5px 8px; }
  #logout { padding: 6px 10px; font-size: .78rem; }
  body[data-role=office] > header .brand > div { display: block; }
  body[data-role=office] > header .brand small { border: 0; padding: 0; font-size: .65rem; }
  body[data-role=office] > #main-nav .office-nav-item { flex: 0 0 auto; }
  body[data-role=office] .office-title > button { width: 100%; }
  .schedule-toolbar { align-items: center; }
  .schedule-toolbar > .office-filter { flex: 1 1 100%; min-width: 0; }
  .schedule-toolbar .toolbar-spacer { display: none; }
  .schedule-toolbar > button { flex: 1; }
  .schedule-range { align-items: flex-start; flex-direction: column; margin-top: 16px; }
  .schedule-range h2 { font-size: .95rem; }
  .field-view .page-heading h1 { font-size: 1.65rem; }
  .field-day .later-order { grid-template-columns: 74px minmax(0,1fr) 14px; gap: 10px; padding: 16px 12px; }
  .field-day .later-order strong { font-size: 1rem; }
  .field-day .later-order small { font-size: .82rem; }
  .field-day .later-order .time { font-size: .9rem; }
  .form-row { grid-template-columns: 1fr; gap: 14px; }
  .form-row label { margin: 0; }
  dialog .record-section { margin: 14px 12px; padding: 14px 12px; }
  .dialog-heading, .dialog-actions { padding: 14px 16px; }
  .dialog-actions button { flex: 1; }
  .dialog-actions .danger { flex-basis: 100%; }
  #details-body { padding: 16px; }
  .facts div { flex-direction: column; gap: 4px; }
  .facts dd { max-width: 100%; text-align: left; }
  .tenant-row { align-items: flex-start; flex-direction: column; }
}
@media (pointer:coarse) {
  body[data-role=office] .office-app button, body[data-role=office] .office-app input, body[data-role=office] .office-app select,
  body[data-role=office] > #main-nav .office-nav-item, body[data-role=office] #font-toggle, body[data-role=office] #logout { min-height: 44px !important; }
}
