:root {
    --primary:    #2563eb;
    --primary-hover: #1d4ed8;
    --surface:    #ffffff;
    --bg:         #f8fafc;
    --border:     #e2e8f0;
    --text:       #1e293b;
    --muted:      #64748b;
    --success:    #16a34a;
    --warning:    #d97706;
    --danger:     #dc2626;
    --radius:     12px;
    --shadow:     0 2px 8px rgba(0,0,0,.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); font-family: 'DM Sans', sans-serif; color: var(--text); margin: 0; }

/* ── Buttons ── */
.lh-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
    border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: .15s; text-decoration: none; white-space: nowrap; }
.lh-btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.lh-btn-primary:hover { background: var(--primary-hover); }
.lh-btn-secondary { background: #f1f5f9; color: var(--text); border-color: var(--border); }
.lh-btn-secondary:hover { background: #e2e8f0; }
.lh-btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.lh-btn-sm        { padding: 5px 10px; font-size: 12px; }
.lh-btn-icon      { background: none; border: none; cursor: pointer; font-size: 14px; padding: 4px; }

/* ── Card ── */
.lh-card { background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; }
.lh-card-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.lh-card-hdr h2 { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; margin: 0; }

/* ── Toast ── */
.lh-toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    background: var(--text); color: #fff; padding: 12px 18px; border-radius: 10px;
    font-size: 13px; font-weight: 500; transform: translateY(20px); opacity: 0;
    transition: .3s; pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.lh-toast.show { transform: translateY(0); opacity: 1; }
.lh-toast.lh-toast-err     { background: var(--danger); }
.lh-toast.lh-toast-success { background: var(--success); }
/* legacy aliases */
.lh-toast.err { background: var(--danger); }
.lh-toast.ok  { background: var(--text); }

/* ── Modal ── */
.lh-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1000;
    display: none; align-items: center; justify-content: center; }
.lh-overlay.open { display: flex; }
.lh-modal { background: #fff; border-radius: 16px; width: 90%; max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15); overflow: hidden; }
.lh-modal-hdr { display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border); }
.lh-modal-title { font-weight: 700; font-size: 16px; }
.lh-modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.lh-modal-body  { padding: 20px; }

/* ── Form elements ── */
.lh-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; font-family: inherit; transition: .15s; }
.lh-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.lh-select { width: 150px; padding: 9px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px; background: #fff; }
.lh-form-row { margin-bottom: 12px; }
.lh-form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }

/* ── Badge / Status ── */
.lh-badge { display: inline-block; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 20px; }
.lh-badge-green { background: #dcfce7; color: #166534; }
.lh-badge-gray  { background: #f1f5f9; color: #64748b; }
.lh-badge-amber { background: #fef3c7; color: #92400e; }
.lh-badge-red   { background: #fee2e2; color: #991b1b; }

/* ── Empty state ── */
.lh-empty { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }
.lh-loading { color: var(--muted); font-size: 13px; padding: 12px 0; }

/* ── Page wrap ── */
.lh-wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }

/* ── Toggle switch (shared) ── */
.lh-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.lh-switch input { opacity: 0; width: 0; height: 0; }
.lh-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 26px;
    transition: .3s; cursor: pointer; }
.lh-slider:before { content: ''; position: absolute; width: 20px; height: 20px; background: #fff;
    border-radius: 50%; left: 3px; bottom: 3px; transition: .3s; }
.lh-switch input:checked + .lh-slider { background: var(--success); }
.lh-switch input:checked + .lh-slider:before { transform: translateX(22px); }
.lh-switch input:disabled + .lh-slider { opacity: .5; cursor: not-allowed; }

/* ── Tabs ── */
.lh-tabs { display: flex; gap: 4px; }
.lh-tab { background: none; border: 1px solid var(--border); border-radius: 6px;
    padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; }
.lh-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Dropdown (searchable) ── */
.lh-dd-wrap  { position: relative; }
.lh-dd-btn   { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; font-size: 13px; text-align: left; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-family: inherit; }
.lh-dd-panel { position: absolute; z-index: 50; width: 100%; background: #fff;
    border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1); margin-top: 4px; overflow: hidden; }
.lh-dd-search { width: 100%; border: none; border-bottom: 1px solid var(--border);
    padding: 9px 12px; font-size: 13px; outline: none; font-family: inherit; }
.lh-dd-list  { max-height: 200px; overflow-y: auto; padding: 6px; }
.lh-dd-item  { display: flex; align-items: center; gap: 8px; padding: 7px 8px;
    border-radius: 6px; cursor: pointer; font-size: 13px; }
.lh-dd-item:hover { background: #f8fafc; }
.lh-dd-item small { color: var(--muted); font-size: 11px; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .lh-wrap { padding: 16px 12px 48px; }
}

/* Lock/Room cell display */
.lh-cell-name { font-weight: 600; font-size: 13px; display: block; }
.lh-cell-id   { font-size: 11px; color: var(--muted); background: #f1f5f9;
                 padding: 1px 5px; border-radius: 4px; font-family: monospace;
                 font-weight: 400; border: 1px solid #e2e8f0; }
