/* One form language across the workspace and full-page entry screens, including Safari. */
@media screen {
  body.cg-console { color: #243e50; background: #f3f6fa; }
  .cg-console label { color: #405968; font-size: 14px; font-weight: 600; }
  .cg-console :is(.console-workspace,.workspace,.people-workspace,.nsn-window) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea) {
    box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid #afc2ce; border-radius: 8px; background-color: #fff; color: #243e50;
    font: inherit; font-size: 15px; font-weight: 400; line-height: 1.4; box-shadow: 0 1px 2px #243e5005;
  }
  .cg-console :is(.console-workspace,.workspace,.people-workspace,.nsn-window) select:not([multiple]):not([size]) {
    -webkit-appearance: none; appearance: none; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m5 7 4 4 4-4' fill='none' stroke='%23405968' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; cursor: pointer;
  }
  .cg-console :is(input,select,textarea):hover:not(:disabled):not([readonly]) { border-color: #6f929f; }
  .cg-console :is(.console-workspace,.workspace,.people-workspace,.nsn-window) :is(input,select,textarea):focus-visible {
    border-color: #126e73; outline: 3px solid #16858a35; outline-offset: 2px;
  }
  .cg-console :is(.console-workspace,.workspace,.people-workspace,.nsn-window) :is(input,select,textarea):disabled { background-color: #f1f4f7; color: #647582; opacity: 1; cursor: not-allowed; }
  .cg-console :is(.console-workspace,.workspace,.people-workspace,.nsn-window) input[readonly] { background-color: #f3f6f8; }
  .cg-console input::placeholder,.cg-console textarea::placeholder { color: #748391; opacity: 1; }
  .cg-console :is(input,textarea,select)[aria-invalid=true] { border-color: #ae3150; }
  .cg-console .form-grid { align-items: start; gap: 20px 24px; }
  .cg-console .form-grid > * { min-width: 0; }
  .cg-console .form-grid label { margin: 0; }
  .cg-console label .small { display: block; font-weight: 400; margin-top: 6px; line-height: 1.5; }
  .cg-console .checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; line-height: 1.5; min-height: 36px; }
  .cg-console input:is([type=checkbox],[type=radio]) { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; padding: 0; accent-color: #126e73; }
  .cg-console .entry-page { max-width: 1200px; }
  .cg-console .entry-form { border-radius: 14px; box-shadow: 0 4px 18px #243e5006; }
  .cg-console .entry-header h1 { color: #243e50; letter-spacing: -.5px; }
  .cg-console .entry-nav { border: 0; padding: 10px; background: #e8eff4; border-radius: 10px; gap: 8px; }
  .cg-console .entry-nav a { padding: 8px 14px; border-radius: 7px; color: #315767; font-weight: 600; text-decoration: none; }
  .cg-console .entry-nav a:hover { background: #fff; color: #126e73; }
  .cg-console .entry-section { padding: 30px 0; scroll-margin-top: 24px; }
  .cg-console .entry-section h2 { color: #243e50; font-size: 20px; }
  .cg-console .form-section { border-top: 1px solid #e1e9ee; margin-top: 24px; padding-top: 20px; }
  .cg-console .form-section h3 { margin: 0 0 18px; color: #315767; font-size: 17px; }
  .cg-console .form-section .section-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
  .cg-console .form-section .section-heading h3 { margin: 0; }
  .cg-console .single-name-option { margin: 14px 0 0; }
  .cg-console .choice-field > label + label { margin-top: 12px; }
  .cg-console :is(.entry-page,.nsn-window) :is(button,.button) { border: 1px solid #afc2ce; border-radius: 8px; min-height: 44px; padding: 10px 16px; color: #285465; background: #fff; font-size: 14px; font-weight: 600; }
  .cg-console :is(.entry-page,.nsn-window) .primary { color: #fff; background: #126e73; border-color: #126e73; }
  .cg-console :is(.entry-page,.nsn-window) :is(a,button,summary):focus-visible { outline: 3px solid #176b94; outline-offset: 3px; }
  .cg-console .entry-actions { flex-wrap: wrap; }
  .cg-console .booking-version-row { position: relative; }
  .cg-console .workspace .booking-version-row:has(.booking-edit) > details > summary { padding-right: 165px; }
  .cg-console .booking-edit { position: absolute; top: 11px; right: 12px; }
  .cg-console .booking-version-row details[id] { scroll-margin-top: 20px; }
  .cg-console .select-combo { position: relative; display: block; font-weight: 400; }
  .cg-console .select-combo input { padding-right: 34px !important; cursor: text; }
  .cg-console .select-combo::after { content: '⌄'; position: absolute; top: 11px; right: 14px; color: #405968; pointer-events: none; }
  .cg-console .choice-results { position: absolute; z-index: 40; inset: 49px 0 auto; background: #fff; border: 1px solid #91b6c0; border-radius: 9px; box-shadow: 0 10px 30px #243e5024; max-height: 280px; overflow: auto; padding: 5px; color: #243e50; }
  .cg-console .choice-results [role=option] { cursor: pointer; padding: 10px 12px; border-radius: 5px; line-height: 1.45; overflow-wrap: anywhere; }
  .cg-console .choice-results [role=option][aria-selected=true],.cg-console .choice-results [role=option]:hover { color: #115c61; background: #e4f3f2; }
  .cg-console .choice-empty { padding: 12px; font-size: 14px; color: #596d7a; }
  .cg-console .select-combo .choice-status { display: block; margin-top: 4px; font-size: 12px; color: #596d7a; }
  .cg-console .enhanced-select { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .cg-console .address-lookup { max-width: 720px; background: #f0f7f8; border-radius: 9px; padding: 16px; margin: 0 0 18px; }
  .cg-console .address-lookup p { margin: 8px 0 0; font-size: 13px; font-weight: 400; line-height: 1.5; }
  /* A single control height also normalises Safari's segmented native date fields. */
  .cg-console :is(.console-workspace,.workspace,.people-workspace) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select:not([multiple]):not([size])) { height: 44px; }
  .cg-console input::-webkit-date-and-time-value { text-align: left; }
  .cg-console .attendance-navigation { align-items: end; justify-content: flex-start; gap: 16px 24px; }
  .cg-console .attendance-navigation > .inline-actions { margin-right: auto; }
  .cg-console .attendance-date-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
  .cg-console .attendance-date-form label { display: grid; gap: 6px; margin: 0; }
  .cg-console .attendance-date-form :is(input,select) { margin: 0; }
  .cg-console .attendance-date-form label:has(input[type=date]) { width: 170px; flex: 0 0 170px; }
  .cg-console .attendance-date-form label:has(select) { width: 110px; flex: 0 0 110px; }
  .cg-console .attendance-navigation :is(button,.button) { box-sizing: border-box; min-height: 44px; margin-bottom: 0; display: inline-flex; align-items: center; justify-content: center; }
  .cg-console .console-workspace .attendance-inputs { grid-template-columns: minmax(170px,.8fr) minmax(180px,1fr) minmax(180px,1fr) minmax(200px,1.2fr); align-items: start; }
  .cg-console .console-workspace .attendance-inputs > .reason { grid-column: 1 / -2; }
  .cg-console .attendance-inputs .reason textarea { min-height: 80px; resize: vertical; }
  .cg-console .console-workspace .attendance-inputs > button { align-self: end; margin: 0 0 4px; }
  .cg-console .time-picker { display: grid; gap: 6px; margin-top: 6px; }
  .cg-console .time-entry { display: flex; gap: 6px; min-width: 0; }
  .cg-console .time-entry > input { flex: 1; width: 0; }
  .cg-console .time-choice-button { position: relative; box-sizing: border-box; flex: 0 0 44px; height: 44px; background: #fff; border: 1px solid #afc2ce; border-radius: 8px; }
  .cg-console .time-choice-button::after { content: '⌄'; position: absolute; inset: 0; display: grid; place-items: center; color: #405968; font-size: 20px; pointer-events: none; }
  .cg-console .time-choice-button select.time-choices { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .cg-console .time-choice-button:focus-within { outline: 3px solid #16858a35; outline-offset: 2px; border-color: #126e73; }
  .cg-console .time-choice-button:has(select:disabled) { background: #f1f4f7; opacity: .6; }
  .cg-console .attendance-filters { justify-content: flex-start; align-items: end; gap: 12px; }
  .cg-console .attendance-filters label { margin: 0; }
  .cg-console .attendance-filters select { min-width: 180px; }
  .cg-console .attendance-filters button { margin-bottom: 0; }

  .cg-console .time-hint { margin: 0; font-size: 12px; font-weight: 400; }
  .cg-console .time-now { min-height: 36px; padding: 6px 10px; font-size: 12px; margin: 0; }
  @media(max-width:1100px) {
    .cg-console .console-workspace .attendance-inputs { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .cg-console .console-workspace .attendance-inputs > .reason { grid-column: 1 / -1; }
  }
  @media(max-width:600px) {
    .cg-console .console-workspace .attendance-inputs { grid-template-columns: minmax(0,1fr); }
    .cg-console .attendance-navigation > .inline-actions { flex-wrap: wrap; }
    .cg-console .attendance-date-form { width: 100%; }
  }
  .cg-console [hidden] { display: none !important; }
  @media(max-width:700px) {
    .cg-console .form-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
    .cg-console .form-grid .span-two { grid-column: auto; }
    .cg-console .entry-page { padding: 16px 12px 40px; }
    .cg-console .entry-form { padding: 0 18px; }
    .cg-console .entry-nav a { padding: 8px; font-size: 14px; }
    .cg-console .booking-edit { position: static; margin: 0 0 12px; }
    .cg-console .workspace .booking-version-row:has(.booking-edit) > details > summary { padding-right: 20px; }
    .cg-console .section-heading { flex-wrap: wrap; }
  }
}
@media print { .select-combo,.address-lookup,.booking-edit { display: none !important; } }

.fee-evidence-reference { overflow-wrap: anywhere; }
