.qw-shell { font-size: 16px; }
.qw-shell > header b { font-size: 18px; }
.qw-shell > header small { font-size: 12px; }
.qw-heading > span { font-size: 12px; }
.qw-heading h1 { font-size: 34px; line-height: 1.12; }
.qw-heading p { font-size: 16px; line-height: 1.6; }
.qw-progress p { font-size: 12px; }
.qw-step h2,
.qw-inv-head h2 { font-size: 26px; line-height: 1.2; }
.qw-step > p,
.qw-inv-head > div > p { font-size: 15px; line-height: 1.55; }
.qw-grid label,
.qw-grid legend { font-size: 14px; }
.qw-grid input,
.qw-grid select,
.qw-grid textarea { min-height: 46px; font-size: 16px; }
.qw-options span,
.qw-checks span { min-height: 48px; font-size: 14px; line-height: 1.35; }
.qw-upload span { font-size: 12px; }
.qw-consent { font-size: 14px !important; }
.qw-review h3 { font-size: 15px; }
.qw-review p { padding: 9px 0; font-size: 13px; line-height: 1.4; }
.qw-shell form > footer button { min-height: 46px; font-size: 14px; }
.qw-room-picker > b { font-size: 15px; }
.qw-room-picker button,
.qw-room-catalog button,
.qw-add-custom { font-size: 13px; line-height: 1.35; }
.qw-room h3 { font-size: 20px; }
.qw-room header small,
.qw-room header input { font-size: 13px; }
.qw-added > p { font-size: 14px; }
.qw-added span small { font-size: 12px; }
.qw-inv-head aside b { font-size: 18px; }
.qw-inv-head aside span { font-size: 12px; line-height: 1.45; }
.qw-selected-inventory > h3 { font-size: 16px; }
.qw-selected-inventory h4 { font-size: 15px; }
.qw-selected-inventory p { font-size: 14px; }
.qw-success h1 { font-size: 29px; }

