:root {
    --mml-bg: #f6f7f9;
    --mml-panel: #ffffff;
    --mml-ink: #17202a;
    --mml-muted: #687385;
    --mml-line: #dfe4ea;
    --mml-primary: #136f63;
    --mml-primary-dark: #0e5048;
    --mml-accent: #c8502f;
    --mml-warn: #b78100;
    --mml-radius: 8px;
}

.mml-app {
    color: var(--mml-ink);
    background: var(--mml-bg);
    min-height: 100vh;
    padding: clamp(14px, 2vw, 24px);
    box-sizing: border-box;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mml-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}

.mml-kicker {
    margin: 0 0 4px;
    color: var(--mml-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.mml-topbar h1,
.mml-panel h2 {
    margin: 0;
    letter-spacing: 0;
}

.mml-topbar h1 {
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.12;
}

.mml-actions,
.mml-filterbar,
.mml-row-actions,
.mml-combo,
.mml-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mml-button,
.mml-icon-button {
    border: 1px solid var(--mml-line);
    background: #fff;
    color: var(--mml-ink);
    min-height: 38px;
    border-radius: 6px;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 650;
}

.mml-button-primary {
    background: var(--mml-primary);
    border-color: var(--mml-primary);
    color: #fff;
}

.mml-button-danger {
    border-color: #b42318;
    color: #b42318;
}

.mml-button:hover,
.mml-icon-button:hover {
    border-color: var(--mml-primary);
}

.mml-icon-button {
    width: 34px;
    min-height: 34px;
    padding: 0;
}

.mml-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.mml-stat,
.mml-panel,
.mml-load-card {
    background: var(--mml-panel);
    border: 1px solid var(--mml-line);
    border-radius: var(--mml-radius);
}

.mml-stat {
    padding: 16px;
}

.mml-stat span,
.mml-muted {
    color: var(--mml-muted);
}

.mml-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.mml-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.mml-command-card {
    background: #182329;
    color: #fff;
    border-radius: var(--mml-radius);
    padding: 18px;
    border-left: 4px solid var(--mml-primary);
}

.mml-command-card:nth-child(2) {
    border-color: var(--mml-accent);
}

.mml-command-card:nth-child(3) {
    border-color: var(--mml-warn);
}

.mml-command-card span,
.mml-command-card small {
    color: rgba(255, 255, 255, .72);
}

.mml-command-card strong {
    display: block;
    margin: 8px 0 4px;
    font-size: clamp(22px, 3vw, 32px);
}

.mml-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 14px;
}

.mml-tabs a {
    color: var(--mml-muted);
    text-decoration: none;
    padding: 10px 12px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 650;
}

.mml-tabs a.is-active {
    color: var(--mml-primary-dark);
    border-color: var(--mml-primary);
}

.mml-grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.mml-panel {
    padding: 16px;
    margin-bottom: 14px;
}

.mml-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mml-table-scroll {
    overflow-x: auto;
}

.mml-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.mml-table th,
.mml-table td {
    text-align: left;
    border-bottom: 1px solid var(--mml-line);
    padding: 11px 10px;
    vertical-align: middle;
}

.mml-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--mml-muted);
    background: #fafbfc;
}

.mml-market-filter {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 22px 28px;
    padding: 22px;
    margin: 10px 0 32px;
    background: var(--mml-panel);
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(23, 32, 42, .06);
}

.mml-filter-group {
    display: grid;
    gap: 10px;
}

.mml-filter-title {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    color: #198754;
}

.mml-filter-title button {
    border: 1px solid #b8ddcb;
    border-radius: 5px;
    background: #fff;
    color: #5daf82;
    min-height: 34px;
    padding: 0 12px;
    cursor: pointer;
}

.mml-filter-selected {
    color: #929dae;
}

.mml-market-filter select,
.mml-market-filter input {
    min-height: 48px;
    border: 1px solid #9bd5b9;
    border-radius: 9px;
    color: #929dae;
    background: #f8fcfa;
}

