/* ESC - Easy System Configuration
   Application Stylesheet */

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root,
[data-theme="light"] {
    --color-bg: #f5f6fa;
    --color-surface: #ffffff;
    --color-border: #e2e5ec;
    --color-text: #1e2330;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-primary: #4a6cf7;
    --color-primary-hover: #3b5de7;
    --color-primary-light: #eef2ff;
    --color-success: #10b981;
    --color-success-light: #ecfdf5;
    --color-success-text: #065f46;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-warning-text: #92400e;
    --color-danger: #ef4444;
    --color-danger-light: #fef2f2;
    --color-danger-text: #991b1b;
    --color-info: #3b82f6;
    --color-info-light: #eff6ff;
    --color-info-text: #1e40af;
    --sidebar-bg: #1e2330;
    --sidebar-text: rgba(255,255,255,0.65);
    --sidebar-text-hover: #ffffff;
    --sidebar-border: rgba(255,255,255,0.08);
    --sidebar-active-bg: rgba(255,255,255,0.1);

    --sidebar-width: 220px;
    --topbar-height: 52px;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --transition: 150ms ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --color-bg: #111318;
    --color-surface: #1a1d27;
    --color-border: #2d3040;
    --color-text: #e0e2e9;
    --color-text-secondary: #9498a8;
    --color-text-muted: #6b7084;
    --color-primary: #6b8aff;
    --color-primary-hover: #8aa3ff;
    --color-primary-light: #1e2340;
    --color-success: #34d399;
    --color-success-light: #0d2a22;
    --color-success-text: #6ee7b7;
    --color-warning: #fbbf24;
    --color-warning-light: #2a2310;
    --color-warning-text: #fcd34d;
    --color-danger: #f87171;
    --color-danger-light: #2a1515;
    --color-danger-text: #fca5a5;
    --color-info: #60a5fa;
    --color-info-light: #152030;
    --color-info-text: #93c5fd;
    --sidebar-bg: #0d0f14;
    --sidebar-text: rgba(255,255,255,0.55);
    --sidebar-text-hover: #ffffff;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-active-bg: rgba(255,255,255,0.08);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: var(--font-mono); font-size: 13px; }
code { background: var(--color-bg); padding: 2px 5px; border-radius: 3px; }

h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }

/* ========== Layout ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--color-bg);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.page-content {
    padding: 24px;
    flex: 1;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text-hover);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.brand-icon { font-size: 22px; opacity: 0.9; }
.brand-text { letter-spacing: 1px; }

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    transition: background var(--transition), color var(--transition);
    position: relative;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text-hover);
    text-decoration: none;
}

.nav-item.active {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-active-bg);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 14px; width: 18px; text-align: center; }

.nav-badge {
    margin-left: auto;
    background: var(--color-danger);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-section {
    padding: 18px 18px 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 4px 0;
}

.theme-toggle .theme-label { font-size: 12px; }
.theme-toggle { text-align: left; }

/* ========== Topbar ========== */
.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bc-sep { color: var(--color-text-muted); }
.bc-link { color: var(--color-text-secondary); }
.bc-current { color: var(--color-text); font-weight: 500; }

/* ========== Page Header ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.page-header h1 { display: inline; }
.page-header .badge { vertical-align: middle; margin-left: 8px; }
.page-header .text-muted { margin-left: 8px; }
.page-actions { display: flex; gap: 8px; }

/* ========== Cards ========== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
}

.card-body { padding: 18px; }
.card-body-flush { padding: 0; }
.card-footer { padding: 14px 18px; border-top: 1px solid var(--color-border); }
.card-meta { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--color-text-secondary); }

.card-clickable { cursor: pointer; transition: box-shadow var(--transition); }
.card-clickable:hover { box-shadow: var(--shadow); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ========== Stat Cards ========== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
}

.stat-value { font-size: 28px; font-weight: 700; color: var(--color-text); }
.stat-label { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card-success .stat-value { color: var(--color-success); }

/* ========== Grids ========== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .grid-2col, .grid-sidebar { grid-template-columns: 1fr; }
}

/* ========== Tables ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 10px 18px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 10px 18px;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: rgba(74, 108, 247, 0.02); }

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 32px 18px;
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger); }
.badge-info { background: var(--color-info-light); color: var(--color-info); }
.badge-neutral { background: var(--color-bg); color: var(--color-text-secondary); }
.badge-secondary { background: var(--color-bg); color: var(--color-text-muted); }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    font-family: inherit;
}

.btn:hover { background: var(--color-bg); text-decoration: none; }

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-danger {
    background: var(--color-surface);
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.btn-danger:hover { background: var(--color-danger-light); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-group { display: flex; gap: 8px; }

/* ========== Forms ========== */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--color-text);
}