/* Readable application scale: keep the information density while avoiding tiny dashboard text. */
.mos-app { grid-template-columns: 244px minmax(0, 1fr); font-size: 16px; }
.mos-sidebar { width: 244px; }
.mos-sidebar nav a,
.mos-sidebar-bottom > a { min-height: 44px; font-size: 15px; }
.mos-user b { font-size: 14px; }
.mos-user small { font-size: 12px; }
.mos-topbar { min-height: 80px; }
.mos-topbar h1 { font-size: 25px; }
.mos-topbar p { font-size: 13px; }
.mos-global-search { width: 300px; height: 42px; }
.mos-global-search input { font-size: 14px; }
.mos-notify { width: 42px; height: 42px; }
.mos-primary { min-height: 42px; padding: 0 17px; font-size: 14px; }
.mos-kpi small { font-size: 14px; }
.mos-kpi strong { font-size: 30px; }
.mos-kpi p { font-size: 12px; }
.mos-panel-head h2 { font-size: 18px; }
.mos-panel-head p { font-size: 13px; }
.mos-panel-head button { min-height: 36px; padding: 0 12px; font-size: 13px; }
.mos-panel-head a { font-size: 13px; }
.mos-yaxis,
.mos-xaxis { font-size: 11px; }
.mos-pipeline p,
.mos-total { font-size: 13px; }
.mos-upcoming time { font-size: 13px; }
.mos-upcoming a > span b { font-size: 14px; }
.mos-upcoming a > span small,
.mos-upcoming em { font-size: 12px; }
.mos-upcoming strong { font-size: 13px; }
.mos-tasks span b { font-size: 13px; }
.mos-tasks span small { font-size: 12px; }
.mos-tasks em { font-size: 11px; }
.mos-activity span b,
.mos-timeline span b { font-size: 13px; }
.mos-activity span small,
.mos-timeline span small { font-size: 12px; }
.mos-tabs button { font-size: 13px; }
.mos-tabs b { font-size: 10px; }
.mos-tools input,
.mos-tools button { font-size: 13px; }
.mos-lead-summary span { font-size: 12px; }
.mos-lead-summary b { font-size: 21px; }
.mos-table-panel { overflow-x: auto; }
.mos-table-panel table { font-size: 13px; }
.mos-table-panel th { font-size: 11px; padding: 13px 14px; }
.mos-table-panel td { padding: 14px; }
.mos-table-panel td > a span:last-child b { font-size: 13px; }
.mos-table-panel td > a span:last-child small { font-size: 11px; }
.mos-status { font-size: 11px; padding: 5px 9px; }
.mos-table-foot,
.mos-back { font-size: 12px; }
.mos-form-grid label,
.mos-auth-card label,
.mos-onboarding-card label { font-size: 13px; }
.mos-form-grid input,
.mos-form-grid select,
.mos-form-grid textarea { min-height: 44px; font-size: 15px; }
.mos-form-error,
.mos-alert { font-size: 13px; }
.p1-search { min-height: 42px; }
.p1-search input { font-size: 14px; }
.p1-toolbar > button,
.p1-view-toggle button,
.p1-secondary,
.p1-actions button { min-height: 42px; font-size: 13px; }
.p1-summary span { font-size: 13px; }
.p1-summary strong { font-size: 27px; }
.p1-summary small { font-size: 12px; }
.p1-detail-hero h2 { font-size: 22px; }
.p1-detail-hero p { font-size: 13px; }
.p1-detail-tabs button { font-size: 13px; }
.p1-detail-grid .mos-panel > h2,
.p1-tab-empty h2 { font-size: 17px; }
.p1-dl dt { font-size: 11px; }
.p1-dl dd { font-size: 14px; }
.p1-related { font-size: 13px; }
.p1-timeline span b { font-size: 13px; }
.p1-timeline span small { font-size: 11px; }
.p1-estimate-summary span { font-size: 12px; }
.p1-estimate-summary strong { font-size: 29px; }
.p1-estimate-summary small,
.p1-est-status,
.p1-book,
.p1-booked { font-size: 11px; }
.p1-calendar-tools button { min-height: 38px; font-size: 12px; }
.p1-calendar-tools h2 { font-size: 20px; }
.p1-calendar > header b { font-size: 11px; }
.p1-calendar time { font-size: 12px; }
.p1-calendar section > a { font-size: 10px; }
.p1-calendar-hint { font-size: 12px; }
.mos-notification-menu { width: 340px; }
.mos-notification-menu header { font-size: 13px; }
.mos-notification-menu b { font-size: 13px; }
.mos-notification-menu small { font-size: 12px; }

.qw-room-catalog {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px !important;
    overflow: visible !important;
}

.qw-room-catalog button {
    width: 100%;
    min-height: 38px;
    white-space: normal;
    text-align: left;
}

.qw-catalog-empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.qw-selected-inventory {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding: 16px 0;
    border-top: 2px solid #dbe4ef;
    border-bottom: 2px solid #dbe4ef;
}

