html, body {
    background: #f5f7f9;
    color: #17212b;
    font-family: "Segoe UI", Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.page-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-heading h1 {
    font-size: 2rem;
    margin: 0;
}

.page-heading p {
    color: #5b6670;
    margin: .25rem 0 0;
}

.top-row a {
    color: #263847;
    font-weight: 600;
    margin-left: 1rem;
    text-decoration: none;
}

.top-row a:hover {
    color: #1b6ec2;
    text-decoration: underline;
}

.notice {
    background: #e8f1fb;
    border-left: 4px solid #1b6ec2;
    border-radius: 6px;
    margin: 0 0 1rem;
    padding: 1rem;
}

.tenant-banner,
.panel,
.form-panel {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.tenant-banner {
    display: grid;
    gap: 1rem;
    grid-template-columns: 2fr 1fr 1.4fr;
}

.tenant-banner h2 {
    margin: 0;
}

.eyebrow {
    color: #6a7580;
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
}

.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.metric-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 1rem;
}

.metric-card span {
    color: #607080;
    display: block;
    font-size: .85rem;
}

.metric-card strong {
    display: block;
    font-size: 1.8rem;
}

.metric-card p {
    margin: .25rem 0 0;
}

.data-table {
    border-collapse: collapse;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #e2e7ec;
    padding: .7rem;
    text-align: left;
}

.data-table th {
    color: #4f5d69;
    font-size: .85rem;
}

.feature-list {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-list div {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: .75rem;
}

.welcome-panel {
    align-items: center;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.welcome-panel h2 {
    margin: 0 0 .35rem;
}

.welcome-panel p {
    color: #52616f;
    margin: 0;
}

.home-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.home-action-card,
.guide-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    color: #17212b;
    display: grid;
    gap: .4rem;
    padding: 1rem;
    text-decoration: none;
}

.home-action-card:hover {
    border-color: #1b6ec2;
    box-shadow: 0 8px 24px rgba(27, 110, 194, .12);
    color: #17212b;
}

.home-action-card span,
.guide-card span {
    color: #607080;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.home-action-card strong,
.guide-card strong {
    font-size: 1.15rem;
}

.home-action-card p,
.guide-card p,
.module-overview-grid p {
    color: #52616f;
    margin: 0;
}

.home-two-column {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}

.home-alert-list {
    display: grid;
    gap: .75rem;
}

.home-alert-list article {
    background: #f8fafc;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    padding: .75rem;
}

.home-alert-list span,
.home-alert-list small {
    color: #607080;
}

.home-alert-list p {
    margin: 0;
}

.workflow-path {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.workflow-path span {
    background: #eef4fa;
    border: 1px solid #d8e6f4;
    border-radius: 999px;
    color: #263847;
    font-weight: 700;
    padding: .45rem .75rem;
}

.module-overview-grid,
.guide-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.module-overview-grid article {
    background: #f8fafc;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .45rem;
    padding: .85rem;
}

.module-overview-grid a {
    font-weight: 700;
    text-decoration: none;
}

.guide-card ul {
    margin: .25rem 0 .5rem;
    padding-left: 1.1rem;
}

.guide-card li {
    margin-bottom: .25rem;
}

.form-panel {
    display: grid;
    gap: 1rem;
    max-width: 620px;
}

.form-panel label {
    display: grid;
    gap: .35rem;
}

.customer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}

.customer-form label:nth-of-type(5),
.customer-form label:nth-of-type(6),
.customer-form label:nth-of-type(10) {
    grid-column: span 2;
}

.table-toolbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.table-toolbar h2 {
    margin: 0;
}

.search-box {
    max-width: 320px;
}

.selected-row {
    background: #eef5fc;
}

.contact-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto auto;
    margin-bottom: 1rem;
}

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

.scan-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.4fr .7fr .8fr 1.4fr auto;
}

.po-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.po-form label:nth-of-type(6) {
    grid-column: span 3;
}

.po-line-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 2fr .7fr .7fr auto;
    margin-bottom: 1rem;
}

.receive-box {
    min-width: 90px;
}

