:root {
    color: #1f2933;
    background: #f4f6f8;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: #145ea8;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #d9e2ec;
    color: #596675;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 72rem;
    min-height: 3.75rem;
    margin: 0 auto;
    padding: 0.6rem 1.25rem;
}

.site-title {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    color: #596675;
    font-size: 1.125rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.site-title::before {
    content: '';
    width: 0.4rem;
    height: 1.15rem;
    border-radius: 3px;
    background: #1688dc;
}

.site-navigation {
    flex: 1 1 auto;
    min-width: 0;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.125rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #647383;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.navigation a:hover {
    background: #f3f7fb;
    color: #3579b2;
}

.navigation a.is-active {
    border-color: #d9e7f5;
    background: #edf5fe;
    color: #1768a7;
    font-weight: 500;
    text-decoration: none;
}

.site-header :is(a, button):focus-visible {
    outline: 2px solid #1688dc;
    outline-offset: 2px;
}

.navigation__disabled {
    color: #7b8794;
    cursor: not-allowed;
}

.user-area {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 0.65rem;
    min-width: 0;
    margin-left: auto;
    padding-left: 1rem;
    border-left: 1px solid #e7edf3;
    font-size: 0.8125rem;
}

.user-area__name {
    min-width: 0;
    max-width: 10rem;
    overflow: hidden;
    color: #647383;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-area form {
    flex: 0 0 auto;
    margin: 0;
}

.user-area .user-area__logout {
    min-height: 2.125rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid #d8e1ed;
    border-radius: 6px;
    background: #fff;
    color: #647383;
    font: inherit;
    line-height: 1.2;
}

.user-area .user-area__logout:hover {
    border-color: #b8ccdf;
    background: #f3f7fb;
    color: #3579b2;
}

@media (max-width: 56rem) {
    .site-header__inner {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        padding: 0.6rem 1rem;
    }

    .site-navigation {
        order: 3;
        flex: 0 0 100%;
        overflow-x: auto;
        padding: 3px;
        scrollbar-width: thin;
        scrollbar-color: #b9c6d4 #fff;
    }

    .navigation {
        flex-wrap: nowrap;
        width: max-content;
    }

    .user-area {
        max-width: calc(100% - 8.5rem);
        padding-left: 0;
        border-left: 0;
    }
}

button {
    padding: 0.45rem 0.8rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
}

button:hover {
    background: #eef2f6;
}

.main-content {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

body.layout-fullpage {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    overflow-x: hidden;
}

body.layout-fullpage .site-header {
    flex: 0 0 auto;
}

body.layout-fullpage .site-header__inner {
    max-width: none;
}

body.layout-fullpage .main-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
}

body.layout-fullpage .messages {
    flex: 0 0 auto;
    margin: 0.5rem 1.25rem 0;
}

body.layout-modal {
    margin: 0;
    min-height: 100%;
    background: #ffffff;
}

body.layout-modal .main-content {
    max-width: none;
    margin: 0;
    padding: 1rem 1.25rem 1.5rem;
}

body.layout-modal .main-content h1 {
    font-size: 1.35rem;
}

body.layout-modal .messages {
    margin: 0 0 1rem;
}

.main-content h1 {
    margin-top: 0;
}

.page-header,
.page-actions,
.form-actions,
.actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header {
    justify-content: space-between;
    margin-bottom: 1rem;
}

.page-header h1 {
    margin-bottom: 0;
}

.shop-search {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.shop-search__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.shop-search__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.shop-search__query {
    flex: 1 1 16rem;
    min-width: 12rem;
    height: 2.25rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
}

.shop-search__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.65rem;
}

.shop-search__fields label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
}

.button {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    background: #ffffff;
    text-decoration: none;
}

.button--danger {
    border-color: #c53030;
    background: #c53030;
    color: #ffffff;
}

.button--danger:hover {
    background: #9b2c2c;
}

.table-wrapper {
    overflow-x: auto;
}

.table-actions {
    white-space: normal;
}

