* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f7f9fc;
}
.mls-wrap {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px 40px;
}
h1 {
    margin: 0 0 18px;
    color: #01377d;
    font-size: 28px;
}
.mls-filters {
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}
.mls-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.mls-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}
.mls-filters input,
.mls-filters select,
.mls-filters button {
    font: inherit;
}
.mls-filters input,
.mls-filters select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c7d1dc;
    border-radius: 6px;
    background: #fff;
}
.mls-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.mls-actions button,
.mls-reset,
.mls-page-link {
    text-decoration: none;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #01377d;
}
.mls-actions button {
    background: #01377d;
    color: #fff;
    cursor: pointer;
}
.mls-reset,
.mls-page-link {
    background: #fff;
    color: #01377d;
}
.mls-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 12px;
    font-size: 14px;
}
.mls-error {
    background: #fff3f3;
    border: 1px solid #d79b9b;
    color: #7c1c1c;
    padding: 14px;
    border-radius: 8px;
}
.mls-table-scroll {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
}
.mls-table {
    width: 100%;
    border-collapse: collapse;
}
.mls-table thead th {
    background: #01377d;
    color: #ffffff;
    text-align: left;
    padding: 12px 14px;
    font-size: 14px;
    white-space: nowrap;
}
.mls-table thead th a {
    color: #ffffff;
    text-decoration: none;
}
.mls-sort-arrow {
    font-size: 12px;
    vertical-align: middle;
}
.mls-table tbody td {
    padding: 12px 14px;
    border-top: 1px solid #e3e7ed;
    font-size: 14px;
    vertical-align: top;
}
.mls-table tbody tr:nth-child(odd) {
    background: #ffffff;
}
.mls-table tbody tr:nth-child(even) {
    background: #eeeeee;
}
.mls-empty {
    text-align: center;
    color: #666;
}
.mls-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.mls-page-link.is-active {
    background: #01377d;
    color: #fff;
}
@media (max-width: 700px) {
    h1 { font-size: 24px; }
    .mls-meta {
        flex-direction: column;
    }
}

.mls-clickable-row { cursor: pointer; }
.mls-clickable-row:hover td, .mls-clickable-row:focus td { background: #e7eef9; }


.mls-page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.mls-subhead {
    margin: 6px 0 0;
    color: #526070;
    font-size: 15px;
    line-height: 1.45;
}
.mls-header-note {
    background: linear-gradient(180deg, #f4f8ff 0%, #e9f1ff 100%);
    border: 1px solid #c8d8f0;
    color: #01377d;
    border-radius: 10px;
    padding: 12px 14px;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}
.mls-filters {
    box-shadow: 0 8px 24px rgba(1, 55, 125, 0.06);
}
.mls-filters input:focus,
.mls-filters select:focus,
.mls-actions button:focus,
.mls-reset:focus,
.mls-page-link:focus {
    outline: 2px solid #7ea6df;
    outline-offset: 1px;
}
.mls-actions button,
.mls-reset,
.mls-page-link,
.mls-pagination a,
.mls-table thead th a {
    transition: all .15s ease-in-out;
}
.mls-actions button:hover {
    filter: brightness(1.04);
}
.mls-reset:hover,
.mls-page-link:hover,
.mls-pagination a:hover {
    background: #eef4ff;
}
.mls-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.mls-stat-card {
    background: #fff;
    border: 1px solid #d9e1ea;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 4px 14px rgba(1, 55, 125, 0.04);
}
.mls-stat-card strong {
    display: block;
    color: #01377d;
    font-size: 20px;
    margin-top: 4px;
}
.mls-stat-label {
    color: #5f6d7c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.mls-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}
.mls-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #eef4ff;
    border: 1px solid #c7d8f2;
    color: #01377d;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.mls-table-scroll {
    box-shadow: 0 8px 24px rgba(1, 55, 125, 0.05);
}
.mls-table thead th a:hover {
    text-decoration: underline;
}
.mls-table tbody td:first-child {
    font-weight: 700;
}
.mls-table tbody td {
    transition: background-color .12s ease-in-out;
}
.mls-clickable-row:hover td, .mls-clickable-row:focus td {
    background: #e7eef9 !important;
}
.mls-clickable-row td:first-child::after {
    content: " ↗";
    opacity: .45;
    font-weight: 400;
}
.mls-pagination {
    align-items: center;
}
.mls-pagination a,
.mls-pagination span.current {
    text-decoration: none;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #d0d9e5;
    background: #fff;
    color: #01377d;
    font-weight: 600;
}
.mls-pagination span.current {
    background: #01377d;
    border-color: #01377d;
    color: #fff;
}
@media (max-width: 900px) {
    .mls-page-header {
        flex-direction: column;
    }
    .mls-header-note {
        max-width: none;
    }
}
