:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #172033; background: #eef3f7; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: grid; grid-template-rows: auto 1fr auto; }
.site-header { min-height: 76px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; gap: 2rem; color: white; background: #173b68; border-bottom: 6px solid #95b947; }
.brand { color: white; font-size: 1.2rem; font-weight: 700; text-decoration: none; }
nav { display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; white-space: nowrap; }
nav a, .link-button { color: white; white-space: nowrap; }
.user-name { white-space: nowrap; text-transform: uppercase; }
nav form { margin: 0; }
.link-button { padding: 0; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.page-shell { width: min(1120px, 92vw); margin: 3rem auto; }
.login-card, .content-card { padding: clamp(1.5rem, 4vw, 3rem); background: white; border-radius: 12px; box-shadow: 0 12px 34px rgb(23 59 104 / 12%); }
.login-card { width: min(430px, 100%); margin: 5vh auto; }
.eyebrow { margin: 0 0 .4rem; color: #52721d; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin-top: 0; color: #173b68; }
.intro { color: #566174; }
label { display: block; margin: 1.1rem 0 .4rem; font-weight: 700; }
input { width: 100%; padding: .75rem .85rem; border: 1px solid #aeb9c5; border-radius: 6px; font: inherit; }
select { width: 100%; padding: .75rem .85rem; border: 1px solid #aeb9c5; border-radius: 6px; background: white; font: inherit; }
button[type="submit"] { margin-top: 1.4rem; padding: .75rem 1.2rem; color: white; background: #173b68; border: 0; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
.validation { color: #a31222; }
.validation:empty { display: none; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.module-grid article { padding: 1rem; border: 1px solid #d6dfe7; border-radius: 8px; }
.module-grid h2 { color: #173b68; font-size: 1rem; }
.module-ready { border-left: 5px solid #95b947 !important; }
.module-pending { background: #f7f9fb; }
.module-status { color: #637083; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.module-ready .module-status { color: #52721d; }
.action-link { color: #173b68; font-weight: 700; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.title-row h1 { margin-bottom: 0; }
.primary-button { padding: .75rem 1rem; color: white; background: #173b68; border-radius: 6px; font-weight: 700; text-decoration: none; }
.toolbar { display: flex; align-items: end; gap: .75rem; margin: 1.5rem 0; }
.toolbar label { flex: 1; margin: 0; }
.toolbar .sort-field { flex: 0 0 160px; }
.toolbar select { display: block; width: 100%; margin-top: .4rem; }
.toolbar button { margin: 0; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .75rem; border-bottom: 1px solid #d6dfe7; text-align: left; white-space: nowrap; }
.data-table th { color: white; background: #173b68; font-size: .82rem; }
.status-active { color: #3d6514; font-weight: 700; }
.status-inactive { color: #8a2934; font-weight: 700; }
.result-count { color: #566174; }
.error-panel { padding: 1rem; color: #8a1725; background: #fff2f3; border: 1px solid #e7b6bc; border-radius: 6px; }
.success-panel { padding: 1rem; color: #31550c; background: #f1f8e7; border: 1px solid #b9d58f; border-radius: 6px; }
.pagination { justify-content: center; margin-top: 1.5rem; color: #566174; }
.pagination a { color: #173b68; font-weight: 700; }
.edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.edit-form select { width: 100%; }
.form-wide { grid-column: 1 / -1; }
.profile-section { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid #c7d2de; border-radius: 8px; }
.profile-section legend { padding: 0 .5rem; color: #173b68; font-weight: 700; }
.profile-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.checkbox-field { display: flex; align-items: center; gap: .5rem; grid-column: 1 / -1; }
.checkbox-field input { width: auto; }
.form-actions { display: flex; align-items: center; gap: 1rem; grid-column: 1 / -1; }
.form-actions a { margin-top: 1.4rem; }
.secondary-button, .danger-button, .button-link { padding: .7rem 1rem; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
.secondary-button { margin-top: .5rem; color: #173b68; background: #eef3f7; border: 1px solid #9eabb9; }
.danger-button { color: white; background: #a31222; border: 0; }
.button-link { margin-top: 1.4rem; color: #173b68; background: #eef3f7; text-decoration: none; }
footer { padding: 1.25rem 5vw; text-align: center; color: #5e6878; }
@media (max-width: 900px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 651px) {
  .site-header { gap: 1.25rem; padding-inline: 4vw; }
  .site-header nav { gap: .9rem; font-size: .97rem; }
  .brand { flex: 0 0 auto; }
}
@media (max-width: 650px) { .module-grid { grid-template-columns: 1fr; } .site-header { align-items: flex-start; flex-direction: column; padding-block: 1rem; } nav { flex-wrap: wrap; } .toolbar { align-items: stretch; flex-direction: column; } .toolbar .sort-field { flex-basis: auto; } .edit-form, .profile-section-grid { grid-template-columns: 1fr; } }
.account-top-options { display: flex; flex-wrap: wrap; gap: 2rem; margin: 1rem 0; }
.inline-check { display: inline-flex; align-items: center; gap: .5rem; margin: .5rem 0; font-weight: 700; }
.inline-check input { width: auto; }
.account-checkbox { align-self: end; min-height: 48px; }
.billing-checks { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.account-selector { max-width: 680px; margin: 1.25rem 0; }
.account-selector label { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 1rem; }
.account-selector label select { margin: 0; }
.compact-link { margin-top: 0; }
.wide-card { width: min(1500px, 96vw); margin-left: 50%; transform: translateX(-50%); }
.send-table { min-width: 1400px; }
@media (max-width: 650px) { .account-selector label { grid-template-columns: 1fr; gap: .4rem; } .wide-card { width: 100%; margin-left: 0; transform: none; } }

.operations-module { margin-top: 2rem; padding: 1rem; border: 1px solid #d6dfe7; border-left: 5px solid #95b947; border-radius: 8px; }
.operations-module h2 { margin-bottom: .4rem; color: #173b68; font-size: 1rem; }
.operations-module p { margin-top: .4rem; color: #566174; }
.dictation-toolbar { align-items: end; flex-wrap: wrap; }
.dictation-toolbar .sort-field { flex: 0 0 180px; }
.dictation-folder { display: flex; flex: 1 1 420px; flex-direction: column; gap: .25rem; padding: .65rem .8rem; color: #566174; background: #f7f9fb; border: 1px solid #d6dfe7; border-radius: 6px; }
.dictation-folder strong { color: #8a2934; }
.dictation-folder span { overflow-wrap: anywhere; font-size: .82rem; }
.dictation-table { min-width: 1500px; }
.row-check { width: auto; }
.empty-table { padding: 2rem !important; color: #8a2934; text-align: center !important; font-weight: 700; }
.dictation-actions { margin-top: 1rem; }
.dictation-action-row { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.dictation-action-row .dictation-folder { margin-inline: auto; }
.action-button { margin: 0 !important; min-width: 108px; padding: .65rem .9rem !important; }
.bottom-actions { justify-content: space-between; align-items: flex-end; }
.stacked-actions { display: flex; flex-direction: column; gap: .55rem; }
.route-view-block { display: flex; flex-direction: column; align-items: stretch; gap: .45rem; min-width: 150px; text-align: center; font-weight: 700; }
.route-view-block label { margin: 0; }
.route-view-block select { display: block; width: 100%; margin-top: .3rem; }
@media (max-width: 900px) { .dictation-action-row { flex-wrap: wrap; } .dictation-action-row .dictation-folder { order: -1; flex-basis: 100%; } .bottom-actions { justify-content: flex-start; } }
.monitor-logoff { color: #173b68; margin: 0; }

.report-filter { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; gap:1rem; align-items:end; margin:1.5rem 0; }
.report-filter label { margin:0; }
.report-filter button { margin:0; }
.report-summary { display:flex; flex-wrap:wrap; gap:1.25rem; margin:1rem 0; color:#566174; }
.report-summary strong { color:#173b68; }
.report-table { min-width:1100px; }
.report-table tfoot th { background:#eef3f7; color:#173b68; }
.report-orange td { background:orange; }
.report-turquoise td { background:turquoise; }
.report-gold td { background:gold; }
.report-bisque td { background:bisque; }
.report-green td { background:lightgreen; }
@media (max-width:900px){ .report-filter{grid-template-columns:1fr 1fr;} }
@media (max-width:650px){ .report-filter{grid-template-columns:1fr;} }

.job-number-link { text-decoration: underline; font-weight: 600; }
.voice-download-link { text-decoration: none; margin-left: .35rem; font-size: 1rem; white-space: nowrap; }
.job-detail-table th { text-align: left; white-space: nowrap; }
.job-track-search,.job-track-detail{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:1rem;margin:1.25rem 0}.job-track-search label,.job-track-detail label,.job-track-fax label{display:flex;flex-direction:column;gap:.35rem;font-weight:600}.job-track-search input,.job-track-detail input,.job-track-fax input{padding:.55rem;border:1px solid #b9c6d3;border-radius:4px}.job-track-search .checkbox-label{flex-direction:row;align-items:center;align-self:end}.job-track-buttons,.job-track-update{display:flex;gap:.75rem;align-items:end}.job-track-actions{display:flex;justify-content:space-around;align-items:center;gap:1rem;padding:1rem 0;font-weight:700}.job-track-actions form{margin:0}.job-track-fax{display:grid;grid-template-columns:auto repeat(3,minmax(180px,1fr));gap:1rem;align-items:end;margin-top:1.25rem}.job-track-update{grid-column:1/-1;justify-content:center}@media(max-width:900px){.job-track-search,.job-track-detail,.job-track-fax{grid-template-columns:1fr}.job-track-actions{flex-wrap:wrap}}

/* Monthly invoice display intentionally uses its own table sizing.
   Do not inherit the 1100px report-table minimum width used by operational reports. */
.invoice-print { width: min(760px, 100%); max-width: 760px; margin: 1.5rem auto; background: #fff; color: #111; padding: 2rem; overflow: hidden; }
.invoice-attn { text-align: center; margin-bottom: 1.25rem; line-height: 1.1; }
.invoice-address { width: 100%; border-collapse: collapse; table-layout: fixed; margin-bottom: 1rem; }
.invoice-address td { vertical-align: top; padding: .15rem .35rem; overflow-wrap: anywhere; }
.invoice-address td:nth-child(1) { width: 40%; }
.invoice-address td:nth-child(2) { width: 10%; font-weight: 700; }
.invoice-address td:nth-child(3) { width: 50%; }
.invoice-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1rem 0; }
.invoice-meta span:last-child { text-align: right; }
.invoice-print .report-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.invoice-print .report-table th, .invoice-print .report-table td { padding: .3rem .25rem; vertical-align: top; overflow-wrap: anywhere; }
.invoice-print .report-table th { text-align: center; }
.invoice-print .report-table th:first-child, .invoice-print .report-table td:first-child { text-align: left; }
.invoice-print .invoice-summary th:first-child, .invoice-print .invoice-summary td:first-child { width: 34%; }
.invoice-print .invoice-summary th:nth-child(2), .invoice-print .invoice-summary td:nth-child(2) { width: 33%; text-align: center; }
.invoice-print .invoice-summary th:nth-child(3), .invoice-print .invoice-summary td:nth-child(3) { width: 33%; text-align: center; }
.invoice-print .invoice-summary tfoot th { border-top: 1px solid #cbd5df; background: #eef3f7; color: #173b68; }
.invoice-total { margin-top: 2rem; }
.invoice-thanks { text-align: center; margin-top: 2rem; }
.num { text-align: center; }
.checkbox-label { display: inline-flex; align-items: center; justify-content: flex-start; gap: .5rem; }
.checkbox-label input { width: auto; margin: 0; flex: 0 0 auto; }
.invoice-print-detail { margin: 1rem 0 0; }
.invoice-result-actions { padding-block: 1rem; }
.invoice-result-actions button { padding: .65rem 1rem; color: white; background: #173b68; border: 0; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 650px) {
  .invoice-print { padding: 1rem; }
  .invoice-meta { display: block; }
  .invoice-meta span { display: block; margin: .25rem 0; text-align: left !important; }
}
@media print {
  .site-header, footer, .no-print { display: none !important; }
  .page-shell { width: 100%; margin: 0; padding: 0; }
  .invoice-print { width: 100%; max-width: 7.5in; box-shadow: none; margin: 0 auto; padding: 0; overflow: visible; }
  .invoice-print .report-table { width: 100%; min-width: 0; }
  .invoice-detail-page { break-before: page; page-break-before: always; margin-top: 0; }
}
.invoice-detail-page { margin-top: 2rem; }
.invoice-detail-page h2 { margin-top: 0; }
.invoice-detail-page .report-table { font-size: .92rem; }

/* Customer portal */
.customer-home-message { margin-top: 1.5rem; }
.customer-chart-search { display: grid; grid-template-columns: 220px minmax(280px,1fr) auto; gap: 1rem; align-items: end; margin: 1.5rem 0; }
.customer-chart-search label { margin: 0; }
.customer-chart-search button { margin: 0; }
.customer-chart-table { min-width: 950px; }
.customer-advanced-search { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1.25rem; margin: 1.25rem 0; }
.customer-radio-row { display: flex; gap: 2rem; align-items: center; }
.customer-profile-grid input[readonly] { background: #f7f9fb; }
@media (max-width: 750px) { .customer-chart-search, .customer-advanced-search { grid-template-columns: 1fr; } }