.mml-range-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.mml-filter-clear {
    justify-self: start;
    align-self: end;
    border-color: #b8ddcb;
    background: #eaf8f1;
    color: #198754;
    box-shadow: 0 8px 18px rgba(25, 135, 84, .14);
}

.mml-market-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 14px 26px rgba(23, 32, 42, .1);
}

.mml-market-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    background: var(--mml-panel);
}

.mml-market-table th,
.mml-market-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--mml-line);
    text-align: left;
    vertical-align: middle;
}

.mml-market-table th {
    color: #198754;
    background: #f5fbf8;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 13px;
}

.mml-market-table.is-empty::after {
    content: "No matching loads found.";
    display: block;
    padding: 18px;
    color: var(--mml-muted);
    background: var(--mml-panel);
}

.mml-market-row.is-extra:not(.is-revealed),
.mml-market-row.is-filtered-out {
    display: none;
}

.mml-load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 28px 0 10px;
}

.mml-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.mml-modal.is-open {
    display: flex;
}

.mml-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 32, 42, .56);
}

.mml-modal-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    padding: 22px;
    border-radius: 10px;
    background: var(--mml-panel);
    box-shadow: 0 24px 70px rgba(23, 32, 42, .28);
}

.mml-modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
}

.mml-modal-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 18px 0;
}

.mml-modal-grid dt {
    color: var(--mml-muted);
    font-weight: 750;
}

.mml-modal-grid dd {
    margin: 0;
}

.mml-modal-actions {
    display: flex;
    justify-content: flex-end;
}

body.mml-modal-active {
    overflow: hidden;
}

.mml-record-manager {
    min-width: 280px;
}

.mml-record-manager summary {
    cursor: pointer;
    color: var(--mml-primary-dark);
    font-weight: 750;
}

.mml-record-manager-body {
    display: grid;
    gap: 12px;
    width: min(760px, calc(100vw - 48px));
    margin-top: 10px;
}

.mml-record-manager dl {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 6px 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--mml-line);
    border-radius: 6px;
    background: #fafbfc;
}

.mml-record-manager dt {
    color: var(--mml-muted);
    font-weight: 700;
}

.mml-record-manager dd {
    margin: 0;
}

.mml-admin-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mml-admin-edit-grid textarea,
.mml-admin-edit-grid button {
    grid-column: 1 / -1;
}

.mml-admin-status-form,
.mml-booking-actions,
.mml-booking-form,
.mml-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mml-pagination {
    justify-content: flex-end;
    padding-top: 14px;
}

.mml-pagination a {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mml-line);
    border-radius: 6px;
    text-decoration: none;
    color: var(--mml-ink);
    background: #fff;
}

.mml-pagination a.is-active {
    color: #fff;
    background: var(--mml-primary);
    border-color: var(--mml-primary);
}

.mml-form-drawer {
    display: none;
}

.mml-form-drawer.is-open {
    display: block;
}

.mml-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mml-form-grid h2,
.mml-form-grid textarea,
.mml-form-grid button[type="submit"] {
    grid-column: 1 / -1;
}

.mml-app input,
.mml-app select,
.mml-app textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--mml-line);
    border-radius: 6px;
    padding: 8px 10px;
    box-sizing: border-box;
}

.mml-app textarea {
    min-height: 78px;
}

.mml-combo input {
    flex: 1 1 180px;
}

.mml-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.mml-load-card {
    padding: 16px;
}

.mml-route {
    font-size: 18px;
    font-weight: 750;
}

.mml-flow,
.mml-activity-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mml-flow span,
.mml-activity-list div {
    border: 1px solid var(--mml-line);
    border-radius: 6px;
    padding: 10px;
    background: #fafbfc;
}

.mml-activity-list div {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
}

.mml-activity-list em {
    color: var(--mml-accent);
    font-style: normal;
}

.mml-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid var(--mml-line);
    border-radius: 999px;
    padding: 0 10px;
    color: var(--mml-primary-dark);
    background: #eef8f5;
    font-weight: 750;
}

