body {
    background: #f5f7fb;
    color: #1f2933;
    font-size: 15px;
    min-width: 320px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-underline-offset: 2px;
}

.app-shell {
    padding: 22px clamp(12px, 2.2vw, 28px);
}

.app-footer {
    padding: 10px clamp(12px, 2.2vw, 28px) 18px;
    color: #64748b;
    font-size: .82rem;
    text-align: center;
}

.app-footer a {
    color: inherit;
}

.app-navbar {
    background: #111827;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
}

.app-nav-container {
    gap: 10px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 750;
    letter-spacing: 0;
}

.app-brand:hover {
    color: #fff;
}

.app-brand-logo {
    display: inline-flex;
    align-items: center;
    width: clamp(118px, 13vw, 170px);
    min-height: 30px;
}

.app-brand-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.app-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #0f172a;
    background: #38bdf8;
    border-radius: 8px;
    font-weight: 800;
}

.app-nav-groups {
    gap: 2px;
}

.app-navbar .nav-link {
    min-height: 38px;
    padding: 8px 12px;
    color: #dbeafe;
    border-radius: 8px;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active,
.app-navbar .nav-link.show {
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

.app-navbar .dropdown-menu {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
}

.app-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .08);
}

.app-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .18);
}

.app-navbar .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg);
    filter: invert(1) grayscale(100%) brightness(180%);
}

.app-nav-search {
    flex: 1 1 300px;
    max-width: 460px;
}

.app-nav-search .form-control {
    min-height: 38px;
    border-color: rgba(255, 255, 255, .20);
    background: rgba(255, 255, 255, .95);
}

.app-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.btn,
.form-control,
.form-select {
    border-radius: 8px;
}

.btn {
    min-height: 38px;
}

.btn-sm {
    min-height: 34px;
}

.form-control,
.form-select {
    min-height: 40px;
}

.table {
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 12px 10px;
}

.table thead th {
    color: #52606d;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #f8fafc;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(24, 26, 32, .98), rgba(56, 56, 60, .92)),
        #181a20;
}

.auth-shell {
    width: min(100%, 480px);
    padding: clamp(14px, 4vw, 24px);
}

.install-page .auth-shell {
    width: min(100%, 920px);
}

.auth-card,
.page-panel,
.status-tile {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.auth-card {
    padding: clamp(22px, 5vw, 34px);
    border-color: rgba(255, 255, 255, .16);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.auth-brand {
    display: grid;
    gap: 16px;
    margin-bottom: 26px;
}

.auth-logo-frame {
    display: inline-flex;
    align-items: center;
    width: min(100%, 280px);
    min-height: 54px;
    padding: 8px 10px;
    background: #111827;
    border-radius: 8px;
}

.auth-logo-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-brand h1 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 2rem;
    font-weight: 800;
}

.auth-brand p {
    margin: 0;
    color: #52606d;
}

.auth-form {
    display: grid;
    gap: 2px;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    margin-bottom: 14px;
    color: #3f4f5f;
}

.auth-submit {
    font-weight: 700;
}

.appointment-form-footer {
    position: sticky;
    bottom: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 24px -20px -20px;
    padding: 14px 20px;
    border-top: 1px solid #d9e2ec;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.appointment-conflict-override {
    width: min(100%, 520px);
    padding: 12px 14px;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    background: #fffbeb;
}

.appointment-submit-button {
    min-width: 180px;
}

@media (max-width: 991.98px) {
    .appointment-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .appointment-submit-button {
        width: 100%;
    }
}

.auth-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    color: rgba(255, 255, 255, .72);
}

.page-panel {
    padding: 20px;
}

.status-tile {
    position: relative;
    min-height: 132px;
    padding: 18px;
}

.status-label {
    color: #52606d;
    font-size: .875rem;
}

.status-value {
    margin-top: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.status-note {
    margin-top: 12px;
    color: #627d98;
    font-size: .875rem;
}

.navbar .btn {
    white-space: nowrap;
}

.permission-table {
    min-width: 720px;
}

.permission-choice {
    width: 92px;
    text-align: center;
}

.global-search {
    position: relative;
    min-width: min(320px, 100%);
}

.global-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
    overflow: hidden;
}

.global-search-results.show {
    display: block;
}

.global-search-item {
    display: block;
    padding: 10px 12px;
    color: #1f2933;
    text-decoration: none;
    border-bottom: 1px solid #eef2f7;
}

.global-search-item:hover {
    background: #f5f7fb;
}

.global-search-item span {
    display: block;
    color: #627d98;
    font-size: .85rem;
}

.app-feedback-stack {
    position: fixed;
    top: 78px;
    right: 16px;
    z-index: 2200;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 24px));
}

.app-feedback {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.app-feedback-success {
    border-left-color: #16a34a;
}

.app-feedback-error {
    border-left-color: #dc2626;
}

.app-feedback-warning {
    border-left-color: #ca8a04;
}

.app-feedback-content {
    min-width: 0;
}

.app-feedback-content strong,
.app-feedback-content div {
    display: block;
    overflow-wrap: anywhere;
}

.app-feedback-content strong {
    color: #0f172a;
}

.app-feedback-content div {
    margin-top: 3px;
    color: #52606d;
    font-size: .9rem;
}

.app-feedback-close {
    width: 30px;
    height: 30px;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 1.25rem;
    line-height: 1;
}

.app-feedback-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.app-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2300;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, .45);
}

.app-confirm-dialog {
    width: min(100%, 420px);
    padding: 18px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .30);
}