.wo-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.wo-form label:nth-of-type(8),
.wo-form label:nth-of-type(9) {
    grid-column: span 3;
}

.tech-actions {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.5fr 1fr 1.4fr auto auto;
}

.tech-button {
    min-height: 56px;
    min-width: 130px;
}

.tech-mobile-command {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr);
    margin-bottom: 1rem;
}

.tech-current-card,
.tech-quick-actions {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 1rem;
}

.tech-current-card strong {
    display: block;
    font-size: 1.35rem;
    margin: .25rem 0;
}

.tech-current-card p {
    color: #263847;
    font-size: 1rem;
    margin: 0 0 .75rem;
}

.tech-current-meta,
.tech-pill-actions,
.tech-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tech-current-meta span {
    background: #eef4fa;
    border-radius: 999px;
    color: #263847;
    font-size: .86rem;
    padding: .3rem .65rem;
}

.tech-pill-actions .btn {
    min-height: 44px;
}

.clock-in-button,
.clock-out-button {
    font-size: 1rem;
    font-weight: 700;
}

.tech-mobile-panel h2 {
    font-size: 1.15rem;
}

.tech-card-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.tech-task-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    min-height: 126px;
    padding: 1rem;
    text-align: left;
}

.tech-task-card strong,
.tech-work-card strong,
.tech-labor-card strong {
    font-size: 1rem;
}

.tech-task-card span {
    color: #17212b;
}

.tech-task-card small,
.tech-work-card small,
.tech-labor-card small {
    color: #52616f;
}

.tech-status {
    background: #eef1f4;
    border-radius: 999px;
    color: #263847;
    display: inline-block;
    font-style: normal;
    font-weight: 700;
    justify-self: start;
    padding: .2rem .55rem;
}

.tech-status-active {
    background: #e8f1fb;
    color: #1b5d91;
}

.tech-status-waiting {
    background: #fff0df;
    color: #8a4b00;
}

.tech-status-complete {
    background: #e4f5ea;
    color: #126b35;
}

.tech-update-stack {
    display: grid;
    gap: .85rem;
}

.tech-form-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: .7fr minmax(0, 1.5fr) auto;
}

.tech-form-grid label:nth-of-type(2) {
    grid-column: span 1;
}

.tech-parts-grid {
    grid-template-columns: 1.1fr 1.4fr .5fr .7fr auto;
}

.tech-work-card-grid,
.tech-labor-card-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.tech-work-card,
.tech-labor-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    padding: .85rem;
    text-align: left;
}

.tech-work-card em,
.tech-labor-card em {
    color: #1b6ec2;
    font-style: normal;
    font-weight: 700;
}

.dispatch-form {
    grid-template-columns: 1.5fr 1fr .8fr .8fr auto;
    max-width: none;
}

.labor-report-form,
.audit-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    max-width: none;
}

.warranty-rule-form {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: none;
}

.warranty-rule-form label:nth-of-type(10) {
    grid-column: span 4;
}

.dispatch-filters {
    display: grid;
    gap: .5rem;
    grid-template-columns: 160px 120px 220px repeat(3, auto);
}

.calendar-week-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    margin-bottom: 1rem;
    overflow-x: auto;
}

.calendar-day {
    background: #f8fafc;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    min-height: 260px;
    padding: .65rem;
}

.calendar-day-active {
    border-color: #1b6ec2;
    box-shadow: inset 0 0 0 1px #1b6ec2;
}

.calendar-day-header {
    background: transparent;
    border: 0;
    display: grid;
    gap: .15rem;
    padding: 0 0 .5rem;
    text-align: left;
    width: 100%;
}

.calendar-day-header strong {
    font-size: .95rem;
}

.calendar-day-header span,
.calendar-day-header em,
.calendar-event small,
.calendar-more {
    color: #52616f;
    font-style: normal;
}

.calendar-load {
    background: #e8edf2;
    border-radius: 999px;
    height: .45rem;
    margin-bottom: .6rem;
    overflow: hidden;
}

.calendar-load span {
    background: #1b6ec2;
    display: block;
    height: 100%;
}