.mml-bar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mml-status-bars h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.mml-status-bars label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
}

.mml-status-bars i,
.mml-lane-item i {
    display: block;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf1f4;
}

.mml-status-bars b,
.mml-lane-item i {
    background: var(--mml-primary);
}

.mml-status-bars b {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.mml-lane-list {
    display: grid;
    gap: 12px;
}

.mml-lane-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 34px;
    gap: 10px;
    align-items: center;
}

.mml-lane-item div {
    display: grid;
    gap: 2px;
}

.mml-lane-item span,
.mml-lane-item em {
    color: var(--mml-muted);
    font-style: normal;
}

.mml-widget-board {
    min-height: auto;
    padding: 0;
    background: transparent;
}

.mml-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.mml-widget-head h2 {
    margin: 0;
    font-size: clamp(20px, 2vw, 28px);
}

.mml-widget-list {
    display: grid;
    gap: 10px;
}

.mml-widget-board.is-grid .mml-widget-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mml-board-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr) auto;
    gap: 12px;
    align-items: center;
    background: var(--mml-panel);
    border: 1px solid var(--mml-line);
    border-radius: var(--mml-radius);
    padding: 14px;
}

.mml-widget-board.is-grid .mml-board-row {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.mml-widget-board.is-compact .mml-board-row {
    padding: 10px;
    gap: 8px;
}

.mml-widget-board.is-spacious .mml-board-row {
    padding: 20px;
    gap: 16px;
}

.mml-widget-board.is-elevated .mml-board-row {
    box-shadow: 0 10px 24px rgba(23, 32, 42, .08);
}

.mml-widget-board.is-accent .mml-board-row {
    border-left: 4px solid var(--mml-primary);
}

.mml-board-row:hover {
    border-color: rgba(19, 111, 99, .45);
}

.mml-board-row div {
    display: grid;
    gap: 3px;
}

.mml-board-row .mml-booking-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mml-board-row span,
.mml-board-row em {
    color: var(--mml-muted);
    font-style: normal;
}

.mml-board-primary {
    color: var(--mml-ink);
}

.mml-board-value {
    justify-self: end;
    white-space: nowrap;
}

.mml-widget-board.is-grid .mml-board-value {
    justify-self: start;
}

.mml-toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 10px;
    z-index: 99999;
}

.mml-toast {
    width: min(360px, calc(100vw - 32px));
    background: #17202a;
    color: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px rgba(23, 32, 42, .22);
}

.mml-service-links {
    --mml-service-columns: 4;
    display: grid;
    gap: 22px;
    width: 100%;
    box-sizing: border-box;
}

.mml-service-links-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
}

.mml-service-links-head h2,
.mml-service-links-head p {
    margin: 0;
}

.mml-service-links-head p {
    margin-top: 6px;
    color: var(--mml-muted);
}

.mml-service-links-head span {
    flex: 0 0 auto;
    border: 1px solid #1b65ff;
    border-radius: 6px;
    padding: 7px 12px;
    color: #00164f;
    background: #eaf6ff;
    font-weight: 750;
}

.mml-service-link-grid {
    display: grid;
    grid-template-columns: repeat(var(--mml-service-columns), minmax(0, 1fr));
    gap: 26px 28px;
}

.mml-service-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid #1b65ff;
    border-radius: 6px;
    background: #eaf6ff;
    color: #000b3d;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.mml-service-link:hover,
.mml-service-link:focus {
    border-color: #0048ff;
    color: #000b3d;
    box-shadow: 0 3px 0 #0048ff, 0 10px 22px rgba(0, 72, 255, .14);
    outline: none;
    transform: translateY(-1px);
}

.mml-city-services {
    --mml-city-service-columns: 5;
    display: grid;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.mml-city-services h2 {
    margin: 0;
    color: #24272c;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    text-align: center;
}

.mml-city-service-grid {
    display: grid;
    grid-template-columns: repeat(var(--mml-city-service-columns), minmax(0, 1fr));
    gap: 28px;
}

.mml-city-service-card {
    display: grid;
    min-height: 214px;
    overflow: hidden;
    border: 1px solid #1b65ff;
    border-radius: 6px;
    background: #eaf6ff;
    color: #000b3d;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0, 72, 255, .06);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.mml-city-service-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.mml-city-service-card strong {
    align-self: end;
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .82);
    font-size: 16px;
    line-height: 1.25;
}

