/* ══════════════════════════════════════════════════════════════
   HomeLab Documentation view
   ══════════════════════════════════════════════════════════════ */

/* ── Top-bar view switcher ─────────────────────────────────── */

.view-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--hover);
}
.view-tab {
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-mute);
    padding: 4px 12px;
}
.view-tab:hover { background: var(--hover); }
.view-tab.active {
    background: var(--primary-bg);
    color: #fff;
}
.view-tab.active:hover { background: var(--primary-bg); }

/* Groups of top-bar controls that show/hide per view.
   display:contents lets the buttons stay direct flex children of #topbar. */
.topbar-group { display: contents; }

.btn-hl-add {
    background: var(--primary-bg);
    color: #fff;
    border-color: var(--primary-bg);
    font-weight: 600;
}
.btn-hl-add:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }

/* ── View container & board ────────────────────────────────── */

#homelab-view {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#hl-main {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* ── Host tabs (one board per device) ───────────────────────── */

#hl-tabs {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 10px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
}
.hl-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-family: system-ui, sans-serif;
    font-size: 12.5px;
    color: var(--ink-mute);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.hl-tab:hover { background: var(--hover); color: var(--ink); }
.hl-tab-active {
    color: var(--ink);
    font-weight: 600;
    background: var(--surface-2);
    border-color: var(--line);
    margin-bottom: -1px;          /* sit on top of the bar's bottom border */
}
.hl-tab-count {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ink-faint);
    background: var(--hover);
    border-radius: 9px;
    padding: 1px 7px;
}
.hl-tab-active .hl-tab-count { background: var(--line); color: var(--ink-mute); }

.hl-tab-remove {
    margin-left: 1px;
    font-size: 14px;
    line-height: 1;
    color: var(--ink-faint);
    border-radius: 3px;
    padding: 0 3px;
}
.hl-tab-remove:hover { color: #c62828; background: #fdecea; }

/* "Hosts" home tab — returns to the host-picker list */
.hl-tab-home { color: #1a73e8; margin-right: 4px; }
.hl-tab-home:hover { background: #eaf1fe; color: #1558b0; }
.hl-tab-home.hl-tab-active { color: var(--ink); }

#homelab-board {
    flex: 1;
    position: relative;
    overflow: auto;
    background-color: var(--surface-2);
    background-image: radial-gradient(var(--line-soft) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: -1px -1px;
}

/* ── Host-picker landing (pick a host to document) ──────────── */

/* While picking, the board flows normally and the palette is irrelevant. */
#homelab-board.hl-board-list { overflow: auto; }
.hl-picking #hl-sidebar { display: none; }

.hl-host-list {
    max-width: 880px;
    margin: 0 auto;
    padding: 34px 24px 56px;
}

.hl-host-list-head { margin-bottom: 22px; }
.hl-host-list-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}
.hl-host-list-head p {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--ink-mute);
}
.hl-host-list-empty {
    font-size: 13px;
    color: var(--ink-faint);
    line-height: 1.5;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px 20px;
    max-width: 460px;
}

.hl-host-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.hl-host-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    font-family: system-ui, sans-serif;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px 16px;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.hl-host-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
}
.hl-host-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.hl-host-card-meta {
    font-size: 11.5px;
    color: var(--ink-faint);
}

/* ── Sidebar (group palette) ────────────────────────────────── */

#hl-sidebar {
    width: 130px;
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    z-index: 2;
}
.hl-sidebar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: 0 4px 2px;
}
.hl-sidebar-item {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: var(--surface-2);
    transition: border-color .12s, background .12s, box-shadow .12s;
    user-select: none;
    -webkit-user-select: none;
}
.hl-sidebar-item:hover {
    border-color: #aac5e8;
    background: #f0f6ff;
    box-shadow: 0 2px 8px rgba(47, 111, 179, 0.10);
}
.hl-sidebar-item > span {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-mute);
}
.hl-sidebar-preview {
    width: 84px;
    padding: 7px 6px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 1px 4px rgba(20,24,32,0.07);
}
.hlsp-title {
    height: 8px;
    background: var(--line);
    border-radius: 3px;
}
.hlsp-slot {
    height: 18px;
    background: var(--hover);
    border-radius: 5px;
    border: 1px solid var(--line);
}
.hlsp-slots-row {
    display: flex;
    gap: 4px;
}
.hlsp-slots-row .hlsp-slot { flex: 1; }

