:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #d9e0e8;
    --text: #1d2733;
    --muted: #5d6b7a;
    --primary: #2457c5;
    --primary-text: #ffffff;
    --primary-soft: #e3ebfb;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --success: #1f7a3f;
    --success-soft: #e6f4ea;
    --warning: #8a5a00;
    --warning-soft: #fff4dc;
    --status-available: #1f7a3f;
    --status-pending: #a76300;
    --status-booked: #b42318;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #12161c;
        --surface: #1a2029;
        --surface-2: #232b36;
        --border: #313b48;
        --text: #e6ebf1;
        --muted: #9aa7b6;
        --primary: #6f9bff;
        --primary-text: #0d1320;
        --primary-soft: #1f2d4a;
        --danger: #ff8a7a;
        --danger-soft: #3a1f1c;
        --success: #6fd394;
        --success-soft: #173323;
        --warning: #f3c063;
        --warning-soft: #3a2e12;
        --status-available: #6fd394;
        --status-pending: #f3c063;
        --status-booked: #ff8a7a;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h2:not(:first-child) { margin-top: 1.5rem; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; margin: 0; }

/* ---- Zaglavlje ---- */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: .6rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1.5rem;
}

.brand {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
}
.brand span { color: var(--primary); }

.site-context {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.site-label { color: var(--muted); font-size: .9rem; }
.site-switch { display: flex; gap: .4rem; }
.site-switch select { max-width: 280px; }

.topbar-right {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.topbar-right form { margin: 0; }
.user { font-weight: 600; }
a.user { color: inherit; text-decoration: none; }
a.user:hover, a.user:focus-visible { text-decoration: underline; }
.flag { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); flex: none; object-fit: cover; }

.lang-menu { position: relative; }
.lang-menu summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    list-style: none;
    user-select: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; color: var(--muted); font-size: .8rem; }