.mml-city-service-card:hover,
.mml-city-service-card:focus {
    border-color: #0048ff;
    color: #000b3d;
    box-shadow: 0 3px 0 #0048ff, 0 16px 28px rgba(0, 72, 255, .14);
    outline: none;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .mml-stat-grid,
    .mml-control-grid,
    .mml-grid-two,
    .mml-form-grid,
    .mml-admin-edit-grid,
    .mml-market-filter,
    .mml-bar-grid,
    .mml-widget-board.is-grid .mml-widget-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mml-topbar,
    .mml-list-head,
    .mml-service-links-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .mml-service-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .mml-city-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .mml-app {
        padding: 10px;
    }

    .mml-stat-grid,
    .mml-control-grid,
    .mml-grid-two,
    .mml-form-grid,
    .mml-admin-edit-grid,
    .mml-bar-grid,
    .mml-widget-board.is-grid .mml-widget-list,
    .mml-board-row {
        grid-template-columns: 1fr;
    }

    .mml-record-manager-body {
        width: calc(100vw - 28px);
    }

    .mml-record-manager dl {
        grid-template-columns: 1fr;
    }

    .mml-market-filter {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
        border-radius: 10px;
    }

    .mml-market-table-wrap {
        overflow: visible;
        box-shadow: none;
    }

    .mml-market-table {
        min-width: 0;
        background: transparent;
    }

    .mml-market-table thead {
        display: none;
    }

    .mml-market-table,
    .mml-market-table tbody,
    .mml-market-table tr,
    .mml-market-table td {
        display: block;
        width: 100%;
    }

    .mml-market-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--mml-line);
        border-radius: var(--mml-radius);
        background: var(--mml-panel);
    }

    .mml-market-table td {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid #eef1f4;
    }

    .mml-market-table td::before {
        content: attr(data-label);
        color: var(--mml-muted);
        font-weight: 750;
    }

    .mml-market-table td:last-child {
        border-bottom: 0;
    }

    .mml-modal-grid {
        grid-template-columns: 1fr;
    }

    .mml-actions,
    .mml-filterbar {
        width: 100%;
    }

    .mml-actions .mml-button,
    .mml-filterbar input,
    .mml-filterbar select {
        flex: 1 1 100%;
    }

    .mml-market-table td {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .mml-market-table td .mml-booking-actions,
    .mml-market-table td .mml-booking-form {
        justify-content: flex-start;
    }

    .mml-market-table .mml-button,
    .mml-modal-actions .mml-button {
        width: 100%;
    }

    .mml-modal {
        align-items: flex-end;
        padding: 0;
    }

    .mml-modal-panel {
        width: 100%;
        max-height: 88vh;
        border-radius: 12px 12px 0 0;
    }

    .mml-activity-list div {
        grid-template-columns: 1fr;
    }

    .mml-lane-item {
        grid-template-columns: 1fr 64px 28px;
    }

    .mml-service-link-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mml-service-link {
        min-height: 42px;
        padding: 9px 12px;
    }

    .mml-city-service-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mml-city-service-card {
        min-height: 120px;
    }

    .mml-city-service-card img {
        height: 150px;
    }
}

@media print {
    .mml-tabs,
    .mml-actions,
    .mml-filterbar,
    .mml-row-actions,
    .mml-form-drawer {
        display: none !important;
    }

    .mml-app {
        background: #fff;
        padding: 0;
    }
}

/* Modern SaaS shell */
:root {
    --mml-surface: #ffffff;
    --mml-soft: #eef3f8;
    --mml-blue: #2563eb;
    --mml-rose: #e11d48;
    --mml-green: #059669;
    --mml-amber: #d97706;
    --mml-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.mml-saas-shell {
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 42%, #f8fafc 100%);
    border-radius: 0;
}

.mml-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -4px -4px 16px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, .8);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 34px rgba(15, 23, 42, .06);
}