.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-input-sm, .form-select-sm { padding: 4px 8px; font-size: 12px; width: auto; }

textarea.form-input { resize: vertical; }

.form-error { color: var(--color-danger); font-size: 13px; margin-top: 6px; }
.form-warning { color: var(--color-warning); font-size: 13px; margin-top: 6px; }
.form-message { font-size: 13px; margin-top: 6px; }

.search-input { max-width: 300px; }
.filter-group { display: flex; gap: 8px; align-items: center; }

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 18px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

/* ========== Modals ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-body { padding: 20px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
}

/* ========== Auth Pages ========== */
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo { font-size: 40px; display: block; margin-bottom: 8px; }
.auth-subtitle { color: var(--color-text-secondary); font-size: 14px; margin-top: 4px; }
.auth-form { margin-bottom: 16px; }
.auth-footer { text-align: center; font-size: 13px; }

/* ========== Flash Messages ========== */
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 12px;
    animation: flashIn 300ms ease;
}

/* Text colours follow the theme variables rather than being hardcoded:
   the *-light backgrounds flip to dark shades in dark mode, so a fixed
   dark text colour becomes unreadable against them. */
.flash-success { background: var(--color-success-light); color: var(--color-success-text); }
.flash-error   { background: var(--color-danger-light);  color: var(--color-danger-text); }
.flash-warning { background: var(--color-warning-light); color: var(--color-warning-text); }
.flash-info    { background: var(--color-info-light);    color: var(--color-info-text); }

/* A flash used as a standing explanatory note rather than a transient
   toast: left-aligned, wraps naturally, no flex centring. */
.flash-note {
    display: block;
    padding: 12px 14px;
    line-height: 1.5;
    border-left: 3px solid currentColor;
    animation: none;
}

.flash-note p { margin: 0 0 8px 0; }
.flash-note p:last-child { margin-bottom: 0; }
.flash-note dl { margin: 8px 0 0 0; }
.flash-note dt {
    font-weight: 600;
    margin-top: 6px;
}
.flash-note dd {
    margin: 2px 0 0 0;
    padding-left: 14px;
    color: var(--color-text);
    opacity: 0.85;
}

/* Collapsible reference block: reference material that belongs near the
   thing it describes, without taking permanent screen space. */
.help-details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font-size: 13px;
}

.help-details > summary {
    cursor: pointer;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--color-text);
    user-select: none;
}

.help-details > summary:hover {
    color: var(--color-primary);
}

.help-details[open] > summary {
    border-bottom: 1px solid var(--color-border);
}

.help-details ul {
    margin: 0;
    padding: 10px 14px 12px 30px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.help-details li {
    margin-bottom: 5px;
}

.help-details li:last-child {
    margin-bottom: 0;
}

.help-details code {
    color: var(--color-text);
}

.flash-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
}

@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ========== Metrics ========== */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.metric-card, .metric-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.metric-value { font-size: 22px; font-weight: 700; color: var(--color-text); }
.metric-label { font-size: 11px; color: var(--color-text-secondary); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ========== Detail Lists ========== */
.detail-list { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; }
.detail-list dt { font-weight: 500; color: var(--color-text-secondary); font-size: 13px; }
.detail-list dd { font-size: 13px; }

/* ========== Groups & Tags ========== */
.group-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg);
    border-radius: 16px;
    padding: 4px 12px;
    margin: 3px;
    font-size: 13px;
}