.lang-menu ul {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 4px);
    z-index: 20;
    min-width: 190px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    padding: .3rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .15);
}
.lang-menu a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .55rem;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--surface-2); }
.lang-menu a[aria-current="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
}
.nav-link {
    padding: .55rem .8rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.nav-sep { width: 1px; background: var(--border); margin: .5rem .5rem; }

/* ---- Sadržaj ---- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}
.panel.narrow { max-width: 720px; }

.master-detail {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 3fr;
    gap: 1rem;
    align-items: start;
}
.detail { min-width: 0; }

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 2.5rem 1rem;
}

.item-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}
.item-list a {
    display: block;
    padding: .5rem .6rem;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
}
.item-list a:hover { background: var(--surface-2); }
.item-list a.active { background: var(--primary-soft); color: var(--primary); }
.item-list small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Forme ---- */
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field > span { font-size: .8rem; color: var(--muted); font-weight: 600; }

input, select, textarea {
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .45rem .6rem;
    width: 100%;
    min-width: 0;
}
input[type="checkbox"] { width: auto; }
input[type="file"] { padding: .3rem; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.stack { display: flex; flex-direction: column; gap: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.add-form { display: flex; flex-direction: column; gap: .6rem; border-top: 1px solid var(--border); padding-top: 1rem; }

.row-form {
    display: flex;
    gap: .75rem;
    align-items: flex-end;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}
.row-form .field { flex: 1 1 160px; }
.row-form .field.grow { flex: 3 1 280px; }
.row-form > .grow { flex: 1 1 auto; min-width: 0; }
.row-form-new { border-bottom: 0; background: var(--surface-2); padding: .75rem; border-radius: var(--radius); margin-top: .75rem; }

.user-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: .75rem;
    align-items: end;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
}
.user-form.row-form-new { padding: .9rem; }
.check { display: flex; align-items: center; gap: .4rem; padding-bottom: .5rem; }
/* Opsezi agent ključa (issue #48). */
.scopes { border: 0; padding: 0; margin: 0; }
.scopes legend { font-weight: 600; margin-bottom: .4rem; }
.scopes .check { align-items: flex-start; }

.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.btn {
    font: inherit;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    padding: .45rem .9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { padding: .25rem .6rem; font-size: .85rem; }

.badge {
    font-size: .8rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    padding: .15rem .6rem;
}

/* ---- Poruke ---- */
.alert {
    border-radius: var(--radius);
    padding: .7rem .9rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }

/* ---- Jezik sadržaja (issue #21) ---- */
.content-language {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.content-language.is-translation { border-color: var(--warning); background: var(--warning-soft); }
.content-language-form { display: flex; gap: .5rem; align-items: flex-end; }
.content-language-form select { min-width: 14rem; }
.content-language-note { flex: 1 1 320px; color: var(--warning); }
.content-language-note p { margin: 0; }
.content-language-note p + p { margin-top: .25rem; }
.default-value { display: block; font-size: .8rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.default-value::before { content: attr(data-label) ": "; font-weight: 600; }
.readonly-code { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; padding: .45rem 0; }
.untranslated { color: var(--warning); font-size: .8rem; font-weight: 600; }
.language-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.language-row:last-of-type { border-bottom: 0; }
.language-row .language-name { flex: 1 1 200px; font-weight: 600; }
.language-row .language-stats { flex: 2 1 240px; color: var(--muted); font-size: .9rem; }

/* ---- Javna početna stranica (issue #28) ---- */
.landing-hero { text-align: center; padding: 3rem 1rem 2rem; max-width: 820px; margin: 0 auto; }
.landing-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 1rem; }
.landing-lead { font-size: 1.15rem; color: var(--muted); margin: 0 auto 1.5rem; }
.landing-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-bottom: .75rem; }
.btn-large { padding: .7rem 1.4rem; font-size: 1.05rem; }
.landing-section { margin: 2.5rem auto; max-width: 1100px; }
.landing-section > h2 { text-align: center; font-size: 1.4rem; margin-bottom: 1.25rem; }
.landing-section h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.landing-section p { margin: 0; }
.landing-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.landing-step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; margin-bottom: .6rem;
    background: var(--primary); color: var(--primary-text); font-weight: 700;
}
/* Nine feature cards and three "safe with an AI agent" cards: three columns on wide screens (plan #63, phase 13). */
.landing-features, .landing-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.landing-intro { text-align: center; max-width: 720px; margin: -.5rem auto 1.25rem !important; color: var(--muted); }
.landing-safe { background: var(--primary-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem 1.25rem; }
.landing-features .panel, .landing-cards .panel { margin: 0; }
.landing-open { max-width: 820px; text-align: center; }
.landing-open p + p { margin-top: .75rem; }
@media (max-width: 900px) {
    .landing-features, .landing-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .landing-features, .landing-cards { grid-template-columns: 1fr; }
    .landing-safe { padding: 1.25rem .75rem; }
}
.landing-audience { max-width: 820px; text-align: center; }
.landing-audience p + p { margin-top: .75rem; }
.landing-final { text-align: center; }
.landing-final p { margin-bottom: 1.25rem; color: var(--muted); }

/* ---- Registracija (issue #28) ---- */
.register-card { max-width: 560px; }
.form-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.form-row > .field { flex: 1 1 180px; }
.language-choice { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .75rem .75rem; margin: 0; }
.language-choice legend { font-size: .8rem; color: var(--muted); font-weight: 600; padding: 0 .25rem; }
.language-choice[aria-invalid="true"], [aria-invalid="true"] { border-color: var(--danger); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .25rem .75rem; margin-top: .5rem; }
.checkbox { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Login i poruke ---- */
.login-card, .message-card {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
}
.message-card { max-width: 520px; }

/* ---- Galerije ---- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}
.photo-card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem;
    background: var(--surface);
}
.photo-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-order { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.photo-order .btn:disabled { opacity: .35; cursor: default; }
.photo-position { font-size: .85rem; color: var(--muted); }
.photo-name { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.preview-strip { display: flex; gap: .5rem; flex-wrap: wrap; }
.preview-strip img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ---- Objekti / zauzetost ---- */
.reservation-list { display: flex; flex-direction: column; }
.past-dates { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.past-dates form { margin: 0; }
.reservation-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .4rem .5rem;
    border-bottom: 1px solid var(--border);
    border-inline-start: 4px solid var(--border);
}
.reservation-row select { width: auto; min-width: 190px; }
.reservation-row .btn-danger { margin-inline-start: auto; }
.reservation-row.status-available { border-inline-start-color: var(--status-available); }
.reservation-row.status-pending { border-inline-start-color: var(--status-pending); }
.reservation-row.status-booked { border-inline-start-color: var(--status-booked); }
.reservation-row.past { opacity: .6; }
.reservation-date { min-width: 150px; font-variant-numeric: tabular-nums; }
.weekday { display: inline-block; width: 2.6rem; color: var(--muted); text-transform: capitalize; }

.key-result { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.key-result textarea { word-break: break-all; }

/* ---- Povijest promjena (issue #47) ---- */
.history-filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.history-filter .field { min-width: 10rem; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item { border-top: 1px solid var(--border); padding: .6rem 0; }
.history-head { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }
.history-head time { color: var(--muted); font-size: .9rem; min-width: 9rem; }
.history-head form { margin-inline-start: auto; }
.history-author { color: var(--muted); }
.history-delete .badge { background: var(--danger-soft); color: var(--danger); }
.badge-agent { margin-inline-start: .25rem; }
.history-changes { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: .5rem 0 0; }
.history-changes dt { color: var(--muted); }
.history-changes dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.history-changes del { color: var(--danger); }
.history-changes ins { text-decoration: none; font-weight: 600; }
.undo-ok { margin-inline-start: auto; color: var(--success); }
.undo-stays { margin-inline-start: auto; color: var(--warning); }
.agent-activity ul { margin: .25rem 0 0; padding-inline-start: 1.25rem; }
.agent-activity a { margin-inline-start: .5rem; }

/* ---- Mobitel / tablet ---- */
@media (max-width: 860px) {
    .master-detail { grid-template-columns: 1fr; }
    .topbar-right { margin-inline-start: 0; }
}

@media (max-width: 600px) {
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .row-form { flex-direction: column; align-items: stretch; }
    .row-form .field, .row-form .field.grow { flex: 1 1 auto; }
    .reservation-row { flex-wrap: wrap; }
    .reservation-row select { min-width: 0; flex: 1; }
    .site-switch select { max-width: 100%; }
}

/* ---- Lists with many items and page texts (plan #63, 6.1 and 6.2) ---- */
.item-panel { position: sticky; top: 1rem; }
.item-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.item-panel-head h2 { margin: 0; }
.add-toggle > summary { list-style: none; display: inline-block; }
.add-toggle > summary::-webkit-details-marker { display: none; }
.add-toggle[open] { flex-basis: 100%; }
.add-toggle[open] > summary { background: var(--surface-2); }
.add-toggle-body .add-form { border-top: 0; padding-top: .6rem; }
.item-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .6rem; }
.item-filter input[type="search"] { flex: 1 1 12rem; }
.item-filter .check { padding-bottom: 0; }
.item-count { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-panel .item-list { max-height: min(65vh, 40rem); overflow-y: auto; overscroll-behavior: contain; margin-bottom: .5rem; }
.item-expand { display: none; margin-bottom: .5rem; }

.text-table { width: 100%; border-collapse: collapse; }
.text-table th { text-align: start; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .4rem .5rem; border-bottom: 1px solid var(--border); }
.text-table td { padding: .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.text-row { position: relative; }
.text-row:hover { background: var(--surface-2); }
.text-row.open { background: var(--primary-soft); }
.text-code { white-space: nowrap; width: 1%; }
.text-code a { color: inherit; text-decoration: none; }
/* The whole row opens the form (stretched link). */
.text-code a::after { content: ""; position: absolute; inset: 0; }
.text-code a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.text-content > span {
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; overflow-wrap: anywhere; white-space: pre-line;
}
.text-languages { white-space: nowrap; color: var(--muted); font-size: .9rem; width: 1%; }
.text-edit-row > td { padding: 0 0 .75rem; }
.text-edit { background: var(--surface-2); border-radius: var(--radius); padding: .9rem; border: 1px solid var(--border); }
.text-edit-new { margin-bottom: 1rem; }
.text-form h3 { margin: 0; font-size: 1rem; }

@media (max-width: 860px) {
    .item-panel { position: static; }
    .item-panel .item-list { max-height: 50vh; }
    /* Collapsed list on phones: only the selected entry and a button for the whole list. */
    .js .item-panel.has-selection:not(.expanded) .item-list li:not(.selected),
    .js .item-panel.has-selection:not(.expanded) .item-filter,
    .js .item-panel.has-selection:not(.expanded) [data-filter-none] { display: none; }
    .js .item-panel.has-selection:not(.expanded) .item-expand { display: inline-block; }
}

@media (max-width: 600px) {
    /* Page texts as cards. */
    .text-table thead { display: none; }
    .text-table, .text-table tbody, .text-table tr, .text-table td { display: block; width: auto; }
    .text-row { border-bottom: 1px solid var(--border); padding: .4rem 0; }
    .text-table td { border-bottom: 0; padding: .15rem .5rem; }
    .text-languages { white-space: normal; }
}

/* ---- Catalogs (plan #63, phase 4) ---- */
.catalog-items { list-style: none; margin: 0; padding: 0; }
.catalog-item {
    display: grid; grid-template-columns: auto 56px minmax(0, 1fr) auto auto; gap: .6rem; align-items: center;
    padding: .45rem .3rem; border-bottom: 1px solid var(--border); background: var(--surface);
}
.catalog-item.unpublished { opacity: .7; }
.catalog-item.dragging { opacity: .5; outline: 2px dashed var(--primary); }
.drag-handle { cursor: grab; color: var(--muted); user-select: none; padding: 0 .2rem; }
.catalog-cover { width: 56px; height: 42px; border-radius: 4px; background: var(--surface-2); overflow: hidden; display: block; }
.catalog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-item-link { color: var(--text); text-decoration: none; min-width: 0; }
.catalog-item-link:hover strong { text-decoration: underline; }
.catalog-item-link strong, .catalog-item-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item-link small { color: var(--muted); }
.catalog-flags { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.badge-featured { background: var(--warning-soft); color: var(--warning); }
.badge-hidden { background: var(--surface-2); color: var(--muted); }
.catalog-move { display: flex; gap: .25rem; margin: 0; }
.language-block { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.language-block legend { font-weight: 600; padding: 0 .3rem; }
.catalog-fields { border: 0; padding: 0; margin: 0; }
.catalog-fields legend { font-weight: 600; margin-bottom: .3rem; }
.catalog-field-row { display: grid; grid-template-columns: 1fr 1.2fr 8rem 1.5fr auto; gap: .5rem; align-items: end; padding: .35rem 0; }
.catalog-field-row .field > span { display: none; }
.catalog-field-head { font-size: .8rem; color: var(--muted); font-weight: 600; padding-bottom: 0; }
.catalog-field-row.new input { border-style: dashed; }
.catalog-checks { justify-content: flex-end; gap: .2rem; }

@media (max-width: 600px) {
    .catalog-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .catalog-item .drag-handle { display: none; }
    .catalog-flags { grid-column: 2; justify-content: flex-start; }
    .catalog-move { grid-column: 3; grid-row: 1; }
    .catalog-field-head { display: none; }
    .catalog-field-row { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
    .catalog-field-row .field > span { display: block; }
}

/* Hosting (#93): address field with the domain after it */
.input-suffix { display: flex; align-items: center; gap: .4rem; }
.input-suffix input { flex: 1; min-width: 0; }