.mml-topbar-subtitle {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--mml-muted);
    font-size: 14px;
    line-height: 1.5;
}

.mml-mobile-nav-toggle {
    display: none;
}

.mml-button,
.mml-icon-button,
.mml-app input,
.mml-app select,
.mml-app textarea {
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.mml-button:focus,
.mml-icon-button:focus,
.mml-app input:focus,
.mml-app select:focus,
.mml-app textarea:focus {
    border-color: var(--mml-primary);
    box-shadow: 0 0 0 3px rgba(19, 111, 99, .14);
    outline: none;
}

.mml-button:hover,
.mml-icon-button:hover {
    transform: translateY(-1px);
}

.mml-stat-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.mml-stat {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    min-height: 116px;
    overflow: hidden;
    padding: 18px;
    border-color: rgba(203, 213, 225, .9);
    box-shadow: var(--mml-shadow);
}

.mml-stat::after {
    content: "";
    position: absolute;
    inset: auto -22px -30px auto;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(19, 111, 99, .1);
}

.mml-stat-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9f8f3;
    color: var(--mml-primary-dark);
    font-size: 12px;
    font-weight: 850;
}

.mml-stat small {
    display: block;
    margin-top: 5px;
    color: var(--mml-muted);
    font-size: 12px;
}

.mml-stat.is-blue .mml-stat-icon,
.mml-stat.is-blue::after {
    background: rgba(37, 99, 235, .12);
    color: #1d4ed8;
}

.mml-stat.is-amber .mml-stat-icon,
.mml-stat.is-amber::after {
    background: rgba(217, 119, 6, .14);
    color: #92400e;
}

.mml-stat.is-rose .mml-stat-icon,
.mml-stat.is-rose::after {
    background: rgba(225, 29, 72, .12);
    color: #be123c;
}

.mml-tabs {
    position: sticky;
    top: 92px;
    z-index: 15;
    margin-bottom: 14px;
    padding: 8px;
    border: 1px solid rgba(203, 213, 225, .88);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    backdrop-filter: blur(14px);
}

.mml-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 9px 11px;
}

.mml-tabs a span {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--mml-soft);
    color: var(--mml-muted);
    font-size: 10px;
    font-weight: 850;
}

.mml-tabs a.is-active {
    border-color: rgba(19, 111, 99, .16);
    background: #eef8f5;
    box-shadow: inset 0 0 0 1px rgba(19, 111, 99, .08);
}

.mml-tabs a.is-active span {
    background: var(--mml-primary);
    color: #fff;
}

.mml-control-grid,
.mml-ops-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.mml-command-card,
.mml-ops-card {
    border-radius: 8px;
    box-shadow: var(--mml-shadow);
}