.calendar-event {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .15rem;
    margin-bottom: .45rem;
    padding: .55rem;
    text-align: left;
    width: 100%;
}

.calendar-event span {
    color: #17212b;
}

.calendar-work-center {
    align-items: center;
    background: #eef4fa;
    border-radius: 6px;
    color: #263847;
    display: flex;
    font-size: .82rem;
    justify-content: space-between;
    margin: .35rem 0;
    padding: .35rem .45rem;
}

.dispatch-board {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dispatch-column {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    min-height: 280px;
    padding: .75rem;
}

.dispatch-column h3 {
    align-items: center;
    display: flex;
    font-size: 1rem;
    justify-content: space-between;
    margin: 0 0 .75rem;
}

.dispatch-column h3 span {
    background: #e8f1fb;
    border-radius: 999px;
    color: #1b4f82;
    min-width: 30px;
    padding: .15rem .5rem;
    text-align: center;
}

.dispatch-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    margin-bottom: .75rem;
    min-height: 140px;
    padding: .85rem;
    text-align: left;
    width: 100%;
}

.dispatch-card span {
    color: #17212b;
}

.dispatch-card small {
    color: #52616f;
}

.dispatch-card em {
    color: #1b6ec2;
    font-style: normal;
    font-weight: 700;
}

.capacity-bar {
    background: #e8edf2;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    width: 100%;
}

.capacity-bar span {
    background: #1b6ec2;
    display: block;
    height: 100%;
}

.capacity-overloaded .capacity-bar span {
    background: #c43d3d;
}

.capacity-overloaded td {
    background: #fff3f3;
}

.parts-request-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.parts-request-form label:nth-of-type(7) {
    grid-column: span 3;
}

.kanban-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    overflow-x: auto;
}

.kanban-column {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    min-height: 220px;
    padding: .75rem;
}

.kanban-column h3 {
    font-size: 1rem;
    margin: 0 0 .75rem;
}

.kanban-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    margin-bottom: .75rem;
    padding: .75rem;
}

.selected-card {
    border-color: #1b6ec2;
}

.link-button {
    background: transparent;
    border: 0;
    color: inherit;
    display: grid;
    gap: .25rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.link-button span {
    color: #52616f;
}

.request-update-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: .9fr 1fr 1fr 1.5fr auto;
    margin-bottom: 1rem;
}

.quote-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.quote-form label:nth-of-type(7) {
    grid-column: span 3;
}

.quote-line-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr .75fr 1.5fr .5fr .7fr auto auto auto;
    margin-bottom: 1rem;
}

.quote-section-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .75rem;
}

.quote-section-summary span,
.quote-check-label {
    align-items: center;
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    color: #52616f;
    display: inline-flex;
    gap: .4rem;
    min-height: 38px;
    padding: .45rem .65rem;
}

.quote-line-section {
    min-width: 150px;
}

.quote-builder {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(220px, .7fr) minmax(220px, .7fr) minmax(0, 1.6fr);
}

.quote-palette {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    min-height: 340px;
    padding: .85rem;
}

.quote-palette h3,
.quote-drop-zone h3 {
    font-size: 1rem;
    margin: 0 0 .75rem;
}

.quote-palette-list {
    display: grid;
    gap: .65rem;
    margin-top: .75rem;
    max-height: 520px;
    overflow: auto;
}

.quote-palette-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    cursor: grab;
    padding: .75rem;
}

.quote-palette-card em {
    color: #1b6ec2;
    font-style: normal;
}

.quote-tier-select {
    max-width: 140px;
}

.quote-line-description {
    min-width: 220px;
}

.quote-line-number {
    min-width: 88px;
}

.quote-section-row td {
    background: #eef4fa;
    color: #263847;
}

.quote-section-row span {
    color: #52616f;
    font-weight: 500;
    margin-left: .75rem;
}

.quote-line-optional td {
    background: #fbfcf3;
}

.quote-drop-zone {
    background: #fff;
    border: 2px dashed #94a8bb;
    border-radius: 8px;
    min-height: 340px;
    padding: 1rem;
}