.tag-remove {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0 2px;
}
.tag-remove:hover { color: var(--color-danger); }

.group-membership {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.group-membership:last-child { border-bottom: none; }

/* ========== Config Editor ========== */
.config-json {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
}

.config-editor {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    min-height: 300px;
}

.diff-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.diff-controls label { display: flex; align-items: center; gap: 6px; }

/* ========== Storage ========== */
.storage-list { display: flex; flex-direction: column; gap: 12px; }

.storage-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.storage-item:last-child { border-bottom: none; }

.storage-header, .storage-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.storage-header { margin-bottom: 6px; font-weight: 500; color: var(--color-text); }
.storage-footer { margin-top: 4px; }

.progress-bar {
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 300ms ease;
}

.bar-success { background: var(--color-success); }
.bar-warning { background: var(--color-warning); }
.bar-danger { background: var(--color-danger); }

/* ========== Notes ========== */
.note-form { display: flex; flex-direction: column; gap: 6px; }

/* ========== Notifications ========== */
.notification-unresolved { background: var(--color-warning-light); }

/* ========== Loading ========== */
.loading {
    text-align: center;
    color: var(--color-text-muted);
    padding: 24px;
}

/* HTMX indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.htmx-request.htmx-indicator { display: inline; }

/* ========== Utilities ========== */
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .brand-text,
    .sidebar .nav-item span:not(.nav-icon):not(.nav-badge),
    .sidebar .nav-section { display: none; }
    .sidebar .nav-item { justify-content: center; padding: 12px; }
    .main-content { margin-left: 60px; }
    .page-content { padding: 16px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== Admin Navigation ========== */
.admin-nav {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 4px;
    overflow-x: auto;
}

.admin-nav-item {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
}

.admin-nav-item:hover {
    background: var(--color-bg);
    color: var(--color-text);
    text-decoration: none;
}

.admin-nav-item.active {
    background: var(--color-primary);
    color: #fff;
}

/* ========== Stat Card Variants ========== */
.stat-card-warning { border-left: 3px solid var(--color-warning); }
.stat-card-warning .stat-value { color: var(--color-warning); }
.stat-card-danger { border-left: 3px solid var(--color-danger); }
.stat-card-danger .stat-value { color: var(--color-danger); }
.stat-detail { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ========== Checkbox List ========== */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

/* ========== Role Select Inline ========== */
.role-select {
    min-width: 110px;
}

/* ========== Deploy ========== */
.deploy-form { max-width: 700px; }

.deploy-log-container {
    max-height: 350px;
    overflow-y: auto;
    background: var(--color-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.deploy-log {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    padding: 14px;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-text);
    background: transparent;
}

.deploy-job-item {
    display: block;
    padding: 10px 18px;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--transition);
}

.deploy-job-item:hover {
    background: var(--color-bg);
    text-decoration: none;
}

.deploy-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.deploy-job-target {
    font-weight: 500;
    font-size: 13px;
}

.deploy-job-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.deploy-progress { margin-bottom: 12px; }

/* ========== SSH Keys ========== */
.ssh-assign-form {
    max-width: 500px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

/* --- Pagination controls --- */
.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}
.pagination-info {
    color: var(--text-muted, #666);
    font-size: 13px;
}
.btn-disabled,
.btn.btn-disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

/* --- Searchable host picker --- */
.picker-results {
    border: 1px solid var(--border, #ddd);
    border-radius: 4px;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
}
.picker-results:empty {
    display: none;
}
.picker-item {
    padding: 8px 12px;
    cursor: pointer;
}
.picker-item:hover {
    background: var(--hover-bg, #f2f4f7);
}
.picker-empty {
    padding: 8px 12px;
    font-size: 13px;
}