.mml-command-card {
    border: 0;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.mml-ops-card {
    display: grid;
    gap: 12px;
    align-content: start;
    min-height: 168px;
    padding: 18px;
    border: 1px solid rgba(203, 213, 225, .9);
    background: var(--mml-surface);
}

.mml-ops-card span {
    color: var(--mml-primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.mml-ops-card strong {
    color: var(--mml-ink);
    font-size: 16px;
    line-height: 1.45;
}

.mml-panel,
.mml-load-card,
.mml-board-row {
    border-color: rgba(203, 213, 225, .9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.mml-list-head h2 {
    font-size: 18px;
}

.mml-table-scroll {
    border: 1px solid rgba(203, 213, 225, .85);
    border-radius: 8px;
    background: #fff;
}

.mml-table th {
    background: #f8fafc;
}

.mml-table tbody tr:hover,
.mml-market-table tbody tr:hover {
    background: #f8fafc;
}

.mml-create-panel details,
.mml-record-manager {
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 8px;
    background: #fff;
}

.mml-create-panel summary,
.mml-record-manager summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    list-style: none;
}

.mml-create-panel summary::-webkit-details-marker,
.mml-record-manager summary::-webkit-details-marker {
    display: none;
}

.mml-create-panel summary span,
.mml-record-manager summary span {
    color: var(--mml-primary-dark);
    font-weight: 850;
}

.mml-create-panel summary small,
.mml-record-manager summary small {
    color: var(--mml-muted);
    font-size: 12px;
    font-weight: 600;
}

.mml-record-manager-body {
    padding: 0 14px 14px;
}

.mml-admin-edit-grid,
.mml-form-grid {
    gap: 12px;
}

.mml-admin-status-form {
    padding-top: 12px;
    border-top: 1px solid var(--mml-line);
}

.mml-widget-board.is-glass .mml-board-row {
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(16px);
}

.mml-widget-board.is-dense-saas .mml-board-row {
    grid-template-columns: minmax(0, 1fr) minmax(160px, .8fr) auto;
    padding: 11px 12px;
    border-radius: 7px;
    box-shadow: none;
}

.mml-marketplace {
    border-radius: 8px;
}

.mml-market-filter {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    border-color: rgba(203, 213, 225, .9);
    border-radius: 8px;
    box-shadow: var(--mml-shadow);
}

.mml-market-table-wrap {
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 8px;
    box-shadow: var(--mml-shadow);
}

@media (max-width: 1100px) {
    .mml-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mml-market-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .mml-saas-shell {
        padding-bottom: 76px;
    }

    .mml-topbar {
        position: relative;
        top: auto;
        margin: 0 0 12px;
    }

    .mml-topbar h1 {
        font-size: 26px;
    }

    .mml-mobile-nav-toggle {
        display: inline-flex;
    }

    .mml-tabs {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        top: auto;
        z-index: 99990;
        display: none;
        max-height: 52vh;
        overflow: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mml-tabs.is-open {
        display: grid;
    }

    .mml-tabs a {
        justify-content: flex-start;
        border-color: rgba(203, 213, 225, .85);
        background: #fff;
    }

    .mml-actions {
        justify-content: stretch;
    }

    .mml-actions .mml-button {
        flex: 1 1 calc(50% - 8px);
    }

    .mml-stat-grid,
    .mml-control-grid,
    .mml-ops-grid,
    .mml-market-filter {
        grid-template-columns: 1fr;
    }

    .mml-stat {
        min-height: auto;
    }

    .mml-table-scroll {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .mml-table {
        min-width: 0;
    }

    .mml-table thead {
        display: none;
    }

    .mml-table,
    .mml-table tbody,
    .mml-table tr,
    .mml-table td {
        display: block;
        width: 100%;
    }

    .mml-table tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid rgba(203, 213, 225, .9);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    }

    .mml-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        padding: 9px 0;
        border-bottom: 1px solid #edf2f7;
    }

    .mml-table td::before {
        content: attr(data-label);
        color: var(--mml-muted);
        font-weight: 800;
    }

    .mml-table td:last-child {
        border-bottom: 0;
    }

    .mml-create-panel summary,
    .mml-record-manager summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .mml-app {
        padding: 10px;
    }

    .mml-topbar {
        padding: 12px;
    }

    .mml-topbar-subtitle {
        font-size: 13px;
    }

    .mml-actions .mml-button,
    .mml-actions .mml-icon-button,
    .mml-button,
    .mml-icon-button {
        min-height: 44px;
    }

    .mml-stat {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 14px;
    }

    .mml-stat strong {
        font-size: 24px;
    }

    .mml-filterbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mml-record-manager-body,
    .mml-admin-status-form,
    .mml-booking-actions,
    .mml-booking-form {
        width: 100%;
    }

    .mml-admin-status-form .mml-button,
    .mml-booking-form .mml-button,
    .mml-record-manager .mml-button {
        width: 100%;
    }

    .mml-board-row,
    .mml-widget-board.is-dense-saas .mml-board-row {
        grid-template-columns: 1fr;
    }
}