.table-multiline {
    vertical-align: top;
    line-height: 1.35;
}

.table-actions form {
    display: inline;
    margin: 0 0.25rem 0.25rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 0.65rem;
    border: 1px solid #d9e2ec;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #eef2f6;
}

.place-catalog-page {
    max-width: 100%;
    min-width: 0;
}

.place-catalog-page input,
.place-catalog-page select {
    max-width: 100%;
}

.place-catalog__scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: clip;
}

.place-catalog__table {
    width: 100%;
    table-layout: fixed;
}

.place-catalog__table th,
.place-catalog__table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.place-catalog__table .place-catalog__place {
    width: 36%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}
.place-catalog__table .place-catalog__status {
    width: 8%;
    padding-right: 0.35rem;
    padding-left: 0.35rem;
    overflow-wrap: normal;
    white-space: nowrap;
    text-align: center;
}
.place-catalog__table .place-catalog__when,
.place-catalog__table .place-catalog__country {
    white-space: nowrap;
    overflow-wrap: normal;
}
.place-catalog__table .place-catalog__when { width: 16%; }
.place-catalog__table .place-catalog__category { width: 26%; }
.place-catalog__table .place-catalog__country { width: 6%; }

@media (max-width: 1000px) {
    .place-catalog__table {
        width: 64rem;
    }
}

td.catalog-cell-tip,
.catalog-cell-tip__focus {
    cursor: help;
}

.catalog-cell-tip__focus {
    display: inline-block;
    min-width: 1.5rem;
}

.catalog-cell-tip__focus:focus-visible,
a.catalog-osm-link:focus-visible {
    outline: 2px solid #145ea8;
    outline-offset: 2px;
}

a.catalog-osm-link,
a.catalog-osm-link:hover,
a.catalog-osm-link:focus {
    text-decoration: none;
}

.place-catalog__tips,
.node-workers__tips {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.place-catalog-layer {
    position: fixed;
    z-index: 30;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    overflow: auto;
    padding: 0.55rem 0.7rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.35rem;
    background: #ffffff;
    box-shadow: 0 0.35rem 0.9rem rgba(27, 43, 61, 0.16);
    color: #1f2933;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.45;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.place-catalog-layer[hidden] {
    display: none;
}

.place-catalog-layer--photo {
    padding: 0.35rem;
    line-height: 0;
    white-space: normal;
}

.place-catalog-layer__photo {
    display: block;
    height: 100px;
    width: auto;
    max-width: none;
    object-fit: contain;
}

.node-workers {
    max-width: 100%;
    min-width: 0;
}

.node-workers__scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: clip;
}

.node-workers__table {
    width: 100%;
    table-layout: fixed;
}

.node-workers__table th,
.node-workers__table td {
    white-space: normal;
    overflow-wrap: break-word;
    vertical-align: top;
}

.node-workers td.node-workers__name .catalog-cell-tip__focus {
    display: block;
}

.node-workers__name { width: 22%; }
.node-workers__role { width: 12%; }
.node-workers__desired { width: 10%; }
.node-workers__actual { width: 14%; }
.node-workers__heartbeat { width: 12%; }
.node-workers__actions { width: 30%; }

.node-workers__alert {
    margin-left: 0.35rem;
    font-weight: 700;
}

.node-workers__actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.node-workers__actions-row + .node-workers__actions-row {
    margin-top: 0.35rem;
}

.node-workers__actions form {
    display: inline-flex;
    margin: 0;
}

.node-workers__actions button {
    padding: 0.35rem 0.55rem;
}

a.node-workers__delete {
    color: #9b2c2c;
    font-weight: 700;
}

@media (max-width: 1000px) {
    .node-workers__table {
        width: 64rem;
    }
}

.shop-list {
    width: 100%;
}

.shop-list td {
    vertical-align: middle;
}

.shop-list__code {
    width: 6.25rem;
    max-width: 6.25rem;
    white-space: nowrap;
}

.shop-list__shop {
    width: 22%;
    white-space: normal;
}

