/* Реестр МФО — изолированные стили страницы /reestr-mfo/ */
.mfo-registry {
    --mfo-blue: #1464d2;
    --mfo-blue-dark: #0c4ea8;
    --mfo-text: #182033;
    --mfo-muted: #697386;
    --mfo-line: #e7ebf2;
    --mfo-bg: #f6f8fc;
    --mfo-card: #ffffff;
    --mfo-accent: #ffd400;
    --mfo-accent-hover: #f4c900;
    --mfo-danger: #c23b4b;
    color: var(--mfo-text);
}

.mfo-registry * { box-sizing: border-box; }

.mfo-registry__intro { margin-bottom: 22px; }
.mfo-registry__intro p { margin-top: 0; }

.mfo-registry__search {
    margin: 24px 0;
    padding: 18px;
    background: var(--mfo-bg);
    border: 1px solid var(--mfo-line);
    border-radius: 14px;
}

.mfo-registry__search-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .9fr) minmax(150px, .9fr) 150px;
    gap: 12px;
    align-items: center;
}

.mfo-registry__input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d8deea;
    border-radius: 9px;
    background: #fff;
    color: var(--mfo-text);
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mfo-registry__input::placeholder { color: #9aa4b5; }
.mfo-registry__input:focus {
    border-color: var(--mfo-blue);
    box-shadow: 0 0 0 3px rgba(20,100,210,.11);
}

.mfo-registry__submit {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 9px;
    background: var(--mfo-accent);
    color: #171717;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.mfo-registry__submit:hover { background: var(--mfo-accent-hover); }
.mfo-registry__submit:active { transform: translateY(1px); }

.mfo-registry__table {
    overflow: hidden;
    border: 1px solid var(--mfo-line);
    border-radius: 14px;
    background: var(--mfo-card);
    box-shadow: 0 6px 24px rgba(27, 45, 78, .06);
}

.mfo-registry__head,
.mfo-registry__row {
    display: grid;
    grid-template-columns: 42px 112px minmax(270px, 1fr) minmax(205px, .72fr) 142px;
    gap: 16px;
    align-items: center;
}

.mfo-registry__head {
    min-height: 46px;
    padding: 0 18px;
    background: #f8faff;
    border-bottom: 1px solid var(--mfo-line);
    color: #7c8799;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.mfo-registry__row {
    min-height: 154px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--mfo-line);
    transition: background .15s ease;
}
.mfo-registry__row:last-child { border-bottom: 0; }
.mfo-registry__row:hover { background: #fbfcff; }

.mfo-registry__num {
    align-self: start;
    padding-top: 4px;
    color: #98a2b2;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.mfo-registry__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 66px;
    padding: 8px;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
}
.mfo-registry__logo img {
    display: block;
    max-width: 94px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mfo-registry__company { min-width: 0; }
.mfo-registry__name {
    display: inline;
    color: var(--mfo-blue-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}
.mfo-registry__name:hover { text-decoration: underline; }
.mfo-registry__name--closed { color: #7b8494; text-decoration: line-through; }

.mfo-registry__license {
    margin-top: 5px;
    color: var(--mfo-muted);
    font-size: 12px;
    line-height: 1.4;
}

.mfo-registry__links { margin-top: 10px; }
.mfo-registry__conditions,
.mfo-registry__offices {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--mfo-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.mfo-registry__conditions:hover,
.mfo-registry__offices:hover { text-decoration: underline; }

.mfo-registry__resident-note {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff6d6;
    color: #735b00;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.mfo-registry__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: #eaf2ff;
    color: var(--mfo-blue-dark);
    font-size: 11px;
    font-weight: 700;
}

.mfo-registry__contacts {
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
}
.mfo-registry__contact {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 7px;
    margin-bottom: 6px;
}
.mfo-registry__contact:last-child { margin-bottom: 0; }
.mfo-registry__contact-label {
    color: #8b95a6;
    font-size: 11px;
    font-weight: 600;
}
.mfo-registry__contact-value { min-width: 0; color: var(--mfo-text); }
.mfo-registry__contact-value a, .mfo-registry__contact-value  {
    color: var(--mfo-blue-dark);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.mfo-registry__contact-value a:hover, .mfo-registry__contact-value:hover { text-decoration: underline; }

.mfo-registry__office {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed #dfe4ed;
    color: #4e596b;
    font-size: 12px;
    line-height: 1.45;
}
.mfo-registry__office-label {
    display: block;
    margin-bottom: 2px;
    color: #8b95a6;
    font-size: 11px;
    font-weight: 600;
}

.mfo-registry__excluded {
    margin-top: 10px;
    color: var(--mfo-danger);
    font-size: 12px;
    font-weight: 600;
}

.mfo-registry__action { text-align: right; }
.mfo-registry__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 9px;
    background: var(--mfo-accent);
    color: #171717;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
.mfo-registry__button:hover { background: var(--mfo-accent-hover); text-decoration: none; }
.mfo-registry__button:active { transform: translateY(1px); }
.mfo-registry__button--secondary {
    background: #eef3fb;
    color: var(--mfo-blue-dark);
}
.mfo-registry__button--secondary:hover { background: #e4ebf6; }

.mfo-registry .table__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.mfo-registry .table__pagination li { margin: 0; }
.mfo-registry .table__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--mfo-line);
    border-radius: 8px;
    background: #fff;
    color: var(--mfo-blue-dark);
    font-size: 13px;
}
.mfo-registry .table__page_active {
    border-color: var(--mfo-blue);
    background: var(--mfo-blue);
    color: #fff;
}

@media (max-width: 980px) {
    .mfo-registry__search-grid { grid-template-columns: 1fr 1fr; }
    .mfo-registry__head { display: none; }
    .mfo-registry__table { border-radius: 12px; }
    .mfo-registry__row {
        grid-template-columns: 34px 104px minmax(0, 1fr) 210px;
        gap: 14px;
        min-height: 0;
    }
    .mfo-registry__logo { width: 104px; }
    .mfo-registry__action {
        grid-column: 3 / 5;
        justify-self: start;
        width: 150px;
        text-align: left;
    }
}

@media (max-width: 700px) {
    .mfo-registry__search { padding: 14px; }
    .mfo-registry__search-grid { grid-template-columns: 1fr; }
    .mfo-registry__row {
        position: relative;
        grid-template-columns: 34px 88px minmax(0, 1fr);
        gap: 10px;
        padding: 16px 12px;
    }
    .mfo-registry__num { grid-column: 1; grid-row: 1; }
    .mfo-registry__logo {
        grid-column: 2;
        grid-row: 1;
        width: 88px;
        height: 58px;
    }
    .mfo-registry__logo img { max-width: 74px; max-height: 42px; }
    .mfo-registry__company { grid-column: 3; grid-row: 1; }
    .mfo-registry__name { font-size: 15px; }
    .mfo-registry__contacts {
        grid-column: 2 / 4;
        grid-row: 2;
        padding-top: 4px;
    }
    .mfo-registry__contact { grid-template-columns: 52px minmax(0, 1fr); }
    .mfo-registry__action {
        grid-column: 2 / 4;
        grid-row: 3;
        width: 100%;
    }
    .mfo-registry__button { width: 100%; }
}

@media (max-width: 420px) {
    .mfo-registry__row { grid-template-columns: 28px 72px minmax(0, 1fr); }
    .mfo-registry__logo { width: 72px; height: 52px; padding: 6px; }
    .mfo-registry__logo img { max-width: 60px; max-height: 38px; }
    .mfo-registry__license { font-size: 11px; }
}