.app-confirm-title {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.calendar-day {
    display: grid;
    gap: 12px;
}

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

.week-column {
    min-height: 220px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 12px;
}

.appointment-card {
    background: #fff;
    background: color-mix(in srgb, var(--mechanic-color, #2563eb) 8%, #fff);
    border: 1px solid #d9e2ec;
    border-left: 4px solid var(--mechanic-color, #2563eb);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.appointment-card.is-urgent {
    border-color: #dc2626;
    border-left-color: #dc2626;
    background: #fff1f2;
    box-shadow: 0 10px 24px rgba(220, 38, 38, .16);
}

.appointment-card.wants-earlier-call {
    outline: 2px solid #f59e0b;
    outline-offset: -2px;
}

.appointment-mobile-list {
    display: none;
}

.appointment-list-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.calendar-shell {
    display: grid;
    gap: 14px;
}

.calendar-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.calendar-title-block {
    min-width: 0;
}

.calendar-period {
    color: #52606d;
    font-size: 1rem;
    font-weight: 700;
}

.calendar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.calendar-view-switch .btn,
.calendar-week-layout-switch .btn,
.calendar-nav .btn {
    min-width: 44px;
}

.calendar-filter-panel {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .05);
}

.calendar-filter-form {
    display: grid;
    grid-template-columns: minmax(160px, .7fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.calendar-workbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.calendar-month {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.calendar-month-weekdays,
.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-month-weekdays {
    background: #f8fafc;
    border-bottom: 1px solid #d9e2ec;
    color: #52606d;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.calendar-month-weekdays > div {
    padding: 10px 12px;
    border-right: 1px solid #e6edf5;
}

.calendar-month-weekdays > div:last-child {
    border-right: 0;
}

.calendar-month-day {
    min-height: 156px;
    padding: 10px;
    border-right: 1px solid #e6edf5;
    border-bottom: 1px solid #e6edf5;
    background: #fff;
    cursor: pointer;
}

.calendar-month-day:nth-child(7n) {
    border-right: 0;
}

.calendar-month-day:hover {
    background: #f8fafc;
}

.calendar-month-day.is-outside {
    background: #fbfdff;
    color: #94a3b8;
}

.calendar-month-day.is-today {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.calendar-month-day-head,
.calendar-month-event-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-month-date {
    color: #1f2933;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
}

.calendar-month-mobile-date {
    display: none;
}

.calendar-day-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: .78rem;
    font-weight: 800;
}

.calendar-month-events {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.calendar-month-event {
    position: relative;
    border: 1px solid color-mix(in srgb, var(--mechanic-color, #2563eb) 42%, #d9e2ec);
    border-left: 4px solid var(--event-color, #2563eb);
    border-radius: 7px;
    background: #fff;
    background: color-mix(in srgb, var(--mechanic-color, #2563eb) 9%, #fff);
    padding: 7px 8px;
    cursor: default;
}

.appointment-priority-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 10px 12px;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    background: #fffbeb;
}

.appointment-priority-options .form-check {
    margin-bottom: 0;
}

.calendar-month-event.is-urgent,
.calendar-appointment-item.is-urgent {
    border-color: #dc2626;
    border-left-color: #dc2626 !important;
    background: #fff1f2;
    box-shadow: 0 10px 24px rgba(220, 38, 38, .20);
}

.calendar-month-event.wants-earlier-call,
.calendar-appointment-item.wants-earlier-call {
    outline: 2px solid #f59e0b;
    outline-offset: -2px;
}

.calendar-month-event.has-work-order,
.calendar-appointment-item.has-work-order {
    background: #f8fafc;
    background: color-mix(in srgb, var(--mechanic-color, #2563eb) 7%, #f8fafc);
    cursor: default;
}

.calendar-month-event.is-draggable {
    cursor: grab;
}

.calendar-month-event.is-draggable:active {
    cursor: grabbing;
}

.calendar-month-event.is-work-order-done,
.calendar-appointment-item.is-work-order-done {
    border-color: #94a3b8;
    background: #eef2f7;
    color: #64748b;
}

.calendar-month-event.is-work-order-done::after,
.calendar-appointment-item.is-work-order-done::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    border-top: 2px solid rgba(71, 85, 105, .65);
    pointer-events: none;
}

.calendar-month-event.is-work-order-done .calendar-month-event-title,
.calendar-month-event.is-work-order-done .calendar-month-event-sub,
.calendar-appointment-item.is-work-order-done .calendar-item-title,
.calendar-appointment-item.is-work-order-done .calendar-item-subtitle,
.calendar-appointment-item.is-work-order-done .calendar-item-service {
    text-decoration: line-through;
}

.calendar-work-order-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: 0;
}

.calendar-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 20px;
    border-radius: 5px;
    padding: 2px 6px;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
}

.calendar-flag-badge.flag-urgent {
    background: #dc2626;
    color: #fff;
}

.calendar-flag-badge.flag-earlier-call {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.appointment-cancel-box summary {
    cursor: pointer;
    list-style: none;
}

.appointment-cancel-box summary::-webkit-details-marker {
    display: none;
}

.calendar-month-event-time {
    color: #52606d;
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 800;
}

.calendar-month-event-title {
    min-width: 0;
    overflow: hidden;
    color: #1f2933;
    font-size: .86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-month-event-sub {
    display: grid;
    gap: 2px;
    margin-top: 2px;
    color: #52606d;
    font-size: .78rem;
    line-height: 1.25;
}

.calendar-month-note {
    margin-top: 8px;
    border: 1px dashed #0ea5e9;
    border-radius: 7px;
    background: #f0f9ff;
    color: #075985;
    padding: 6px 8px;
    font-size: .78rem;
    font-weight: 700;
}

.calendar-month-empty {
    margin-top: 12px;
    color: #94a3b8;
    font-size: .84rem;
}

.calendar-grid-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 64px repeat(var(--day-count), minmax(var(--day-min-width, 240px), 1fr));
    min-width: var(--grid-min-width);
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.calendar-axis,
.calendar-track {
    min-width: 0;
    border-right: 1px solid #e6edf5;
}

.calendar-axis {
    position: sticky;
    left: 0;
    z-index: 8;
    background: #fff;
    box-shadow: 8px 0 14px rgba(15, 23, 42, .06);
}

.calendar-track:last-child {
    border-right: 0;
}

.calendar-day-heading {
    height: 58px;
    padding: 10px 12px;
    border-bottom: 1px solid #d9e2ec;
    background: #f8fafc;
}

.calendar-hours {
    display: grid;
    grid-auto-rows: calc(60 * var(--minute-px));
}

.calendar-hour-label {
    padding: 4px 8px 0 0;
    color: #627d98;
    background: #fff;
    font-size: .78rem;
    text-align: right;
    border-top: 1px solid #eef2f7;
}

.calendar-week-list {
    display: grid;
    gap: 10px;
}

.calendar-week-list-day {
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.calendar-week-list-day.is-today {
    box-shadow: inset 0 0 0 2px #2563eb, 0 8px 24px rgba(16, 24, 40, .06);
}

.calendar-week-list-head,
.calendar-week-list-events {
    display: grid;
    gap: 8px;
}

.calendar-week-list-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.calendar-week-list-head strong,
.calendar-week-list-head span {
    display: block;
}

.calendar-week-list-head strong {
    color: #0f172a;
    font-size: .98rem;
}

.calendar-week-list-head span {
    color: #64748b;
    font-size: .82rem;
}

.calendar-week-list-events {
    margin-top: 10px;
}

.calendar-week-list-event {
    width: 100%;
}

.calendar-time-lane {
    position: relative;
    cursor: crosshair;
    background-image: linear-gradient(to bottom, #eef2f7 1px, transparent 1px);
    background-size: 100% calc(60 * var(--minute-px));
}

.calendar-appointment-item,
.calendar-note-item {
    position: absolute;
    top: calc(var(--offset) * var(--minute-px));
    left: 8px;
    right: 8px;
    min-height: 42px;
    height: max(42px, calc(var(--duration) * var(--minute-px) - 4px));
    overflow: auto;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .86rem;
    cursor: default;
}

.calendar-appointment-item {
    left: calc(8px + var(--overlap-left, 0%));
    right: calc(8px + var(--overlap-right, 0%));
    width: auto;
    min-width: 0;
    z-index: 2;
    background: #fff;
    background: color-mix(in srgb, var(--mechanic-color, #2563eb) 9%, #fff);
    border: 1px solid color-mix(in srgb, var(--mechanic-color, #2563eb) 42%, #cbd5e1);
    border-left: 5px solid #2563eb;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .10);
    cursor: default;
}

.calendar-color-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(15, 23, 42, .2);
    border-radius: 4px;
}

.calendar-appointment-item.is-draggable {
    cursor: grab;
}

.calendar-appointment-item.is-draggable:active {
    cursor: grabbing;
}

.calendar-appointment-dragging {
    opacity: .55;
}

.calendar-lane-drop-target {
    background-color: #eff6ff;
    outline: 2px dashed #2563eb;
    outline-offset: -4px;
}

.calendar-day-drop-target {
    background: #eff6ff;
    outline: 2px dashed #2563eb;
    outline-offset: -4px;
}

.calendar-note-item {
    z-index: 1;
    background: #f0f9ff;
    border: 1px dashed #0ea5e9;
    color: #075985;
}

.calendar-item-time {
    color: #52606d;
    font-size: .78rem;
    font-weight: 700;
}

.calendar-item-title {
    font-weight: 700;
    line-height: 1.25;
}

.calendar-item-subtitle,
.calendar-item-service {
    color: #52606d;
    font-size: .8rem;
}

.calendar-item-actions summary {
    cursor: pointer;
    color: #2563eb;
    font-size: .82rem;
    font-weight: 700;
}

.calendar-item-actions .status-form,
.calendar-item-actions .appointment-quick-form {
    max-width: none;
    min-width: 0;
}

.calendar-empty-slot {
    position: absolute;
    top: 16px;
    left: 12px;
    right: 12px;
    color: #94a3b8;
    font-size: .9rem;
}

.work-order-card,
.mechanic-task {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 14px;
}

.work-order-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.work-order-overview-tile {
    min-height: 118px;
    padding: 16px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.work-order-money-tile {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.work-order-document-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.work-order-document-actions .btn {
    min-height: 36px;
    white-space: normal;
}

.work-order-document-list {
    display: grid;
    gap: 6px;
}

.work-order-document-row {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #1f2933;
    text-decoration: none;
}

.work-order-document-row:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.work-order-document-row span,
.work-order-document-row small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.work-order-document-row small {
    color: #64748b;
}

.work-order-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.work-order-scope-tile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 66px;
    padding: 14px 16px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.work-order-scope-tile.active {
    color: #0f172a;
    border-color: #93c5fd;
    background: #eff6ff;
}

.work-order-scope-tile strong {
    font-size: 1.35rem;
}

.work-order-mobile-list {
    display: none;
}

.work-order-list-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.work-order-office-table {
    min-width: 1080px;
}

.work-order-list-statuses .quick-status-grid {
    margin-top: 0;
}

.quick-status-grid.compact {
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    gap: 6px;
}

.quick-status-grid.compact .btn {
    min-height: 32px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: .78rem;
}

.work-order-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.work-order-focus-grid .page-panel {
    min-height: 132px;
}

.work-order-note-card {
    overflow-wrap: anywhere;
}

.work-order-edit-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    line-height: 1;
}

.work-order-cost-total {
    min-width: 180px;
    padding: 10px 12px;
    text-align: right;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.work-order-cost-table {
    min-width: 860px;
}

.work-order-cost-mobile-list {
    display: none;
}

.work-order-cost-mobile-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.work-order-cost-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.work-order-cost-mobile-meta span {
    padding: 4px 8px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    background: #fff;
    color: #52606d;
    font-size: .82rem;
}

.intake-damage-workspace {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.intake-car-map {
    position: relative;
    width: 100%;
    min-height: 260px;
    cursor: crosshair;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
}

.intake-car-map svg,
.intake-car-map img {
    display: block;
    width: 100%;
    height: auto;
}

.intake-damage-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.intake-damage-marker {
    position: absolute;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    box-shadow: 0 6px 14px rgba(127, 29, 29, .35);
    font-size: .78rem;
    font-weight: 800;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.intake-damage-list {
    display: grid;
    gap: 10px;
}

.intake-damage-item {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.intake-damage-item.is-deleted {
    display: none;
}

.intake-damage-photo {
    display: inline-block;
    margin-top: 10px;
}

.intake-damage-photo img,
.intake-photo-strip img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
}

.intake-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cost-entry-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(130px, 1fr) repeat(4, minmax(100px, .8fr)) minmax(120px, .8fr) minmax(130px, .8fr);
    gap: 8px;
    align-items: end;
}

.cost-entry-preview {
    min-height: 58px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.cost-entry-submit .btn {
    min-height: 42px;
}

.vehicle-summary-tile {
    height: 100%;
    min-height: 126px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.vehicle-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.vehicle-action-grid .btn {
    min-height: 42px;
}

.upload-progress-state .progress {
    height: 8px;
}

.modal-content > .upload-progress-state {
    margin: 0 16px 16px;
}

.work-order-action-preview-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 75vh;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 6px;
}

.work-order-timeline-item {
    border-left: 3px solid #d9e2ec;
    padding: 0 0 12px 12px;
    margin-bottom: 12px;
}

.work-order-timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.data-quality-alert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.data-quality-alert,
.data-quality-row {
    color: inherit;
    text-decoration: none;
}

.data-quality-alert {
    display: grid;
    min-height: 92px;
    padding: 16px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.data-quality-alert span {
    color: #52606d;
    font-size: .82rem;
}

.data-quality-alert strong {
    margin-top: 8px;
    color: #111827;
    font-size: 1.5rem;
    line-height: 1.1;
}

.data-quality-alert-ok {
    border-left-color: #16a34a;
}

.data-quality-alert-warning {
    border-left-color: #ca8a04;
}

.data-quality-alert-danger {
    border-left-color: #dc2626;
}

.data-quality-list {
    display: grid;
    gap: 8px;
}

.data-quality-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #e6edf5;
}

.data-quality-row strong,
.data-quality-row small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.data-quality-row small {
    color: #52606d;
}

.data-quality-row em {
    color: #2563eb;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.data-quality-candidates {
    display: grid;
    gap: 6px;
}

.data-quality-candidate {
    display: grid;
    gap: 2px;
    padding: 6px 8px;
    color: inherit;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e6edf5;
    border-radius: 6px;
}

.data-quality-candidate:hover {
    border-color: #b6c2cf;
}

.data-quality-candidate strong,
.data-quality-candidate small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.data-quality-candidate small {
    color: #52606d;
}

.vehicle-note-box {
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 12px;
}

.vehicle-timeline-item {
    border-left: 4px solid #2563eb;
    border-bottom: 1px solid #e6edf5;
    padding: 0 0 14px 14px;
    margin-bottom: 14px;
}

.vehicle-timeline-item:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vehicle-list {
    display: grid;
    gap: 8px;
}

.vehicle-mobile-list {
    display: none;
}

.vehicle-list-card {
    display: block;
    padding: 14px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.vehicle-list-card:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.vehicle-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #1f2933;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.vehicle-list-row:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.vehicle-compact-history {
    display: grid;
    gap: 8px;
}

.vehicle-compact-history > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f7;
}

.vehicle-compact-history > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.customer-summary-tile {
    height: 100%;
    min-height: 126px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.customer-summary-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.customer-mobile-list {
    display: none;
}

.customer-list-card {
    display: block;
    padding: 14px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.customer-list-card:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.customer-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
    color: #627d98;
    font-size: .875rem;
}

.customer-timeline {
    display: grid;
    gap: 10px;
}

.customer-timeline-item {
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.customer-timeline-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.blacklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.blacklist-card {
    padding: 14px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.blacklist-card-active {
    border-color: #fecaca;
    background: #fffafa;
}

.blacklist-note {
    white-space: pre-wrap;
    padding: 8px 10px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    font-size: .9rem;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.dashboard-quick-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 92px;
    padding: 16px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.dashboard-quick-card:hover {
    color: #0f172a;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.dashboard-quick-card strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.2;
}

.dashboard-quick-card small {
    display: block;
    margin-top: 3px;
    color: #52606d;
    line-height: 1.25;
}

.dashboard-quick-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 8px;
}

.dashboard-quick-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-quick-primary {
    border-color: #bfdbfe;
}

.dashboard-quick-accent {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.dashboard-quick-accent .dashboard-quick-icon {
    color: #15803d;
    background: #dcfce7;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.dashboard-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
    padding: 14px 16px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.dashboard-stat:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.dashboard-stat strong {
    font-size: 1.6rem;
}

.dashboard-stat-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.dashboard-stat-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.dashboard-stat-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.dashboard-list {
    display: grid;
    gap: 8px;
}

.dashboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #1f2933;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.dashboard-row:hover {
    border-color: #93c5fd;
    color: #0f172a;
}

.notification-unread {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.mechanic-workbench {
    max-width: 1440px;
    margin: 0 auto;
}

.mechanic-workbench-header,
.mechanic-hero,
.mechanic-hero-main,
.mechanic-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.mechanic-header-actions,
.mechanic-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

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

.mechanic-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.mechanic-scope-tile {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 10px;
    min-height: 72px;
    padding: 11px 12px;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.mechanic-scope-tile span {
    align-self: end;
    font-weight: 800;
}

.mechanic-scope-tile strong {
    grid-row: span 2;
    align-self: center;
    color: #0f172a;
    font-size: 1.45rem;
    line-height: 1;
}

.mechanic-scope-tile small {
    color: #64748b;
    font-size: .78rem;
}

.mechanic-scope-tile.active {
    color: #0f172a;
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.mechanic-task {
    display: flex;
    flex-direction: column;
    border-left-color: var(--status-color, #64748b);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.mechanic-task .btn,
.mechanic-command-bar .btn {
    min-height: 44px;
}

.mechanic-card-head,
.mechanic-card-actions,
.mechanic-chip-row,
.mechanic-info-grid,
.software-info-grid {
    display: grid;
    gap: 10px;
}

.mechanic-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.mechanic-card-status-stack {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.mechanic-card-id {
    min-width: 0;
}

.mechanic-card-id span,
.mechanic-vehicle-line {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #64748b;
}

.mechanic-reg {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    text-decoration: none;
}

.mechanic-reg:hover {
    color: #1d4ed8;
}

.mechanic-status-pill {
    max-width: 150px;
    padding: 6px 9px;
    color: #fff;
    background: var(--status-color, #64748b);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

.mechanic-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.mechanic-timer-pill strong,
.mechanic-timer-pill small {
    display: block;
}

.mechanic-timer-pill small {
    margin-top: 2px;
    font-size: .66rem;
    font-weight: 800;
}

.mechanic-timer-pill.is-running {
    color: #14532d;
    background: #dcfce7;
    border-color: #22c55e;
}

.mechanic-timer-pill.is-running-other {
    color: #713f12;
    background: #fffbeb;
    border-color: #f59e0b;
}

.mechanic-clock-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    flex: 0 0 auto;
}

.mechanic-clock-icon::before,
.mechanic-clock-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 2px;
    background: currentColor;
    border-radius: 999px;
    transform-origin: bottom center;
}

.mechanic-clock-icon::before {
    height: 5px;
    transform: translateX(-50%);
}

.mechanic-clock-icon::after {
    height: 4px;
    transform: translateX(-50%) rotate(90deg);
}

.mechanic-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mechanic-chip-row span {
    padding: 5px 8px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
}

.mechanic-problem,
.mechanic-inline-note,
.mechanic-info-tile,
.mechanic-info-stack > div {
    min-width: 0;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
}

.mechanic-problem span,
.mechanic-inline-note span,
.mechanic-info-stack span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mechanic-problem div,
.mechanic-inline-note div {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: #0f172a;
}

.mechanic-problem-large div {
    font-size: 1.05rem;
    line-height: 1.45;
}

.mechanic-alert {
    padding: 10px 12px;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.mechanic-alert-muted {
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}

.mechanic-alert-info {
    color: #075985;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.mechanic-alert-warning {
    color: #713f12;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.mechanic-card-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: auto;
}

.mechanic-card-actions form,
.mechanic-command-bar form {
    margin: 0;
}

.mechanic-card-actions .btn {
    width: 100%;
}

.mechanic-card-details {
    border-top: 1px solid #e6edf5;
    padding-top: 10px;
}

.mechanic-card-details summary {
    color: #2563eb;
    cursor: pointer;
    font-weight: 800;
}

.mechanic-empty {
    padding: 18px;
    color: #64748b;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.mechanic-detail {
    max-width: 1080px;
    margin: 0 auto;
}

.mechanic-hero {
    align-items: stretch;
    padding: 16px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 6px solid var(--status-color, #64748b);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.mechanic-hero-main {
    justify-content: flex-start;
    min-width: 0;
}

.mechanic-primary-id {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mechanic-primary-id h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 8vw, 3.4rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: .95;
    overflow-wrap: anywhere;
}

.mechanic-status-card {
    display: grid;
    align-content: center;
    min-width: 180px;
    padding: 12px;
    background: color-mix(in srgb, var(--status-color, #64748b) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--status-color, #64748b) 35%, #d9e2ec);
    border-radius: 8px;
}

.mechanic-status-card span,
.mechanic-status-card small,
.mechanic-section-title span {
    color: #64748b;
    font-size: .82rem;
}

.mechanic-status-card strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.mechanic-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.mechanic-command-bar {
    position: sticky;
    top: 70px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
}

.mechanic-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 14px;
    align-items: start;
}

.mechanic-side-column {
    position: sticky;
    top: 150px;
}

.mechanic-section-title {
    align-items: center;
}

.mechanic-info-stack {
    display: grid;
    gap: 8px;
}

.mechanic-info-stack strong,
.mechanic-info-stack small {
    display: block;
    overflow-wrap: anywhere;
}

.mechanic-info-stack strong {
    margin-top: 4px;
    color: #0f172a;
}

.mechanic-info-stack small {
    margin-top: 2px;
    color: #64748b;
}

.mechanic-compact-dl {
    display: grid;
    grid-template-columns: minmax(95px, .45fr) minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
}

.mechanic-compact-dl dt {
    color: #64748b;
    font-size: .82rem;
}

.mechanic-compact-dl dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: #0f172a;
}

.mechanic-textarea {
    min-height: 140px;
}

.mechanic-timer-panel {
    border-left: 5px solid #16a34a;
}

.mechanic-timer-panel-modal {
    border-left: 5px solid #16a34a;
}

.work-order-timer-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.work-order-timer-button .mechanic-clock-icon {
    width: 16px;
    height: 16px;
}

.work-order-timer-button strong {
    font-size: .9rem;
}

.work-order-timer-button small {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    font-size: .72rem;
    font-weight: 800;
}

.work-order-timer-button-icon {
    color: currentColor;
}

.work-order-timer-action-icon {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-radius: 3px;
    opacity: .9;
}

.work-order-timer-action-icon::before {
    content: "";
    position: absolute;
    right: -3px;
    top: -4px;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.work-order-timer-action-icon::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -2px;
    width: 10px;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: right center;
}

.mechanic-timer-row-person small {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}

.mechanic-timer-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mechanic-timer-summary > div {
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.mechanic-timer-summary > div.is-running {
    border-color: #86efac;
    background: #dcfce7;
}

.mechanic-timer-summary span,
.mechanic-timer-summary small,
.mechanic-timer-row span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.mechanic-timer-summary strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 1.35rem;
    line-height: 1.1;
}

.mechanic-timer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mechanic-timer-actions form {
    display: grid;
    gap: 8px;
    margin: 0;
}

.mechanic-timer-actions form:only-child {
    grid-column: 1 / -1;
}

.mechanic-timer-manual summary,
.mechanic-timer-row-edit summary {
    color: #2563eb;
    cursor: pointer;
    font-weight: 800;
}

.mechanic-timer-manual-form,
.mechanic-timer-edit-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(170px, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.mechanic-timer-manual-note,
.mechanic-timer-edit-note {
    grid-column: 1 / -1;
}

.mechanic-timer-log {
    display: grid;
    gap: 8px;
}

.mechanic-timer-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) repeat(4, auto);
    gap: 8px 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    background: #fff;
}

.mechanic-timer-row.is-active {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.mechanic-timer-row strong {
    color: #0f172a;
}

.mechanic-timer-row-note {
    grid-column: 1 / -1;
    color: #334155;
    overflow-wrap: anywhere;
}

.mechanic-timer-row-edit {
    grid-column: 1 / -1;
    padding-top: 4px;
}

.mechanic-overtime-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 14px;
    align-items: start;
}

.mechanic-overtime-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    align-items: end;
}

.mechanic-overtime-form .mechanic-overtime-note {
    grid-column: 1 / -1;
}

.mechanic-overtime-form .btn {
    min-height: 42px;
}

.mechanic-overtime-summary {
    display: grid;
    gap: 12px;
}

.mechanic-overtime-balance {
    padding: 14px;
    border-radius: 8px;
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.mechanic-overtime-balance.is-positive {
    color: #14532d;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.mechanic-overtime-balance.is-negative {
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.mechanic-overtime-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mechanic-overtime-totals > div {
    padding: 10px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.mechanic-overtime-totals span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.mechanic-overtime-totals strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
}

.mechanic-month-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
}

.mechanic-month-nav form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 0;
}

.mechanic-overtime-list {
    display: grid;
    gap: 8px;
}

.mechanic-overtime-row {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #d9e2ec;
    border-left: 5px solid #16a34a;
    border-radius: 8px;
    background: #fff;
}

.mechanic-overtime-row.is-negative {
    border-left-color: #dc2626;
}

.mechanic-overtime-row span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.mechanic-overtime-row-note {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #334155;
}

.mechanic-overtime-row-hours {
    white-space: nowrap;
}

.software-info-page {
    max-width: 1120px;
    margin: 0 auto;
}

.software-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.software-module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.software-module-list span {
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    background: #f8fafc;
    padding: 6px 10px;
    color: #1f2933;
    font-size: .9rem;
}

.file-list {
    display: grid;
    gap: 8px;
}

.file-row {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
}

.file-thumb {
    width: 72px;
    height: 54px;
    flex: 0 0 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-thumb-placeholder {
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.file-row-body {
    min-width: 0;
}

.file-row-body a {
    overflow-wrap: anywhere;
}

.live-notice {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
    display: none;
    align-items: center;
    gap: 12px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.live-notice.is-visible {
    display: flex;
}

.vin-check-icon {
    min-width: 42px;
    justify-content: center;
    font-weight: 800;
}

.vin-check-empty,
.vin-check-pending {
    color: #475569;
    background: #f8fafc;
}

.vin-check-valid {
    color: #166534;
    background: #dcfce7;
}

.vin-check-warning {
    color: #92400e;
    background: #fef3c7;
}

.vin-check-invalid {
    color: #991b1b;
    background: #fee2e2;
}

.audit-json {
    max-width: 420px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 10px;
    font-size: .8rem;
}

.admin-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    min-height: 154px;
    padding: 18px;
    overflow: hidden;
    color: #1f2933;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.admin-tile::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: #64748b;
}

.admin-tile:hover {
    border-color: #93c5fd;
    color: #0f172a;
    transform: translateY(-1px);
}

.admin-tile-label {
    color: #52606d;
    font-size: .8rem;
    text-transform: uppercase;
}

.admin-tile small {
    color: #627d98;
}

.admin-tile-action {
    margin-top: auto;
    color: #2563eb;
    font-size: .86rem;
    font-weight: 700;
}

.admin-accent-blue::before {
    background: #2563eb;
}

.admin-accent-red::before {
    background: #dc2626;
}

.admin-accent-green::before {
    background: #16a34a;
}

.admin-accent-yellow::before {
    background: #ca8a04;
}

.admin-accent-slate::before {
    background: #475569;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 18px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #111827, #31363f);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.admin-hero h1,
.admin-page-header h1 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
}

.admin-hero p,
.admin-page-header p {
    max-width: 720px;
    margin: 6px 0 0;
    color: #cbd5e1;
}

.admin-eyebrow {
    margin-bottom: 6px;
    color: #fecaca;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-hero-meta {
    display: grid;
    align-content: center;
    justify-items: end;
    min-width: 190px;
    padding: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
}

.admin-hero-meta span {
    color: #cbd5e1;
    font-size: .82rem;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-page-header h1 {
    color: #111827;
}

.admin-page-header p {
    color: #52606d;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
}

.admin-summary-tile {
    min-height: 92px;
    padding: 16px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.admin-summary-tile span {
    display: block;
    color: #52606d;
    font-size: .82rem;
}

.admin-summary-tile strong {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: 1.5rem;
    line-height: 1.1;
}

.admin-summary-ok {
    border-left-color: #16a34a;
}

.admin-summary-warning {
    border-left-color: #ca8a04;
}

.admin-summary-danger {
    border-left-color: #dc2626;
}

.admin-check-summary {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 6px;
}

.admin-table-toolbar,
.admin-panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.admin-panel-title {
    margin-bottom: 16px;
}

.admin-panel-title h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.admin-panel-title p {
    margin: 4px 0 0;
    color: #627d98;
    font-size: .9rem;
}

.admin-table-search {
    flex: 0 1 280px;
}

.admin-table tbody tr.is-filtered {
    display: none;
}

.admin-empty-state {
    display: grid;
    gap: 4px;
    padding: 28px;
    color: #52606d;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.admin-empty-state strong {
    color: #111827;
}

.admin-field {
    margin-bottom: 16px;
}

.admin-switch-grid {
    display: grid;
    gap: 10px;
}

.admin-switch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.admin-switch .form-check-input {
    flex: 0 0 auto;
    margin-top: 4px;
}

.admin-switch strong,
.admin-switch small {
    display: block;
}

.admin-switch small {
    color: #627d98;
}

.admin-sticky-panel {
    position: sticky;
    top: 86px;
}

.permission-group {
    margin-top: 18px;
}

.permission-group h3 {
    margin: 0 0 8px;
    color: #52606d;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-save-bar {
    position: sticky;
    right: 0;
    bottom: 12px;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
}

.admin-save-bar strong,
.admin-save-bar span {
    display: block;
}

.admin-save-bar span {
    color: #627d98;
    font-size: .88rem;
}

.admin-details summary {
    color: #2563eb;
    cursor: pointer;
    font-weight: 700;
}

.report-bars {
    display: grid;
    gap: 10px;
}

.report-bar-row {
    display: grid;
    grid-template-columns: 92px minmax(120px, 1fr) 86px;
    align-items: center;
    gap: 10px;
}

.report-bar-label,
.report-bar-values {
    color: #52606d;
    font-size: .82rem;
    white-space: nowrap;
}

.report-bar-values {
    text-align: right;
}

.report-bar-track {
    display: grid;
    gap: 3px;
    min-height: 27px;
}

.report-bar {
    display: block;
    min-height: 7px;
    border-radius: 999px;
}

.report-bar-appointments {
    background: #2563eb;
}

.report-bar-orders {
    background: #dc2626;
}

.report-bar-ready {
    background: #16a34a;
}

.deployment-checks {
    display: grid;
    gap: 10px;
}

.deployment-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
}

.deployment-check-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.deployment-check-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .app-shell {
        padding: 14px 10px 24px;
    }

    .page-panel,
    .auth-card {
        padding: 14px;
    }

    .auth-brand h1 {
        font-size: 1.65rem;
    }

    .auth-logo-frame {
        width: min(100%, 240px);
    }

    .app-navbar {
        position: sticky;
        top: 0;
    }

    .navbar-collapse {
        padding-top: 12px;
    }

    .app-nav-groups {
        gap: 6px;
    }

    .app-navbar .nav-link,
    .app-navbar .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 12px;
        font-size: 1rem;
    }

    .app-navbar .dropdown-menu {
        margin: 2px 0 8px;
        padding: 4px;
        background: rgba(255, 255, 255, .96);
    }

    .app-nav-search {
        width: 100%;
        max-width: none;
        margin: 8px 0;
    }

    .global-search {
        min-width: 100%;
    }

    .global-search-results {
        position: fixed;
        top: 68px;
        right: 10px;
        left: 10px;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
    }

    .app-nav-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        margin: 8px 0 0;
    }

    .app-nav-actions .btn,
    .app-nav-actions .dropdown,
    .app-nav-actions .dropdown > .btn {
        width: 100%;
    }

    .d-flex.justify-content-between,
    .d-flex.align-items-center.justify-content-between {
        gap: 10px;
    }

    .modal-dialog {
        margin: 8px;
    }

    .modal-content {
        border-radius: 8px;
    }

    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 38px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px;
    }

    .mechanic-action-grid {
        grid-template-columns: 1fr;
    }

    .mechanic-workbench-header,
    .mechanic-hero,
    .mechanic-hero-main,
    .mechanic-section-title {
        flex-direction: column;
        align-items: stretch;
    }

    .mechanic-grid {
        grid-template-columns: 1fr;
    }

    .mechanic-card-head {
        grid-template-columns: 1fr;
    }

    .mechanic-status-pill {
        max-width: none;
        width: 100%;
    }

    .mechanic-card-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mechanic-command-bar {
        top: 58px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 8px;
    }

    .mechanic-detail-layout {
        grid-template-columns: 1fr;
    }

    .mechanic-side-column {
        position: static;
    }

    .mechanic-status-card {
        min-width: 0;
    }

    .mechanic-header-actions,
    .mechanic-tabs {
        justify-content: stretch;
    }

    .mechanic-header-actions .btn,
    .mechanic-tabs .btn {
        flex: 1 1 auto;
    }

    .mechanic-overtime-layout,
    .mechanic-overtime-form,
    .mechanic-month-nav,
    .mechanic-month-nav form,
    .mechanic-timer-summary,
    .mechanic-timer-actions,
    .mechanic-timer-manual-form,
    .mechanic-timer-edit-form,
    .mechanic-timer-row,
    .mechanic-overtime-row {
        grid-template-columns: 1fr;
    }

    .mechanic-card-status-stack {
        justify-items: stretch;
    }

    .mechanic-timer-pill {
        justify-content: center;
    }

    .work-order-timer-button {
        flex: 0 0 auto;
        min-height: 42px;
    }

    .work-order-timer-button-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .work-order-timer-button small {
        display: none;
    }

    .mechanic-overtime-totals {
        grid-template-columns: 1fr;
    }

    .mechanic-overtime-row-hours {
        white-space: normal;
    }

    .work-order-cost-total {
        width: 100%;
        text-align: left;
    }

    .work-order-cost-table-wrap {
        display: none;
    }

    .work-order-cost-mobile-list {
        display: grid;
        gap: 8px;
        margin-bottom: 14px;
    }

    .cost-entry-grid {
        grid-template-columns: 1fr;
    }

    .work-order-table-panel {
        display: none;
    }

    .appointment-table-panel {
        display: none;
    }

    .appointment-mobile-list {
        display: grid;
        gap: 12px;
    }

    .work-order-mobile-list {
        display: grid;
        gap: 12px;
    }

    .work-order-focus-grid {
        grid-template-columns: 1fr;
    }

    .quick-status-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-table-panel {
        display: none;
    }

    .customer-mobile-list {
        display: grid;
        gap: 12px;
    }

    .vehicle-table-panel {
        display: none;
    }

    .vehicle-mobile-list {
        display: grid;
        gap: 12px;
    }

    .dashboard-actions .btn,
    .dashboard-row {
        width: 100%;
    }

    .dashboard-row,
    .vehicle-list-row,
    .file-row,
    .admin-hero,
    .admin-page-header,
    .admin-table-toolbar,
    .admin-panel-title,
    .admin-save-bar,
    .deployment-check {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-quality-alert-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero {
        padding: 18px;
    }

    .admin-hero p {
        color: #e2e8f0;
    }

    .admin-hero-meta,
    .admin-table-search,
    .admin-save-bar .btn {
        width: 100%;
    }

    .admin-hero-meta {
        justify-items: start;
    }

    .admin-sticky-panel {
        position: static;
    }

    .dashboard-stat {
        min-height: 64px;
    }

    .status-form,
    .appointment-quick-form {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .status-form .btn,
    .appointment-quick-form .btn {
        width: 100%;
    }
}

.service-catalog-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
}

.service-catalog-stat {
    display: grid;
    gap: 4px;
    min-height: 84px;
    padding: 16px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.service-catalog-stat span {
    color: #627d98;
    font-size: .85rem;
}

.service-catalog-stat strong {
    color: #1f2933;
    font-size: 1.35rem;
}

.service-catalog-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(150px, 190px) 120px;
    gap: 12px;
    align-items: end;
}

.service-catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.service-catalog-list {
    display: grid;
    gap: 10px;
}

.service-catalog-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, .9fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.service-catalog-row.is-inactive {
    opacity: .72;
}

.service-catalog-main {
    display: grid;
    grid-template-columns: 5px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.service-catalog-color {
    width: 5px;
    height: 100%;
    min-height: 52px;
    border-radius: 8px;
}

.service-catalog-name {
    min-width: 0;
}

.service-catalog-name p {
    overflow-wrap: anywhere;
}

.service-catalog-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 10px;
}

.service-catalog-meta div {
    min-height: 56px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 8px;
}

.service-catalog-meta span {
    display: block;
    color: #627d98;
    font-size: .76rem;
}

.service-catalog-meta strong {
    display: block;
    margin-top: 2px;
    color: #1f2933;
    font-size: .95rem;
}

.service-catalog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.service-catalog-actions form {
    margin: 0;
}

.service-catalog-help {
    position: sticky;
    top: 86px;
}

.service-catalog-definitions dt {
    color: #1f2933;
    font-weight: 800;
}

.service-catalog-definitions dd {
    margin-bottom: 12px;
    color: #627d98;
}

.service-category-create {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
}

.service-category-form-grid,
.service-category-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 100px 120px 130px 110px;
    gap: 10px;
    align-items: end;
}

.service-category-list {
    display: grid;
    gap: 10px;
}

.service-category-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) 100px 120px 130px minmax(180px, .8fr);
    padding: 12px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
}

.service-category-row-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.service-category-dot {
    display: inline-block;
    width: 14px;
    height: 38px;
    border-radius: 8px;
    flex: 0 0 auto;
}

@media (max-width: 1200px) {
    .service-catalog-layout {
        grid-template-columns: 1fr;
    }

    .service-catalog-help {
        position: static;
    }

    .service-catalog-row {
        grid-template-columns: 1fr;
    }

    .service-catalog-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .service-catalog-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-catalog-filters {
        grid-template-columns: 1fr;
    }

    .service-catalog-meta {
        grid-template-columns: 1fr;
    }

    .service-category-form-grid,
    .service-category-row {
        grid-template-columns: 1fr;
    }
}

.service-picker {
    display: grid;
    gap: 8px;
}

.service-picker-selected {
    min-height: 20px;
}

.service-picker-grid {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 2px;
}

.service-picker-option {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin: 0;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
}

.service-picker-option:hover {
    background: #f8fafc;
}

.service-picker-option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.service-picker-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-picker-check {
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 5px;
    background: #fff;
}

.service-picker-option:has(input:checked) .service-picker-check {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: inset 0 0 0 4px #fff;
}

.service-picker-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.service-picker-name {
    color: #1f2933;
    font-weight: 800;
    line-height: 1.2;
}

.service-picker-meta {
    color: #627d98;
    font-size: .82rem;
    line-height: 1.25;
}

.lookup-panel {
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    font-size: .9rem;
}

.lookup-panel.lookup-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.lookup-panel .lookup-title {
    font-weight: 700;
}

.lookup-panel button {
    min-height: 34px;
}

.status-form {
    min-width: 220px;
}

.quick-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
}

.quick-status-grid .btn {
    min-height: 38px;
}

.appointment-quick-form {
    max-width: 260px;
}

.reschedule-step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.reschedule-step-grid .btn {
    min-height: 34px;
}

@media (max-width: 768px) {
    .mechanic-scope-grid {
        display: flex;
        gap: 8px;
        margin-left: -12px;
        margin-right: -12px;
        overflow-x: auto;
        padding: 0 12px 4px;
        scroll-snap-type: x proximity;
    }

    .mechanic-scope-tile {
        flex: 0 0 176px;
        scroll-snap-align: start;
    }

    .calendar-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-actions,
    .calendar-actions .btn-group,
    .calendar-actions .btn {
        width: 100%;
    }

    .calendar-actions .btn-group .btn {
        flex: 1 1 0;
    }

    .calendar-filter-form {
        grid-template-columns: 1fr;
    }

    .calendar-filter-form .btn {
        width: 100%;
    }

    .calendar-workbar {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-workbar .btn {
        width: 100%;
    }

    .calendar-month-weekdays {
        display: none;
    }

    .calendar-month-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .calendar-month-day {
        min-height: 0;
        border-right: 0;
        padding: 12px;
    }

    .calendar-month-day.is-outside {
        display: none;
    }

    .calendar-month-date {
        display: none;
    }

    .calendar-month-mobile-date {
        display: block;
        color: #1f2933;
        font-weight: 800;
    }

    .calendar-month-event-title {
        white-space: normal;
    }

    .calendar-week {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        grid-template-columns: 56px repeat(var(--day-count), minmax(var(--day-min-width, 240px), 1fr));
    }

    .calendar-day-heading {
        height: 54px;
        padding: 8px;
    }

    .calendar-appointment-item,
    .calendar-note-item {
        left: 6px;
        right: 6px;
    }

    .calendar-appointment-item {
        left: calc(6px + var(--overlap-left, 0%));
        right: calc(6px + var(--overlap-right, 0%));
        width: auto;
    }
}

@media (max-width: 576px) {
    h1,
    .h3 {
        font-size: 1.35rem;
    }

    h2,
    .h5 {
        font-size: 1.05rem;
    }

    .status-tile,
    .vehicle-summary-tile,
    .customer-summary-tile,
    .work-order-overview-tile,
    .admin-tile {
        min-height: 0;
        padding: 14px;
    }

    .status-value {
        font-size: 1.15rem;
    }

    .work-order-scope-grid,
    .dashboard-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .blacklist-grid {
        grid-template-columns: 1fr;
    }

    .admin-summary-grid {
        grid-template-columns: 1fr;
    }
}