/* Service palette item preview */
.hl-sidebar-preview-svc {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px;
}
.hlsp-svc-logo {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--line);
    flex-shrink: 0;
}
.hlsp-svc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hlsp-svc-name {
    height: 7px;
    background: var(--line);
    border-radius: 3px;
    width: 80%;
}
.hlsp-svc-url {
    height: 5px;
    background: var(--line-soft);
    border-radius: 3px;
    width: 60%;
}

/* Drag ghost that follows the cursor during sidebar drags */
.hl-drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    padding: 7px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: 10px;
    font-family: system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-mute);
    box-shadow: 0 4px 16px rgba(20, 24, 32, 0.18);
    opacity: 0.95;
    white-space: nowrap;
    transition: border-color .1s;
}
.hl-drag-ghost--active {
    border-color: #2f6fb3;
    color: #2f6fb3;
}

/* Group highlighted as a drop target */
.hl-group-drop-target {
    border-color: #2f6fb3 !important;
    box-shadow: 0 0 0 3px rgba(47, 111, 179, 0.20),
                0 4px 24px rgba(20, 24, 32, 0.09) !important;
}

/* Reorder insert indicator — blue line shown between slots during drag */
.hl-insert-indicator {
    flex-shrink: 0;
    border-radius: 99px;
    background: #2f6fb3;
    pointer-events: none;
    animation: hl-indicator-pop .12s ease;
}
@keyframes hl-indicator-pop {
    from { opacity: 0; transform: scaleX(0.6) scaleY(0.6); }
    to   { opacity: 1; transform: scaleX(1) scaleY(1); }
}
.hl-group-col > .hl-group-slots > .hl-insert-indicator {
    height: 3px;
    width: auto;
    align-self: stretch;
    margin: 1px 0;
}
.hl-group-row > .hl-group-slots > .hl-insert-indicator {
    width: 3px;
    height: auto;
    align-self: stretch;
    margin: 0 1px;
}

/* ── Persistent drop zone inside every group ─────────────────── */

.hl-drop-zone {
    width: 220px;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 38px;
    border: 1.5px dashed var(--line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, sans-serif;
    font-size: 11px;
    color: var(--ink-faint);
    user-select: none;
    pointer-events: none;
    transition: min-height .15s, border-color .15s, background .15s, color .15s, opacity .15s;
    opacity: 0;
}
.hl-group-col > .hl-group-slots > .hl-drop-zone { width: auto; }

/* Show drop zone more prominently when a drag is globally active */
body.hl-dragging .hl-drop-zone {
    opacity: 1;
    min-height: 48px;
    pointer-events: auto;
}

/* This specific group is a valid drop target */
.hl-group-drop-target .hl-drop-zone {
    border-color: #2f6fb3;
    background: #eef5ff;
    color: #2f6fb3;
    min-height: 56px;
}

/* Slot card being dragged — dim it in-place */
.hl-slot-card--dragging {
    opacity: 0.25;
    pointer-events: none;
}

/* Nested group — inline within parent's slots, not absolutely positioned */
.hl-group-nested {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    flex-shrink: 0;
    box-shadow: 0 1px 6px rgba(20, 24, 32, 0.06) !important;
    background: var(--surface-2) !important;
    border-color: var(--line) !important;
    padding: 10px;
    margin: 0;
}
.hl-group-nested .hl-group-handle { cursor: default; }

/* ── Group boxes on board ───────────────────────────────────── */

.hl-group-box {
    position: absolute;
    box-sizing: border-box;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(20, 24, 32, 0.09), 0 1px 4px rgba(20, 24, 32, 0.05);
    padding: 12px;
    z-index: 0;
    display: inline-flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    min-width: 244px;
}

.hl-group-handle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    /* cursor set by parent .hl-group-box; nested groups override below */
}

