:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5b6b7c;
  --border: #d8dee6;
  --primary: #1f4b7a;
  --primary-hover: #163a5f;
  --success-bg: #e8f5e9;
  --success-text: #1b5e20;
  --error-bg: #fdecea;
  --error-text: #b71c1c;
  --warn-bg: #fff8e1;
  --warn-text: #8d6e00;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.wrap.wide { max-width: 980px; }

header.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

header .sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field.full { grid-column: 1 / -1; }

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

label .req { color: #c62828; }

input[type="text"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 75, 122, 0.35);
  border-color: var(--primary);
}

textarea { min-height: 100px; resize: vertical; }

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Customers marked "No site needed" (e.g. Shop Time) */
.hint.site-not-needed { display: block; color: #1f6f43; font-weight: 600; }
.opt-flag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); white-space: nowrap; margin-right: 0.25rem; }
.opt-flag input { margin: 0; }

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

button,
.btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
}

button:hover,
.btn:hover { background: var(--primary-hover); }

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select:disabled {
  background: #f0f3f6;
  color: var(--muted);
  cursor: not-allowed;
}

/* Searchable combo box (Site / Well) */
.combo { position: relative; }
.combo input[type="text"] { padding-right: 2.4rem; }
.combo input[type="text"]:disabled {
  background: #f0f3f6;
  color: var(--muted);
  cursor: not-allowed;
}
.combo-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 2.2rem;
  padding: 0;
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
}
.combo-toggle:hover { background: #eef2f6; }
.combo-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.12);
}
.combo-list li {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}
.combo-list li.active { background: #e3ecf5; }
.combo-list li.selected { font-weight: 600; }
.combo-list li.combo-note {
  cursor: default;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.combo-list mark { background: #fff3b0; color: inherit; padding: 0; }

.inline-form select {
  flex: 1;
  min-width: 140px;
}

button.secondary,
.btn.secondary {
  background: #eef2f6;
  color: var(--text);
  border: 1px solid var(--border);
}

button.secondary:hover,
.btn.secondary:hover { background: #e2e8ef; }

button.danger {
  background: #c62828;
}
button.danger:hover { background: #a11d1d; }

button.small,
.btn.small {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid #a5d6a7;
}

.alert.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid #ef9a9a;
}

.alert.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid #ffe082;
}

.alert.hidden { display: none; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tabs button {
  background: #eef2f6;
  color: var(--text);
  border: 1px solid var(--border);
}

.tabs button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.panel { display: none; }
.panel.active { display: block; }

.option-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.option-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.option-list li:last-child { border-bottom: none; }

.option-list .label {
  flex: 1;
  font-weight: 500;
}

.option-list.compact li {
  padding: 0.3rem 0.25rem;
  gap: 0.35rem;
}

.option-list.compact li:hover { background: #f7f9fb; }
.option-list.compact .label { font-weight: 450; }
.option-list.compact button.small { padding: 0.2rem 0.55rem; font-size: 0.78rem; }
.option-list.compact .opt-edit-input { flex: 1; padding: 0.3rem 0.5rem; }

.subtabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin: -0.25rem 0 1rem;
}

.subtabs .subtab {
  background: transparent;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0.85rem;
  margin-bottom: -1px;
}

.subtabs .subtab:hover { background: #eef2f6; color: var(--text); }

.subtabs .subtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.subtab-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: #eef2f6;
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  margin-left: 0.2rem;
}

.subtab-count:empty { display: none; }

.opt-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 1rem;
  align-items: end;
}

.opt-head .field { margin-bottom: 0.75rem; }
.opt-customer.hidden { display: none; }
.opt-head .opt-customer.hidden + .opt-add { grid-column: 1 / -1; }

.opt-add { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }
.opt-add-row { display: flex; gap: 0.5rem; }
.opt-add-row input { flex: 1; min-width: 0; }
.opt-add-row button { white-space: nowrap; }

.opt-bulk {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f7f9fb;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.opt-bulk textarea { min-height: 120px; }
.opt-bulk .actions { margin-top: 0; }

.opt-searchbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.opt-searchbar input { flex: 1; min-width: 200px; }
.opt-count { font-size: 0.85rem; white-space: nowrap; }

.pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.pager.hidden { display: none; }

@media (max-width: 640px) {
  .opt-head { grid-template-columns: 1fr; }
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.inline-form input { flex: 1; min-width: 160px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }

.login-box { max-width: 380px; margin: 3rem auto; }

.signed-in { font-size: 0.9rem; }
.signed-in strong { color: var(--text); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  background: #eef2f6;
}

.badge.sent { background: #e8f5e9; color: #1b5e20; }
.badge.logged { background: #fff8e1; color: #8d6e00; }
.badge.failed { background: #fdecea; color: #b71c1c; }

.desc-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

footer.note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.hidden { display: none !important; }

.section-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 650;
}

.day-meta {
  margin-bottom: 1rem;
}

.day-meta textarea {
  min-height: 72px;
}

.total-display {
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0.45rem 0;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.tickets-panel {
  margin-top: 1rem;
}

.tickets-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.tickets-empty {
  padding: 0.75rem 0 0.25rem;
}

.row-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
}

tr.editing-row {
  background: #f0f6fc;
}

.day-submit-actions {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.ticket-detail {
  margin: 0.35rem 0 0.75rem 1rem;
  padding: 0.5rem 0.75rem;
  background: #f7f9fb;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
}

.ticket-detail strong {
  font-weight: 650;
}

.day-row-summary {
  min-width: 0;
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-preview {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 28rem;
  overflow: auto;
}


.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.period-picker { margin-bottom: 1rem; }

.period-status {
  padding: 0.45rem 0;
  min-height: 1.6rem;
}

.hours-hero {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #1f4b7a 0%, #163a5f 100%);
  color: #fff;
  border-color: #163a5f;
}

.hours-hero-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hours-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .hours-hero-grid { grid-template-columns: 1fr; }
}

.hours-hero-item {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.hours-hero-item.highlight {
  background: rgba(255, 255, 255, 0.22);
}

.hours-hero-k {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.hours-hero-v {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hours-hero-v.ot { color: #ffe082; }

.hours-hero .hint { color: rgba(255, 255, 255, 0.8); }

.totals-card { margin-bottom: 1rem; }

.totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
}

.total-box {
  background: #f7f9fb;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.total-box.highlight {
  background: #e8f0f8;
  border-color: #b8cce0;
}

.total-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.15rem;
}

.total-value.ot { color: #b86e00; }

.day-block {
  border-top: 1px solid var(--border);
  padding: 0.55rem 0 0.35rem;
}

.day-block:first-child { border-top: none; padding-top: 0.25rem; }

.day-block-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.day-row-main {
  min-width: 0;
  flex: 1 1 18rem;
}

.day-row-primary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.day-row-primary .badge { margin: 0; }

.day-hours {
  color: var(--primary);
  margin-left: 0.25rem;
}

#days-card { padding: 0.85rem 1rem; }
#days-card .tickets-header { margin-bottom: 0.35rem; }

.week-section + .week-section {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

.week-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.week-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.week-section-range {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.week-section-empty {
  margin: 0;
  padding: 0.45rem 0;
  font-size: 0.85rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.modal {
  width: min(860px, 100%);
  max-height: none;
  margin-bottom: 2rem;
}

.period-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #e8f0f8;
  border: 1px solid #b8cce0;
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}

.strip-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.strip-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.strip-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.strip-stats strong {
  font-weight: 700;
  color: var(--primary);
}

.ot-text { color: #b86e00 !important; }

/* ---- SOPs & Documentation ---- */

.nav-link.active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.doc-toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.doc-toolbar input[type="text"] { flex: 2 1 16rem; width: auto; }
.doc-toolbar select { flex: 1 1 10rem; width: auto; }
.doc-count { font-size: 0.85rem; white-space: nowrap; }

.doc-table td { vertical-align: middle; }
.doc-table .actions-cell { width: 1%; }
.doc-table .row-actions { justify-content: flex-end; }
.doc-table td.nowrap { white-space: nowrap; }
.doc-title-link { font-weight: 600; }

a.btn { display: inline-block; text-decoration: none; line-height: 1.5; }
a.btn:hover { text-decoration: none; }

.doc-viewer { margin-bottom: 1rem; padding: 0.85rem 1rem; }

.doc-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.doc-viewer-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-viewer-title .muted { font-size: 0.85rem; }

.doc-frame {
  width: 100%;
  height: 78vh;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fb;
}

.doc-image {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.doc-noview { margin: 0.5rem 0; }

.doc-form .grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .doc-form .grid { grid-template-columns: 1fr; }
}

.doc-form input[type="file"] { font: inherit; font-size: 0.9rem; }

.doc-form.editing {
  border-left: 3px solid var(--primary);
  padding-left: 0.85rem;
}

/* Company banner eyebrow above page headings, and the signed-in role tag */
.brand-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #666);
}
.role-tag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.06);
}
.role-tag:empty { display: none; }

/* Approvals */
.badge.appr-pending { background: #fff8e1; color: #8d6e00; }
.badge.appr-approved { background: #e8f5e9; color: #1b5e20; }
.badge.appr-rejected { background: #fdecea; color: #b71c1c; }
.approvals-toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.approvals-toolbar .subtabs { margin: 0; }
.inline-check { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.inline-check input { width: auto; }
.appr-list { margin-top: 0.75rem; }
.appr-item { border-top: 1px solid #e3e8ee; padding: 0.75rem 0; }
.appr-item:first-child { border-top: none; }
.appr-head { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.appr-head .appr-check { width: auto; }
.appr-head .row-actions { margin-left: auto; }
.appr-submitted { font-size: 0.85rem; }
.appr-tickets { margin: 0.4rem 0 0.2rem; padding-left: 1.2rem; }
.appr-tickets li { margin: 0.2rem 0; }
.appr-desc { white-space: pre-wrap; }
.appr-note { margin-top: 0.25rem; color: #b71c1c; }
.approval-line { margin-top: 0.2rem; font-size: 0.88rem; }

/* Login page: heading, subtitle and sign-in card centered as one column */
.login-wrap {
  max-width: 420px;
  padding-top: 3rem;
}
header.app-header.login-header {
  justify-content: center;
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-header > div { width: 100%; }
.login-wrap .login-box {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  box-sizing: border-box;
}
.login-wrap .alert { max-width: 380px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.login-wrap .login-box button[type="submit"] { width: 100%; }
@media (max-width: 480px) {
  .login-wrap { padding: 1.5rem 0.75rem 2rem; }
  .login-wrap .login-box { padding: 1.25rem 1rem; }
}

/* ---- Company branding (signed-in users with a company) ---- */
/* Large, faint watermark fixed behind the page; cards stay opaque so forms remain fully readable. */
body.has-company::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center 58%;
  opacity: 0.07;
}
body.company-white-horse::before {
  background-image: url("/img/logo-white-horse.png");
  background-size: min(62vw, 640px) auto;
}
body.company-blackwell::before {
  background-image: url("/img/logo-blackwell.png");
  background-size: min(86vw, 1100px) auto;
}
body.has-company {
  background-image: radial-gradient(ellipse at 50% 0%, rgba(31, 75, 122, 0.06), transparent 60%);
  background-attachment: fixed;
}
body.has-company > .wrap {
  position: relative;
  z-index: 1;
}
/* Frosted cards: the watermark only ghosts through faintly, text contrast is unaffected. */
body.has-company .card {
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

/* Small crisp logo beside the header title */
body.has-company header.app-header { align-items: center; }
.brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.brand-text { min-width: 0; }
.brand-mark {
  height: 60px;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(16, 24, 40, 0.12));
}
.brand-mark.brand-mark-square {
  height: 50px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
  filter: none;
}
@media (max-width: 640px) {
  .brand-block { gap: 0.6rem; align-items: flex-start; }
  .brand-mark { margin-top: 0.2rem; }
  .brand-mark { height: 42px; }
  .brand-mark.brand-mark-square { height: 40px; border-radius: 6px; }
  body.company-white-horse::before { background-size: 88vw auto; background-position: center 62%; }
  body.company-blackwell::before { background-size: 96vw auto; background-position: center 62%; }
  body.has-company::before { opacity: 0.06; }
}
@media print {
  body.has-company::before { display: none; }
}

/* Keep the dark "Current hours entered" hero readable when company branding frosts the cards. */
body.has-company .card.hours-hero {
  background: linear-gradient(135deg, #1f4b7a 0%, #163a5f 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Missing / invalid required field (time-entry forms) */
.field.field-invalid input[type="text"],
.field.field-invalid input[type="date"],
.field.field-invalid input[type="number"],
.field.field-invalid select,
.field.field-invalid textarea {
  border: 2px solid #d32f2f;
  background-color: #fdecec;
}
.field.field-invalid input:focus,
.field.field-invalid select:focus,
.field.field-invalid textarea:focus {
  outline: 2px solid rgba(211, 47, 47, 0.35);
  border-color: #d32f2f;
}
.field.field-invalid > label { color: #b71c1c; }
.field-error {
  color: #c62828;
  font-size: 0.8rem;
  font-weight: 600;
}
tr.row-invalid td { background: #fdecec; }
tr.row-invalid td:first-child { box-shadow: inset 3px 0 0 #d32f2f; }
.row-error { color: #c62828; font-size: 0.8rem; font-weight: 600; margin-top: 0.2rem; }
.ticket-editor.ticket-invalid { border: 2px solid #d32f2f; }

/* Admin > Activity tab */
.act-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
.act-filters .field { margin: 0; min-width: 9rem; }
.act-filters .act-buttons { display: flex; gap: 0.4rem; padding-bottom: 0.15rem; }
.table-scroll { overflow-x: auto; }