.quote-drop-zone p {
    color: #607080;
    margin-top: -.25rem;
}

.quote-permission-note {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    color: #52616f;
    margin: -.25rem 0 1rem;
    padding: .65rem .75rem;
}

.quote-approval-grid,
.quote-margin-settings {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr .7fr 1.4fr auto;
    margin-bottom: 1rem;
}

.quote-template-apply {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: .75rem;
    margin-bottom: 1rem;
    max-width: 620px;
}

.quote-template-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.quote-template-form label:nth-of-type(5) {
    grid-column: span 3;
}

.quote-template-line-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.approval-actions {
    grid-template-columns: 1fr auto auto;
}

.quote-small-note {
    color: #52616f;
    margin: .35rem 0 0;
}

.quote-branding-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(240px, 1fr);
    gap: 1rem;
    align-items: center;
}

.quote-logo-preview {
    min-height: 120px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.quote-logo-preview img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

.quote-total-stack {
    display: grid;
    gap: .4rem;
    max-width: 360px;
    margin-left: auto;
}

.quote-total-stack span {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.quote-grand-total {
    border-top: 1px solid #dbe3ef;
    font-size: 1.1rem;
    padding-top: .55rem;
}

.quote-acceptance-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
    max-width: none;
}

.quote-acceptance-form label:nth-of-type(3) {
    grid-column: span 2;
}

.parts-creation-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.parts-creation-form label:nth-of-type(3) {
    grid-column: span 2;
}

.parts-active-row {
    align-self: end;
}

.parts-quote-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.parts-quote-form label:nth-of-type(7) {
    grid-column: span 3;
}

.parts-quote-line-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.5fr 1.6fr .6fr .7fr auto;
    margin-bottom: 1rem;
}

.location-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.build-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.build-form label:nth-of-type(10) {
    grid-column: span 3;
}

.invoice-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.invoice-form label:nth-of-type(9) {
    grid-column: span 3;
}

.invoice-line-form,
.payment-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: .8fr 1.5fr .6fr .7fr auto;
    margin-bottom: 1rem;
}

.vendor-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1.4fr .8fr .9fr 1.2fr .8fr auto;
}

.ap-bill-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.ap-bill-form label:nth-of-type(8) {
    grid-column: span 3;
}

.ap-line-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: .9fr 1.6fr .6fr .7fr auto;
    margin-bottom: 1rem;
}

.cash-account-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    max-width: none;
}

.cash-transaction-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.cash-transaction-form label:nth-of-type(10) {
    grid-column: span 4;
}

.qb-export-form {
    grid-template-columns: 1.2fr .8fr .8fr auto;
    max-width: none;
}

.security-user-form {
    grid-template-columns: 1.2fr 1.4fr 1fr 1fr .6fr auto;
    max-width: none;
}

.security-action-form {
    grid-template-columns: 1.4fr 1fr auto auto;
    max-width: none;
}

.document-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.document-form label:nth-of-type(9),
.document-form label:nth-of-type(10) {
    grid-column: span 4;
}

.accounting-report-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    max-width: none;
}

.accounting-settings-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.approval-action-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr auto auto;
    margin-bottom: 1rem;
}

.task-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.task-form label:nth-of-type(7) {
    grid-column: span 3;
}

.email-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
}

.communication-settings-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
}

.communication-compose-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
}

.sms-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}

.email-form label:nth-of-type(6),
.email-form label:nth-of-type(7) {
    grid-column: span 3;
}

.sms-form label:nth-of-type(5) {
    grid-column: span 2;
}

.email-preview pre {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    font-family: "Segoe UI", Arial, sans-serif;
    min-height: 180px;
    padding: 1rem;
    white-space: pre-wrap;
}

.payment-request-form {
    grid-template-columns: 1.5fr .7fr .7fr 1.2fr auto;
    max-width: none;
}

.qbo-connection-form {
    grid-template-columns: .8fr 1fr 1.2fr .9fr 1.5fr auto;
    max-width: none;
}

.checkout-panel {
    display: grid;
    gap: 1rem;
}