/* Dedicated grab grip — the reliable drag surface (esp. for nested groups, whose
   handle is otherwise entirely the title input). */
.hl-group-grip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 22px;
    color: var(--ink-faint);
    cursor: grab;
    touch-action: none;
}
.hl-group-grip:active { cursor: grabbing; }
.hl-group-box:hover .hl-group-grip { color: var(--ink-faint); }

/* Top-level group box is draggable from anywhere except interactive children */
.hl-group-box:not(.hl-group-nested) {
    cursor: grab;
}
.hl-group-box:not(.hl-group-nested):active {
    cursor: grabbing;
}
/* A group being dragged must paint above the other groups (which all sit at
   z-index:0 and would otherwise stack by DOM order). */
.hl-group-box.hl-group-dragging {
    z-index: 100;
    cursor: grabbing;
}
/* Interactive children restore their own cursors */
.hl-group-box .hl-slot-card { cursor: grab; }
.hl-group-box button         { cursor: pointer; }
.hl-group-box input          { cursor: text; }
.hl-group-box a              { cursor: pointer; }

/* Nested group handle is the grab point for reordering */
.hl-group-nested .hl-group-handle { cursor: grab; }
.hl-group-nested .hl-group-handle:active { cursor: grabbing; }

.hl-group-title-input {
    flex: 1;
    min-width: 0;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: 5px 10px;
    background: var(--surface-2);
    outline: none;
    transition: border-color .12s, background .12s;
}
.hl-group-title-input:focus { border-color: #aac5e8; background: var(--surface); }

.hl-group-del-btn {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-faint);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .12s, background .12s, color .12s;
}
.hl-group-box:hover .hl-group-del-btn { opacity: 1; }
.hl-group-del-btn:hover { background: #fff0f0; color: #c0392b; }

.hl-group-col > .hl-group-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hl-group-row > .hl-group-slots {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
}

/* Service card inside a group (inline, not absolutely positioned) */
.hl-slot-card {
    width: 220px;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
    padding: 12px 12px 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: background .12s, border-color .12s, box-shadow .12s;
}
.hl-slot-card:active { cursor: grabbing; }
.hl-group-col > .hl-group-slots > .hl-slot-card { width: auto; }
.hl-slot-card:hover { background: var(--hover); border-color: var(--line); box-shadow: 0 2px 8px rgba(20,24,32,.08); }

.hl-slot-remove-btn {
    position: absolute;
    top: 7px;
    right: 28px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--ink-faint);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .12s, color .12s, background .12s;
}
.hl-slot-card:hover .hl-slot-remove-btn { opacity: 1; }
.hl-slot-remove-btn:hover { color: #c0392b; background: #fff0f0; }

/* ── Service card ──────────────────────────────────────────── */

.hl-card {
    position: absolute;
    width: 220px;
    min-height: 96px;
    box-sizing: border-box;
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(20, 24, 32, 0.08);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: box-shadow 0.14s ease, transform 0.14s ease, border-color 0.14s ease;
}
.hl-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 6px 18px rgba(20, 24, 32, 0.14);
    transform: translateY(-2px);
}
.hl-card.dragging {
    cursor: grabbing;
    box-shadow: 0 10px 26px rgba(20, 24, 32, 0.22);
    transform: none;
    z-index: 10;
    opacity: 0.97;
}

/* Logo — top-left corner */
.hl-card-logo {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.hl-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
}
.hl-card-mono {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-faint);
    letter-spacing: 0.02em;
}