.shop-list__location {
    width: auto;
    white-space: normal;
}

.shop-list__price {
    width: calc(6ch + 1.3rem);
    white-space: nowrap;
}

.shop-list__phones {
    width: 8rem;
    min-width: 7rem;
    white-space: normal;
}

.shop-list__payment,
.shop-list__actions {
    width: 1%;
    white-space: nowrap;
}

.shop-list__stack {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.shop-list__stack-line {
    line-height: 1.3;
}

.shop-list__shop-meta,
.shop-list__phone-type {
    font-size: 0.8125rem;
    color: #3e4c59;
}

.shop-list__shop-name {
    color: #596675;
    font-weight: 400;
}

.shop-list__phone {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.shop-list__phone-type {
    white-space: nowrap;
}

.copy-payment,
.copy-url,
.copy-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    background: #ffffff;
    color: #145ea8;
    cursor: pointer;
}

.copy-phone {
    width: 1.5rem;
    height: 1.5rem;
}

.copy-payment:hover,
.copy-url:hover,
.copy-phone:hover {
    background: #eef2f6;
}

.copy-payment:focus,
.copy-url:focus,
.copy-phone:focus {
    outline: 2px solid #145ea8;
    outline-offset: 2px;
}

.copy-payment svg,
.copy-url svg,
.copy-phone svg {
    display: block;
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.copy-payment:disabled {
    opacity: 0.45;
    cursor: default;
}

.shop-copy-preview {
    position: fixed;
    z-index: 4000;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 0.35rem 0.5rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(27, 43, 61, 0.18);
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #1b2b3d;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    pointer-events: none;
}

.copy-phone svg {
    width: 0.875rem;
    height: 0.875rem;
}

.form-container,
.confirmation {
    max-width: 40rem;
    padding: 1.25rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.form-container label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container select {
    width: 100%;
    max-width: 28rem;
    padding: 0.5rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
}

.helptext {
    display: block;
    margin-top: 0.25rem;
    color: #52606d;
    font-size: 0.875rem;
}

.errorlist {
    color: #9b2c2c;
}

.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    background: #ffffff;
}

.message + .message {
    margin-top: 0.5rem;
}

.message--success {
    border-color: #38a169;
    background: #f0fff4;
}

.message--error {
    border-color: #e53e3e;
    background: #fff5f5;
}

.permission-groups {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #d9e2ec;
}

.permission-groups legend {
    font-weight: 700;
}

.permission-groups label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.permission-groups > div > div {
    margin-top: 1rem;
}

.permission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.warning {
    color: #9b2c2c;
    font-weight: 600;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    max-width: 42rem;
}

.home-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    max-width: 42rem;
    margin-top: 1.75rem;
}

.home-module {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.home-module__title {
    font-weight: 700;
    text-decoration: none;
}

.home-module__summary,
.home-module__links {
    margin: 0;
    color: #52606d;
}

.home-module__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
}

.settings-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
    text-decoration: none;
}

.settings-card span {
    color: #52606d;
}

.settings-section {
    margin-top: 2rem;
}

.settings-section--first {
    margin-top: 0;
}

.settings-form {
    max-width: 40rem;
}

.settings-form__section {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.settings-form__section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.settings-form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.settings-form .form-field {
    margin-bottom: 0;
}

.settings-secret-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    color: #52606d;
}

.settings-secret-status__dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: #bcccdc;
    flex-shrink: 0;
}

.settings-secret-status__dot.is-ready {
    background: #2f855a;
}

.settings-secret-note {
    margin: 0 0 0.75rem;
    color: #52606d;
    font-size: 0.875rem;
}

.export-settings {
    max-width: 56rem;
}

.export-settings__hint {
    margin: 0.75rem 0 0;
    color: #52606d;
    font-size: 0.875rem;
}

.export-settings__export {
    margin-left: auto;
}

.export-presets {
    margin-top: 2rem;
}

.export-presets h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.export-presets .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.export-presets .table-actions form {
    display: inline;
    margin: 0;
}