.qw-selected-inventory > h3 { margin: 0 0 10px; }
.qw-selected-inventory section { padding: 8px 0; }
.qw-selected-inventory section + section { border-top: 1px solid #edf1f5; }
.qw-selected-inventory h4 { margin: 0 0 5px; font-size: 15px; }
.qw-selected-inventory p { padding: 4px 0; border: 0; }
.qw-selected-inventory em { margin-left: auto; color: #be123c; font-size: 11px; font-style: normal; }

.mos-notify > b {
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px;
    display: none !important;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #ef4444;
    font-size: 9px;
    line-height: 1;
}

.mos-notify > b.has-unread {
    display: grid !important;
    animation: moveos-notification-pulse 1.35s ease-in-out infinite;
}

.mos-notification-menu > a {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid #edf1f5;
    color: #1e293b;
    text-align: left;
    text-decoration: none;
}

.mos-notification-menu b {
    position: static !important;
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit;
    font-size: 10px;
    line-height: 1.3;
}

.mos-notification-menu header span { color: #64748b; }
.mos-notification-menu > a span { min-width: 0; flex: 1; }
.mos-notification-menu > a span > b,
.mos-notification-menu > a span > small { display: block; }
.mos-notification-menu > a:hover { background: #eff6ff; }
.mos-notification-menu > a.read { opacity: .68; }
.mos-notification-menu > a > i { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 5px; border-radius: 50%; background: #2563eb; }
.mos-notification-menu > a.read > i { background: #cbd5e1; }
.mos-notification-menu > a span { display: flex; flex-direction: column; gap: 3px; }
.mos-notification-menu > a small { color: #64748b; line-height: 1.35; }

.ep-modal {
    place-items: start center !important;
    overflow-y: auto;
    padding: 32px 15px;
}

.ep-modal form {
    margin: auto;
    max-height: calc(100vh - 64px) !important;
    scroll-padding-top: 28px;
    scroll-margin-top: 32px;
}

.ep-admin-head {
    padding-top: 2px;
}

.ep-admin-head small {
    display: block;
    margin: 0 0 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

/* The close control is the only direct button in the tracking form, so the
   portal's generic final-action rule must not stretch it across the header. */
.ep-modal form > .ep-x {
    width: auto !important;
}

.ep-preview-link {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 750;
    text-decoration: none;
}

.ep-preview-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 13px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
}

.ep-preview-banner span { font-size: 12px; }
.ep-preview-actions button { cursor: not-allowed; opacity: .58; }

.p2-manual-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1e3a8a;
}

.p2-manual-note span {
    font-size: 11px;
    line-height: 1.45;
}

.p2-record-search {
    position: relative;
    display: grid;
    grid-column: 1 / -1;
    gap: 8px;
}

.p2-record-search > label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.p2-record-results {
    max-height: 270px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .13);
}

.p2-record-results button {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 3px;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: #fff;
    color: #172033;
    text-align: left;
}

.p2-record-results button:last-child { border-bottom: 0; }
.p2-record-results button:hover,
.p2-record-results button:focus { background: #eff6ff; }
.p2-record-results small { color: #64748b; font-weight: 500; }
.p2-record-results em { color: #1d4ed8; font-style: normal; font-weight: 750; }
.p2-record-results p { margin: 0; padding: 14px; color: #64748b; }

.p2-record-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #93c5fd;
    border-radius: 9px;
    background: #eff6ff;
}

.p2-record-selected span,
.p2-record-selected small { display: block; }
.p2-record-selected small { margin-top: 3px; color: #475569; }
.p2-record-selected button,
.p2-new-customer { width: max-content; }
.p2-new-customer { border: 0; background: transparent; color: #1d4ed8; font-weight: 700; }
.p2-record-results[hidden],
.p2-record-selected[hidden],
.p2-new-customer[hidden] { display: none !important; }

.p2-record-search + input + input ~ label input[readonly] {
    background: #f8fafc;
    color: #334155;
}

@keyframes moveos-notification-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
    50% { transform: scale(1.13); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

@media (max-width: 620px) {
    .qw-heading h1 { font-size: 29px; }
    .qw-step h2,
    .qw-inv-head h2 { font-size: 23px; }
    .qw-room-catalog { grid-template-columns: 1fr 1fr; }
    .ep-modal { padding: 12px 8px; }
    .ep-modal form { max-height: calc(100vh - 24px) !important; }
}

@media (max-width: 760px) {
    .mos-app { display: block; }
    .mos-topbar h1 { font-size: 21px; }
    .mos-kpi strong { font-size: 24px; }
}

/* Use a recognizable box-truck silhouette for the Trucks navigation item. */
.mos-sidebar nav a[href*="/trucks/"] > i {
    font-size: 0;
}

.mos-sidebar nav a[href*="/trucks/"] > i::before {
    content: "";
    display: block;
    width: 19px;
    height: 19px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h12v10H9.2a3.2 3.2 0 0 0-6.2 0H2V5zm14 3h2.4l3.6 4v3h-.8a3.2 3.2 0 0 0-6.2 0h-1V8h2zm-9.9 6.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6zm12 0a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6zM16 10v2h3.3l-1.8-2H16z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h12v10H9.2a3.2 3.2 0 0 0-6.2 0H2V5zm14 3h2.4l3.6 4v3h-.8a3.2 3.2 0 0 0-6.2 0h-1V8h2zm-9.9 6.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6zm12 0a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6zM16 10v2h3.3l-1.8-2H16z'/%3E%3C/svg%3E") center / contain no-repeat;
}
