/* Shell chrome aligned with mccrometer.com: white header, blue/navy stripe, Inter body, Roboto headings. */

html,
body {
    background: #F4F7FA;
    color: #17212E;
    font-family: Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

a,
.btn-link {
    color: #0067A5;
}

.smarttrax-shell.mud-layout,
.smarttrax-shell .mud-main-content {
    background: #F4F7FA;
}

.smarttrax-shell .mc-appbar.mud-appbar {
    background-color: #ffffff !important;
    background-image: linear-gradient(90deg, #0067A5 0 42%, #003B5D 42% 100%) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 6px !important;
    background-position: top !important;
    color: #003B5D !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.smarttrax-shell .mc-product-name {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #D5DEE6;
    color: #003B5D;
    font-family: Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.smarttrax-shell .mc-page-title {
    margin: 0;
    color: #003B5D;
    font-family: Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smarttrax-shell .mc-appbar .mud-icon-button {
    color: #003B5D;
}

.smarttrax-shell .mc-appbar .mud-fab {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #D5DEE6;
    border-radius: 4px;
    background-color: #ffffff !important;
    color: #003B5D !important;
    box-shadow: none !important;
}

.smarttrax-shell .mc-appbar .mud-fab:hover {
    border-color: #0067A5;
    background-color: #E8F3F9 !important;
    color: #0067A5 !important;
}

.smarttrax-shell .mc-appbar .mud-chip {
    background-color: #E8F3F9 !important;
    color: #003B5D !important;
}

.smarttrax-shell .mud-drawer {
    background: #ffffff;
    border-right: 1px solid #D5DEE6;
}

.smarttrax-shell .mud-nav-link,
.smarttrax-shell .mud-nav-group > .mud-nav-link {
    border-radius: 0;
    color: #003B5D;
    font-weight: 700;
}

.smarttrax-shell .mud-nav-link.active,
.smarttrax-shell .mud-nav-link.mud-nav-link-active {
    border-inline-start: 3px solid #0067A5;
    background-color: #E8F3F9 !important;
    color: #0067A5 !important;
}

.smarttrax-shell .mud-nav-link:hover {
    background-color: #F4F7FA;
}

.mud-button-root,
.mud-fab {
    letter-spacing: 0.01em;
    text-transform: none;
    font-weight: 700;
}

.smarttrax-shell .mud-table-head .mud-table-cell {
    background: #F4F7FA;
    color: #003B5D;
    font-weight: 700;
}

.e-btn.e-primary,
.e-css.e-btn.e-primary {
    background-color: #0067A5 !important;
    border-color: #003B5D !important;
}

.e-grid .e-headercell,
.e-grid .e-headercelldiv {
    color: #003B5D !important;
    font-weight: 700 !important;
}

/* Center the title in the space between branding and account controls. */
.smarttrax-shell {
    --mud-appbar-height: 80px;
}

.smarttrax-shell .mc-appbar .mud-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 72px;
    column-gap: 24px;
    height: var(--mud-appbar-height);
    padding: 8px 24px 0;
}

.smarttrax-shell .mc-brand,
.smarttrax-shell .mc-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.smarttrax-shell .mc-brand {
    grid-column: 1;
    grid-row: 1;
}

.smarttrax-shell .smarttrax-logo {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.smarttrax-shell .mc-header-actions {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
}

.smarttrax-shell .mc-header-actions > * {
    flex-shrink: 0;
}

.smarttrax-shell .mc-header-actions .mud-fab-label {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smarttrax-shell .mc-page-title-slot {
    container-type: inline-size;
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 1.25rem;
    line-height: 1.3;
}

.smarttrax-shell .mc-main-content {
    padding: calc(var(--mud-appbar-height) + 24px) 24px 24px !important;
}

.mc-page-content {
    min-width: 0;
}

.dashboard-toolbar {
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-filters {
    flex: 1 1 900px;
    min-width: 0;
}

.dashboard-toolbar .dashboard-search {
    flex: 1 1 300px;
    min-width: 220px;
    max-width: 420px;
}

.dashboard-toolbar .mud-select:has(.dashboard-page-size) {
    flex: 0 0 180px;
    width: 180px;
}

.dashboard-pagination {
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Preserve the full interactive table at every width; scroll only the table. */
.dashboard-table {
    max-width: 100%;
}

.dashboard-table > .mud-table-container {
    overflow-x: auto;
}

.dashboard-table > .mud-table-container > table {
    min-width: 1000px;
}

.dashboard-table > .mud-table-container > table > thead > tr > th {
    padding: 12px;
    vertical-align: middle;
}

.dashboard-table > .mud-table-container > table > thead > tr > th:first-child > .mud-stack {
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-table > .mud-table-container > table > thead > tr > th:first-child > .mud-stack > .mud-select {
    flex: 0 0 170px;
    width: 170px;
}

.dashboard-table > .mud-table-container > table > thead > tr > th:not(:first-child):not(:last-child) > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-table > .mud-table-container > table > thead > tr > th:not(:first-child),
.dashboard-table > .mud-table-container > table > tbody > tr > td:not(:first-child):not([colspan]),
.dashboard-table > .mud-table-container > table > tfoot > tr > td:not(:first-child) {
    text-align: center;
    min-width: 160px;
    font-variant-numeric: tabular-nums;
}

.dashboard-table > .mud-table-container > table > tbody > tr > td[data-label="Device"] > .mud-stack {
    align-items: center;
}

.dashboard-table > .mud-table-container > table > tbody > tr > td[data-label="Device"] > .mud-stack > .mud-tooltip-root:first-child {
    flex: 0 0 200px;
    width: 200px;
}
.dashboard-save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 1399.98px) {
    .smarttrax-shell .mc-appbar .mud-toolbar { column-gap: 12px; }
    .smarttrax-shell .smarttrax-logo { width: 170px; }

    .smarttrax-shell .mc-header-actions .mud-fab-label { max-width: 130px; }
}

@media (max-width: 1199.98px) {
    .smarttrax-shell { --mud-appbar-height: 144px; }

    .smarttrax-shell .mc-appbar .mud-toolbar {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 48px 32px 48px;
        padding: 8px 12px;
    }

    .smarttrax-shell .mc-brand { justify-content: flex-start; }
    .smarttrax-shell .mc-page-title-slot { grid-column: 1; grid-row: 2; }
    .smarttrax-shell .mc-header-actions {
        grid-column: 1;
        grid-row: 3;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .smarttrax-shell .mc-header-actions .mud-fab { padding: 0 8px; }
    .smarttrax-shell .mc-header-actions .mud-fab-label { max-width: 110px; }
    .smarttrax-shell .mc-header-actions .mc-account-action { min-width: 44px; height: 44px; }
    /* MudFab puts its icon and text in the same label; keep the icon visible. */
    .smarttrax-shell .mc-account-action .mud-fab-label { font-size: 0; }
    .smarttrax-shell .mc-account-action .mud-icon-root { margin: 0; }
    .smarttrax-shell .mc-main-content {
        padding: calc(var(--mud-appbar-height) + 16px) 8px 16px !important;
    }

    .dashboard-toolbar .dashboard-search,
    .dashboard-toolbar .mud-select:has(.dashboard-page-size) { flex-basis: auto; min-width: 0; }
    .dashboard-pagination { margin-left: 0; justify-content: center; }
    .dashboard-table .mud-icon-button,
    .dashboard-pagination .mud-icon-button { min-width: 44px; min-height: 44px; }

}

@media (max-width: 599.98px) {

    .dashboard-save-actions > .mud-fab { width: 100%; }
    .dashboard-toolbar.dashboard-filters {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center !important;
        gap: 8px;
    }
    .dashboard-filters > * { min-width: 0; }
    .dashboard-filters > .mud-select { grid-column: 2; grid-row: 1; }
    .dashboard-filters .dashboard-search { grid-column: 1 / -1; grid-row: 2; }
    .dashboard-filters > .mud-tooltip-root { grid-column: 1 / -1; }

}

.smarttrax-shell .mc-product-name {
    font-weight: 900;
    font-style: italic;
    /* Keep the italic end stroke inside the text gradient's paint area. */
    padding-right: 0.2em;
    letter-spacing: -0.04em;
    background: linear-gradient(110deg, #003B5D, #008CC7);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.dashboard-page-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.dashboard-page-summary > :last-child {
    padding-left: 16px;
    border-left: 1px solid #D5DEE6;
}
@media (max-width: 599.98px) {
    .smarttrax-shell .smarttrax-logo { width: 150px; height: auto; }
    .smarttrax-shell .mc-product-name { font-size: 1.25rem; margin-left: 0; padding-left: 8px; }
    .smarttrax-shell .mc-brand { gap: 4px; }
    .dashboard-pagination { width: 100%; gap: 0 !important; }
    .dashboard-page-summary { flex-direction: column; gap: 2px; }
    .dashboard-page-summary > :last-child { padding-left: 0; border-left: 0; }
}
@media (max-width: 379.98px) {
    .smarttrax-shell .smarttrax-logo { width: 125px; }
    .smarttrax-shell .mc-product-name { font-size: 1.125rem; }
}@media (max-width: 379.98px) {
    .dashboard-pagination {
        display: grid !important;
        grid-template-columns: repeat(4, 48px);
        justify-content: center;
    }
    .dashboard-pagination > .mud-icon-button { grid-row: 2; }
    .dashboard-page-summary { grid-column: 1 / -1; grid-row: 1; }
}

.smarttrax-shell .mc-page-title {
    font-size: clamp(0.85rem, 6cqi, 1.25rem);
    line-height: 1.3;
}
.smarttrax-shell .mud-drawer-content { overflow: hidden; }
.mc-nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.mc-nav-footer { flex-shrink: 0; border-top: 1px solid #D5DEE6; padding: 8px 0; }
.mc-impersonating::after {
    content: "";
    position: fixed;
    inset: 0;
    border: 5px solid #D32F2F;
    box-shadow: inset 0 0 12px rgba(211, 47, 47, 0.35);
    pointer-events: none;
    z-index: 2000;
}
.smarttrax-shell .mc-appbar .mc-impersonation-action {
    color: #B71C1C;
    background: #FFEBEE;
    border: 1px solid #D32F2F;
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.65);
}@media (max-width: 599.98px) {
    .smarttrax-shell { --mud-appbar-height: 192px; }
    .smarttrax-shell .mc-appbar .mud-toolbar { grid-template-rows: 48px 32px 96px; }
    .smarttrax-shell .mc-header-actions { align-content: center; }
}