.export-presets__save {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 1rem;
}

.export-presets__save input {
    flex: 1 1 16rem;
    min-width: 12rem;
    max-width: 24rem;
    height: 2.25rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    font: inherit;
}

.import-help,
.import-report__summary {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    color: #52606d;
}

.import-report {
    margin-top: 2rem;
}

.import-report h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.import-or {
    margin: 0.35rem 0 0.85rem;
    color: #52606d;
    font-weight: 600;
}

.import-help-inline {
    margin: 0.35rem 0 0;
    color: #52606d;
    font-size: 0.9rem;
}

.import-detailed {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.import-detailed input {
    width: auto;
}

.import-preset-url {
    width: 3rem;
    white-space: nowrap;
}

.import-preset-sa {
    width: 4.5rem;
    white-space: nowrap;
    text-align: center;
}

.import-preset-checks {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.import-preset-check {
    display: block;
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    color: #bcccdc;
}

.import-preset-check.is-ready {
    color: #2f855a;
}

.import-batch {
    margin-top: 2rem;
}

.import-batch h2,
.import-fields-dialog h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.import-batch-meta {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    color: #52606d;
}

.import-fields-dialog {
    width: min(48rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 1.25rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.35rem;
    overflow: hidden;
}

.import-fields-dialog[open] {
    display: flex;
    flex-direction: column;
}

.import-fields-dialog .table-wrapper {
    overflow: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.import-fields-dialog th,
.import-fields-dialog td {
    white-space: normal;
    vertical-align: top;
}

.import-fields-dialog td:first-child,
.import-fields-dialog th:first-child {
    white-space: nowrap;
    width: 1%;
}

.import-field-name {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.import-field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: 1px solid #9fb3c8;
    border-radius: 999px;
    background: #eef2f6;
    color: #334e68;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.import-field-help:hover,
.import-field-help:focus {
    border-color: #486581;
    background: #ffffff;
    outline: none;
}

.import-field-help__tip {
    position: absolute;
    z-index: 3;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 22rem;
    max-width: min(22rem, calc(100vw - 4rem));
    padding: 0.65rem 0.75rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.35rem;
    background: #ffffff;
    box-shadow: 0 0.35rem 0.9rem rgba(27, 43, 61, 0.16);
    color: #334e68;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.import-field-name:hover .import-field-help__tip,
.import-field-name:focus-within .import-field-help__tip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.import-fields-dialog .form-actions {
    flex-shrink: 0;
    margin-top: 0.75rem;
}

.import-fields-dialog::backdrop {
    background: rgba(27, 43, 61, 0.45);
}

.export-shuttle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.75rem 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.export-shuttle--editable {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.export-shuttle__pane h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.export-shuttle__select {
    display: block;
    width: 100%;
    height: 18rem;
    padding: 0;
    border: 1px solid #9fb3c8;
    border-radius: 0.2rem;
    background: #eceff1;
    font-family: inherit;
    font-size: 0.875rem;
}

.export-shuttle__select--available {
    background: #ffffff;
}

.export-shuttle__transfer,
.export-shuttle__order {
    display: flex;
    gap: 0.4rem;
}

.export-shuttle__transfer {
    flex-direction: column;
    align-self: center;
    padding-top: 1.5rem;
}

.export-shuttle__order {
    margin-top: 0.5rem;
}

.export-shuttle__icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    background: #ffffff;
    color: #52606d;
    cursor: pointer;
}

.export-shuttle__icon:hover {
    background: #eef2f6;
}

.export-shuttle__icon:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 56rem) {
    .export-shuttle,
    .export-shuttle--editable {
        grid-template-columns: 1fr;
    }

    .export-shuttle__transfer {
        flex-direction: row;
        justify-content: center;
        padding-top: 0;
    }
}

.form-field {
    margin-bottom: 1rem;
}

.form-field > label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    font: inherit;
}

.form-field input[type="checkbox"] {
    width: auto;
}

.form-field textarea {
    min-height: 7rem;
    resize: vertical;
}

.shop-form {
    max-width: 72rem;
}

.shop-form__section {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.shop-form__section h2,
.shop-form__section-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.shop-form__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.shop-form__section > h2 {
    margin-bottom: 0.75rem;
}

.shop-form .form-field {
    margin-bottom: 0;
}

.shop-form .form-field > label {
    margin-bottom: 0.2rem;
    font-size: 0.875rem;
}

.shop-form .form-field input:not([type="checkbox"]),
.shop-form .form-field select {
    height: 2.25rem;
    padding: 0.35rem 0.55rem;
}

.shop-form__copy-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-form .shop-form__copy-field input:not([type="checkbox"]) {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.shop-form__copy-field .copy-payment {
    flex: 0 0 auto;
}

.shop-form__grid,
.shop-form__address {
    display: grid;
    gap: 0.75rem;
}

.shop-form__row {
    display: grid;
    gap: 0.75rem;
}

.shop-form__row--identity {
    grid-template-columns: minmax(7.5rem, 9.5rem) minmax(10rem, 13rem) minmax(12rem, 1fr);
}

.shop-form__row--create {
    grid-template-columns: minmax(10rem, 13rem) minmax(12rem, 1fr);
}

.shop-form__row--details {
    grid-template-columns: minmax(7.5rem, 9.5rem) minmax(10rem, 13rem) minmax(12rem, 1fr);
}

.shop-form__row--payment {
    grid-template-columns: 1fr;
}

.shop-form__row--urls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-form__row--full {
    grid-template-columns: 1fr;
}

.shop-form__row--geo {
    grid-template-columns: minmax(8rem, 0.85fr) minmax(10rem, 1.1fr) minmax(10rem, 1.1fr);
}

.shop-form__row--coords {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-form__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.shop-form__actions .button--danger {
    margin-right: auto;
}

.shop-form .helptext {
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: normal;
}

.shop-confirm-delete__target {
    margin: 0.35rem 0;
}

.shop-confirm-delete__actions {
    margin-top: 1rem;
}

.shop-form__save {
    background: #145ea8;
    border-color: #145ea8;
    color: #ffffff;
}

.shop-form__save:hover {
    background: #0f4d8a;
    color: #ffffff;
}

.shop-form .phone-section .shop-form__section-header {
    margin-bottom: 0.75rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 0.9rem;
    margin-top: 1.25rem;
}

.pagination__nav,
.pagination__jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.pagination__info {
    white-space: nowrap;
}

.pagination__disabled {
    color: #7b8794;
    cursor: not-allowed;
}

.pagination__jump-label {
    font-weight: 600;
}

.pagination__input {
    width: 7ch;
    min-width: 5ch;
    padding: 0.25rem 0.4rem;
    border: 1px solid #9fb3c8;
    border-radius: 0.25rem;
    font: inherit;
}

.shop-info-photo {
    display: block;
    max-width: min(100%, 240px);
    height: auto;
    margin-top: 0.35rem;
}

.shop-info-screenshot {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 0.35rem;
}

.place-media {
    margin-top: 0.7rem;
    min-width: 0;
}

.place-media__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1rem;
    overflow-x: auto;
}

.place-media__item {
    flex: 0 0 auto;
    margin: 0.35rem 0 0;
}

.place-media .shop-info-photo,
.place-media .shop-info-screenshot {
    height: 100px;
    width: auto;
    max-width: none;
    margin-top: 0;
    object-fit: contain;
}

.place-media__caption {
    margin-top: 0.25rem;
}

.shop-info-snapshot pre,
.place-card pre {
    max-width: 100%;
    max-height: 18rem;
    margin: 0.35rem 0;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.phone-reorder-form {
    display: none;
}

.phone-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.phone-list__empty {
    margin: 0;
    color: #52606d;
}

.phone-row {
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(5.5rem, 8rem) minmax(8rem, 1fr) auto;
    gap: 0.65rem 0.85rem;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #f8fafc;
}

.phone-row--sortable {
    grid-template-columns: 1.5rem minmax(9rem, 13rem) minmax(5.5rem, 8rem) minmax(8rem, 1fr) auto;
    cursor: grab;
}

.phone-row__handle {
    width: 1.25rem;
    color: #7b8794;
    text-align: center;
    user-select: none;
}

.phone-number-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.phone-row__number {
    font-weight: 700;
}

.phone-row__type {
    color: #52606d;
    white-space: nowrap;
}

.phone-row__note {
    color: #52606d;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-row__actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.75rem;
    white-space: nowrap;
}

.phone-row--dragging {
    opacity: 0.55;
    border-color: #9fb3c8;
    background: #eef2f6;
}

.phone-list--saving {
    opacity: 0.7;
}

.phone-reorder-status {
    min-height: 1.25rem;
    margin: 0.45rem 0 0;
    color: #52606d;
}

@media (max-width: 56rem) {
    .shop-form__row--identity,
    .shop-form__row--create,
    .shop-form__row--details,
    .shop-form__row--payment,
    .shop-form__row--urls,
    .shop-form__row--geo,
    .settings-form__row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 40rem) {
    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .shop-search__query {
        flex: 1 1 100%;
    }

    .shop-form__row--coords {
        grid-template-columns: 1fr;
    }

    .shop-form__actions {
        justify-content: stretch;
    }

    .shop-form__actions .button,
    .shop-form__save {
        flex: 1 1 auto;
        text-align: center;
    }

    .shop-form__actions .button--danger {
        margin-right: 0;
    }

    .phone-row {
        grid-template-columns: 1fr;
    }

    .phone-row--sortable {
        grid-template-columns: 1.5rem 1fr;
    }

    .phone-row__type,
    .phone-row__note,
    .phone-row__actions {
        grid-column: 1 / -1;
    }

    .phone-row__note {
        white-space: normal;
    }

    .phone-row__actions {
        justify-content: flex-start;
    }
}

.place-card {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.place-card h1,
.place-card p {
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}

.place-card h1 {
    margin-top: 0;
}

.place-module {
    container: place-module / inline-size;
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 1.15rem 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d9e2ec;
    border-radius: 0.25rem;
    background: #ffffff;
}

.place-module h2 {
    margin: 0 0 0.45rem;
}

.place-module h3 {
    margin: 0.7rem 0 0.15rem;
    font-size: 1rem;
}

.place-fields {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 0.65rem;
    row-gap: 0.12rem;
    align-items: baseline;
    margin: 0.15rem 0 0.4rem;
}

.place-fields dt,
.place-fields dd {
    margin: 0;
    min-width: 0;
}

.place-fields dt {
    color: #52606d;
    font-weight: 600;
}

.place-fields dd {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
}

.place-fields__text {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.place-lines {
    margin: 0.15rem 0 0.4rem;
    padding-left: 1.1rem;
}

.place-lines li {
    margin: 0.08rem 0;
}

.place-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0.55rem 0;
    min-width: 0;
}

.place-actions form {
    margin: 0;
    max-width: 100%;
}

.place-actions button,
.place-copy {
    max-width: 100%;
}

.place-copy {
    flex: 0 0 auto;
}

.place-copy__status:empty {
    display: none;
}

.place-copy__status {
    color: #334e68;
    font-size: 0.85rem;
}

.place-priority {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.35rem 0;
    max-width: 100%;
}

.place-priority input[type="number"] {
    width: 5.5rem;
    max-width: 100%;
}

.place-tech {
    margin-top: 0.7rem;
    min-width: 0;
}

.place-tech__body,
.place-json {
    min-width: 0;
    margin-top: 0.35rem;
}

.place-card a:focus,
.place-card button:focus,
.place-card summary:focus,
.place-card input:focus {
    outline: 2px solid #145ea8;
    outline-offset: 2px;
}

.place-back {
    margin-top: 0.8rem;
}

@container place-module (max-width: 26rem) {
    .place-fields {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0;
    }

    .place-fields dd {
        margin-bottom: 0.35rem;
    }
}