/* Body */
.hl-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.hl-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 16px; /* clear the status dot */
}
.hl-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hl-card-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--hover);
    color: var(--ink-mute);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.hl-card-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hl-card-url {
    font-size: 11px;
    color: #2f6fb3;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hl-card-url:hover { text-decoration: underline; }
.hl-card-host {
    font-size: 10px;
    color: var(--ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Edit affordance (appears on hover) */
.hl-card-edit {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink-mute);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.hl-card:hover .hl-card-edit,
.hl-slot-card:hover .hl-card-edit { opacity: 1; }
.hl-card-edit:hover { background: var(--hover); color: var(--ink); }

/* ── Empty state ───────────────────────────────────────────── */

.hl-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: var(--ink-mute);
    pointer-events: none; /* let clicks fall through to board, except the button */
}
.hl-empty-art {
    font-size: 46px;
    line-height: 1;
    color: var(--ink-faint);
    margin-bottom: 14px;
}
.hl-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.hl-empty p {
    font-size: 13px;
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 18px;
}
.hl-empty .btn-hl-add {
    pointer-events: auto;
    padding: 7px 16px;
    font-size: 13px;
}

/* ── Service modal extras ──────────────────────────────────── */

#modal-service {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
#modal-service .modal-box {
    max-width: 380px;
    border: 1px solid var(--line);
    border-radius: var(--float-radius);
    box-shadow: var(--float-shadow);
    padding: 22px 24px;
}

/* Rounded, soft-bordered fields to match the Libraries / Mermaid menus */
#modal-service .modal-row select,
#modal-service .modal-row input[type="text"] {
    border: 1px solid var(--line);
    border-radius: var(--ctrl-radius);
    background: var(--surface-2);
    padding: 7px 10px;
    transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
#modal-service .modal-row select:focus,
#modal-service .modal-row input:focus {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

#modal-service .modal-actions button {
    border: 1px solid var(--line);
    border-radius: var(--ctrl-radius);
    padding: 7px 16px;
}

#service-modal-ok {
    background: var(--primary-bg);
    color: #fff;
    border-color: var(--primary-bg);
}
#service-modal-ok:hover { background: var(--primary-bg-hover); border-color: var(--primary-bg-hover); }

.service-modal-top {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}

.hl-logo-preview-wrap {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}
.hl-logo-preview {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.hl-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    display: none;
}
#service-logo-fallback {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-faint);
}

/* Pencil overlay on the logo preview → opens the icon picker */
/* Pencil badge — top-right of logo preview wrapper */
.hl-logo-edit {
    position: absolute;
    right: -7px;
    top: -7px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-mute);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(20, 24, 32, 0.14);
    transition: background .12s ease, color .12s ease, border-color .12s ease;
    z-index: 1;
}
.hl-logo-edit svg { display: block; }
.hl-logo-edit:hover { background: #2f6fb3; border-color: #2f6fb3; color: #fff; }

/* Floating icon-picker overlay — sits above the modal */
.hl-icon-picker {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.hl-icon-picker.hidden { display: none; }
.hl-icon-pop {
    width: 340px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(20, 24, 32, 0.18), 0 2px 8px rgba(20, 24, 32, 0.08);
    padding: 14px;
    pointer-events: all;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#service-icon-search {
    width: 100%;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--surface-2);
    padding: 6px 10px;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
}
#service-icon-search:focus { border-color: #aac5e8; background: var(--surface); }
.hl-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}
.hl-icon-tile {
    aspect-ratio: 1;
    padding: 7px;
    border: none;
    border-radius: 10px;
    background: var(--hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(20, 24, 32, 0.07);
    transition: background .1s ease, box-shadow .1s ease, transform .1s ease;
}
.hl-icon-tile:hover {
    background: #e8f0fa;
    box-shadow: 0 3px 8px rgba(20, 24, 32, 0.12);
    transform: translateY(-1px);
}
.hl-icon-tile.selected {
    background: #ddeaf8;
    box-shadow: 0 0 0 2px #2f6fb3;
}
.hl-icon-tile img { width: 100%; height: 100%; object-fit: contain; }
.hl-icon-empty {
    grid-column: 1 / -1;
    color: var(--ink-faint);
    font-size: 12px;
    text-align: center;
    padding: 16px 0;
}

/* Selects inherit font/size/outline from the shared .modal-row rule; the
   rounded border, padding and background come from the #modal-service block above. */
#modal-service .modal-row select {
    font-family: system-ui, sans-serif;
    font-size: 13px;
    color: var(--ink);
    width: 100%;
}

.modal-actions-spacer { flex: 1; }

#modal-service .modal-actions .btn-delete-inline {
    color: #c62828;
    border-color: #e57373;
}
#modal-service .modal-actions .btn-delete-inline:hover { background: #ffebee; }