.status-pill {
    background: #eef1f4;
    border-radius: 999px;
    display: inline-block;
    font-size: .82rem;
    padding: .2rem .6rem;
    white-space: nowrap;
}

.status-ready {
    background: #e4f5ea;
    color: #126b35;
}

.status-action {
    background: #fff0df;
    color: #8a4b00;
}

.status-planned {
    background: #e8f1fb;
    color: #1b5d91;
}

.portal-progress {
    background: #e8edf2;
    border-radius: 999px;
    height: .55rem;
    margin-bottom: .3rem;
    overflow: hidden;
    width: 140px;
}

.portal-progress span {
    background: #1b6ec2;
    display: block;
    height: 100%;
}

.csv-preview {
    font-family: Consolas, "Courier New", monospace;
    min-height: 260px;
    overflow: auto;
    white-space: pre;
}

.migration-form {
    grid-template-columns: 1fr 1.5fr auto auto auto;
    max-width: none;
}

.payroll-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto;
    max-width: none;
}

.advanced-report-form {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    max-width: none;
}

.advanced-dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.advanced-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.migration-messages {
    margin: 1rem 0 0;
}

.toolbar-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.row-actions {
    display: flex;
    gap: .5rem;
}

.check-row {
    align-items: center;
    display: flex;
    gap: .35rem;
    white-space: nowrap;
}

.workflow-kpi-grid {
    margin-bottom: 1rem;
}

.workflow-flow {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1rem;
}

.workflow-stage-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto 1fr;
    padding: 1rem;
}

.workflow-stage-number {
    align-items: center;
    background: #1f2937;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.workflow-stage-card h2 {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.workflow-stage-card strong {
    display: block;
    font-size: 1.7rem;
}

.workflow-stage-card span {
    color: #64748b;
    display: block;
    font-weight: 600;
}

.workflow-stage-card p {
    color: #334155;
    min-height: 3rem;
}

.workflow-main-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
    margin-bottom: 1rem;
}

.workflow-playbook ol {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.workflow-playbook li {
    margin-bottom: 0.75rem;
}

.workflow-filter-form {
    grid-template-columns: 2fr 1fr;
    margin-bottom: 1rem;
}

.closeout-filter-form {
    grid-template-columns: 2fr 1fr auto;
    max-width: none;
}

.closeout-grid {
    display: grid;
    gap: 1rem;
}

.closeout-card {
    overflow-x: auto;
}

.closeout-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.closeout-summary div {
    background: #f5f7f9;
    border: 1px solid #dde3ea;
    border-radius: 6px;
    padding: 0.75rem;
}

.closeout-summary span {
    color: #607080;
    display: block;
    font-size: 0.8rem;
}

.closeout-summary strong {
    display: block;
}

.invoice-closeout-gate {
    background: #fff8e6;
    border: 1px solid #f1d08a;
    border-radius: 8px;
    grid-column: 1 / -1;
    padding: 1rem;
}

.invoice-closeout-gate p {
    margin: 0.35rem 0;
}

.invoice-closeout-gate ul {
    margin: 0.5rem 0 0.75rem;
}

.communication-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.communication-details {
    display: grid;
    gap: 0.35rem 1rem;
    grid-template-columns: auto 1fr;
}

.communication-details dt {
    color: #607080;
    font-weight: 700;
}

.billing-plan-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-form {
    max-width: none;
}

.setup-progress-bar {
    background: #e8edf2;
    border-radius: 999px;
    height: .7rem;
    margin: .5rem 0 1rem;
    overflow: hidden;
}

.setup-progress-bar span {
    background: #1b6ec2;
    display: block;
    height: 100%;
}

.setup-step-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.setup-step-card {
    border-radius: 8px;
    padding: .85rem;
}

.setup-step-card span {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.setup-step-card strong {
    display: block;
    font-size: 1.05rem;
    margin-top: .25rem;
}

.setup-step-card p {
    margin: .35rem 0 0;
}

.setup-wizard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setup-wizard-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
}

.setup-wizard-form .wide-field,
.setup-checkbox {
    grid-column: span 2;
}

.checkbox-label {
    align-items: center;
    display: flex;
    gap: .5rem;
    font-weight: 700;
}

.setup-billing-panel {
    grid-column: span 2;
}

.setup-billing-actions {
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .tenant-banner,
    .metric-grid,
    .feature-list,
    .welcome-panel,
    .home-two-column,
    .customer-form,
    .contact-form,
    .scan-form,
    .po-form,
    .po-line-form,
    .wo-form,
    .tech-mobile-command,
    .tech-actions,
    .tech-form-grid,
    .tech-parts-grid,
    .dispatch-form,
    .dispatch-filters,
    .labor-report-form,
    .audit-filter-form,
    .warranty-rule-form,
    .migration-form,
    .payroll-form,
    .advanced-report-form,
    .advanced-kpi-grid,
    .advanced-dashboard-grid,
    .workflow-main-grid,
    .communication-layout,
    .communication-compose-grid,
    .calendar-week-grid,
    .billing-plan-grid,
    .setup-step-grid,
    .setup-wizard-grid,
    .workflow-filter-form,
    .closeout-filter-form,
    .closeout-summary,
    .parts-request-form,
    .request-update-form,
    .quote-form,
    .quote-line-form,
    .quote-builder,
    .quote-approval-grid,
    .quote-margin-settings,
    .parts-creation-form,
    .parts-quote-form,
    .parts-quote-line-form,
    .location-form,
    .build-form,
    .invoice-form,
    .invoice-line-form,
    .vendor-form,
    .ap-bill-form,
    .ap-line-form,
    .cash-account-form,
    .cash-transaction-form,
    .qb-export-form,
    .security-user-form,
    .security-action-form,
    .document-form,
    .accounting-report-form,
    .accounting-settings-form,
    .approval-action-form,
    .task-form,
    .email-form,
    .sms-form,
    .communication-settings-form,
    .payment-request-form,
    .portal-message-form,
    .portal-document-form,
    .staff-reply-form,
    .qbo-connection-form,
    .setup-wizard-form,
    .payment-form {
        grid-template-columns: 1fr;
    }

    .setup-wizard-form .wide-field,
    .setup-checkbox,
    .setup-billing-panel {
        grid-column: auto;
    }

    .po-form label:nth-of-type(6) {
        grid-column: auto;
    }

    .wo-form label:nth-of-type(8),
    .wo-form label:nth-of-type(9) {
        grid-column: auto;
    }

    .parts-request-form label:nth-of-type(7) {
        grid-column: auto;
    }

    .tech-current-card strong {
        font-size: 1.15rem;
    }

    .tech-pill-actions .btn,
    .tech-filter-actions .btn {
        flex: 1 1 120px;
    }

    .tech-button {
        width: 100%;
    }

    .tech-history-panel .data-table {
        display: none;
    }

    .email-form label:nth-of-type(6),
    .email-form label:nth-of-type(7),
    .sms-form label:nth-of-type(5) {
        grid-column: auto;
    }

    .quote-form label:nth-of-type(7) {
        grid-column: auto;
    }

    .parts-creation-form label:nth-of-type(3),
    .parts-quote-form label:nth-of-type(7) {
        grid-column: auto;
    }

    .build-form label:nth-of-type(10) {
        grid-column: auto;
    }

    .invoice-form label:nth-of-type(9) {
        grid-column: auto;
    }

    .document-form label:nth-of-type(9),
    .document-form label:nth-of-type(10) {
        grid-column: auto;
    }

    .ap-bill-form label:nth-of-type(8) {
        grid-column: auto;
    }

    .cash-transaction-form label:nth-of-type(10) {
        grid-column: auto;
    }

    .task-form label:nth-of-type(7) {
        grid-column: auto;
    }

    .email-form label:nth-of-type(6),
    .email-form label:nth-of-type(7) {
        grid-column: auto;
    }

    .toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-form label:nth-of-type(5),
    .customer-form label:nth-of-type(6),
    .customer-form label:nth-of-type(10) {
        grid-column: auto;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
