/* File: App/Main/index_style.css
 * ======================================================================================
 * PLATFORM STYLESHEET — shared by the shell and every plugin (manifest §11, §11-N)
 * --------------------------------------------------------------------------------------
 * Loaded once in index.php <head> as index_style.css?v=<file time>, so a change
 * reaches every browser without bumping the service-worker cache (§I-23-C).
 *
 * RULES
 *   1. Reuse what is here before writing new CSS. Plugins do not ship their own copies
 *      of standard elements (buttons, inputs, tables, tabs, modals, alerts, badges).
 *   2. CSS that only ONE plugin uses lives in that plugin's section at the end of this
 *      file, headed by a comment naming the plugin ("pl_xxx only"), with the plugin's
 *      own class prefix (e.g. .edihb-).
 *   3. As soon as a SECOND plugin uses a rule, it moves into the platform sections
 *      above, gets a neutral .pl- name, and the "only" comment is removed.
 *   4. Values that depend on settings (company colour, sidebar/top-bar visibility) are
 *      NOT in this file — index.php emits them in a small inline <style> after the
 *      link. The defaults below are what an install without settings looks like.
 *   5. Older plugins still carry inline <style> blocks. Move them here the next time
 *      the plugin is changed (manifest §11-N).
 * ======================================================================================
 */

/* 1. VARIABLES & BASE */
:root { --p: #0f172a; --a: #2563eb; --bg: #f8fafc; --w: #ffffff; --t: #334155; --b: #e2e8f0; --success: #22c55e; --error: #ef4444; --warning: #f59e0b; --info: #3b82f6; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--t); height: 100vh; display: flex; overflow: hidden; cursor: default; }
* { box-sizing: border-box; }

/* ---------------------------------------------------------------------------
   CURSOR VISIBILITY SAFETY NET (global, defensive).

   Symptom: mouse pointer disappears on hover over note bodies inside floating
   minipanes. Most likely cause is a `cursor: url(...)` declaration somewhere
   in a plugin / minipane stylesheet that references a missing asset — when
   the browser can't load the custom cursor image AND no fallback keyword is
   provided after the url(), the pointer renders as nothing. Other possible
   causes: an inherited `cursor: none`, or a `caret-color: transparent` that
   we want to globally disallow.

   Strategy: force the standard system cursor on every common surface, with
   !important so any plugin-level `cursor: url(...)` without a fallback gets
   overridden. Each rule names the element type explicitly so we never
   accidentally clobber an intentional `cursor: grab` / `grabbing` on drag
   handles. We also re-assert caret-color: auto so the typing caret can't be
   hidden by an inherited rule.

   Applies platform-wide (every plugin, every pane, every modal). Notes is
   just where it bites first because notes have the most text surface.
--------------------------------------------------------------------------- */

/* Base: every element gets a real cursor unless something deliberately overrides. */
html, body { cursor: default !important; }

/* Text-editable surfaces: I-beam, and the typing caret must be visible. */
input[type="text"], input[type="search"], input[type="email"], input[type="url"],
input[type="password"], input[type="tel"], input[type="number"], input:not([type]),
textarea, [contenteditable], [contenteditable="true"] {
    cursor: text !important;
    caret-color: auto !important;
}

/* Clickable form controls. */
input[type="checkbox"], input[type="radio"], input[type="button"], input[type="submit"],
input[type="reset"], input[type="file"], input[type="color"], input[type="range"],
select, button, a[href] {
    cursor: pointer !important;
}

/* Disabled inputs: not-allowed (override the !important pointer above). */
input:disabled, textarea:disabled, select:disabled, button:disabled {
    cursor: not-allowed !important;
}

/* Drag handles, resize handles, and other intentional cursors keep working
   because they use `grab` / `grabbing` / `nwse-resize` / etc., none of which
   we override here. */

/* 2. LAYOUT (Sidebar, Topbar, Main) */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; background: transparent; color: #cbd5e1; width: 15px; transition: width 0.3s ease, background 0.3s; overflow: visible; z-index: 50; display: flex; flex-direction: column; pointer-events: none; }
.sidebar::before { content: ''; position: absolute; top: 100px; left: 0; width: 12px; height: 160px; background: var(--p); border-radius: 0 8px 8px 0; transition: opacity 0.2s; pointer-events: auto; opacity: 0.8; }
.sidebar:hover, .sidebar.pinned { width: 240px; background: var(--p); pointer-events: auto; }
.sidebar:hover::before, .sidebar.pinned::before { opacity: 0; }
.sidebar-content { opacity: 0; transition: opacity 0.2s; width: 240px; display: flex; flex-direction: column; height: 100%; position: relative; background: var(--p); z-index: 51; }
.sidebar:hover .sidebar-content, .sidebar.pinned .sidebar-content { opacity: 1; }
.brand { height: 60px; display: flex; align-items: center; padding: 0 1rem; font-weight: 700; color: white; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.1); gap: 10px; white-space: nowrap; min-width: 0; }
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; max-width: 130px; }
.menu { flex: 1; padding: 1rem 0; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 12px 1.5rem; color: #cbd5e1; text-decoration: none; transition: 0.2s; border-left: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.menu-item:hover { background: rgba(255,255,255,0.05); color: white; }
.menu-item.active { background: rgba(255,255,255,0.1); color: white; border-left-color: var(--a); }
.menu-group-item { position: relative; }

/* SIDEBAR PANELS — JS-driven, toggled via .panel-open class */
.sidebar-panel { display: flex; visibility: hidden; opacity: 0; position: fixed; top: 0; bottom: 0; left: 240px; width: 240px; background: #1e293b; border-left: 1px solid rgba(255,255,255,0.1); flex-direction: column; z-index: 49; box-shadow: 5px 0 15px rgba(0,0,0,0.1); transition: visibility 0s 0.2s, opacity 0.2s ease; }
.menu-group-item.panel-open > .sidebar-panel { visibility: visible; opacity: 1; transition: visibility 0s, opacity 0.2s ease; }

/* PANEL HEADER — back button + navigable title */
.panel-header { height: 60px; display: flex; align-items: center; padding: 0 1rem 0 1.2rem; border-bottom: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); gap: 0; }
.panel-back-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.5); padding: 6px; border-radius: 4px; display: flex; align-items: center; margin-right: 6px; flex-shrink: 0; transition: 0.2s; }
.panel-back-btn:hover { color: white; transform: translateX(-2px); }
.panel-header-link { color: white; text-decoration: none; flex: 1; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-header-link:hover { opacity: 0.8; }
.panel-content { flex: 1; padding: 1rem 0; overflow-y: auto; }

.pin-btn { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; padding: 0; display: flex; align-items: center; }
.pin-btn:hover, .sidebar.pinned .pin-btn { color: white; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; margin-left: 0; transition: margin-left 0.3s ease; }
body.pinned-mode .main { margin-left: 240px; }
.top { height: 60px; background: var(--w); border-bottom: 1px solid var(--b); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; }
.pg-title { font-size: 1.2rem; font-weight: 600; color: var(--p); display: flex; align-items: center; gap: 10px; }
.top-right { display: flex; align-items: center; gap: 15px; }
.work { flex: 1; padding: 2rem; padding-bottom: 4rem; overflow-y: auto; }
.top-item { color: var(--t); opacity: 0.7; transition: 0.2s; display: flex; align-items: center; position: relative; text-decoration: none; }
.top-item:hover, .top-item.active { opacity: 1; color: var(--a); }
.badge { position: absolute; top: -8px; right: -10px; background: var(--error); color: white; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; border: 2px solid var(--w); }
.back-btn { color: var(--a); opacity: 0.8; transition: 0.2s; display: flex; align-items: center; margin-right: 5px; text-decoration: none; }
.back-btn:hover { opacity: 1; transform: translateX(-2px); }
.icon-primary { color: var(--a); }
.fav-star { color: #cbd5e1; transition: 0.2s; cursor: pointer; display: flex; align-items: center; }
.fav-star:hover, .fav-star.active { color: var(--warning); fill: var(--warning); transform: scale(1.1); }

/* 3. BUTTONS (Strictly Square & Icon-Only) */
.d-ctrl svg, .btn-icon svg, .pl-toggle-opt svg, .pl-add-btn svg { width: 18px !important; height: 18px !important; flex-shrink: 0; pointer-events: none; }
button.d-ctrl, a.d-ctrl { width: 38px !important; height: 38px !important; min-width: 38px !important; padding: 0 !important; margin: 0; border: 1px solid var(--b); border-radius: 6px; background: #fff; color: var(--t); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; text-decoration: none; overflow: hidden; }
button.d-ctrl:hover, a.d-ctrl:hover { background: #f8fafc; color: var(--a); border-color: var(--a); }
button.d-ctrl.primary, a.d-ctrl.primary { background: var(--a); color: #fff; border-color: var(--a); }
button.d-ctrl.primary:hover, a.d-ctrl.primary:hover { filter: brightness(110%); }
button.d-ctrl.danger, a.d-ctrl.danger { color: var(--error); border-color: #fecaca; background: #fef2f2; }
button.d-ctrl.danger:hover, a.d-ctrl.danger:hover { background: #fee2e2; border-color: var(--error); }
button.d-ctrl.active, a.d-ctrl.active { background: #eff6ff; color: var(--a); border-color: var(--a); }
.btn-icon { width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0; color: #64748b; transition: 0.15s; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; text-decoration: none; }
.btn-icon:hover { color: var(--a); background: #f1f5f9; }
.btn-icon.danger { color: #94a3b8; }
.btn-icon.danger:hover { color: #ef4444; background: #fef2f2; }
.btn-icon.active-state { color: var(--a); }
.pl-add-btn { display: flex; align-items: center; justify-content: center; border-radius: 50%; border: none; background: var(--a); color: #fff; cursor: pointer; transition: .2s; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.pl-add-btn:hover { transform: scale(1.05); }
.pl-add-btn.sm { width: 34px; height: 34px; }
.pl-add-btn.md { width: 38px; height: 38px; }

/* 4. FORMS, INPUTS & SELECTS */
.pl-label { font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 6px; display: block; }
.pl-form-group { margin-bottom: 1.25rem; }
.pl-form-group:last-child { margin-bottom: 0; }
input.d-ctrl, select.d-ctrl { height: 38px !important; width: 100%; padding: 0 12px !important; border: 1px solid var(--b); border-radius: 6px; background: #fff; color: var(--t); font-family: inherit; font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
textarea.d-ctrl { width: 100%; min-height: 120px; padding: 12px !important; border: 1px solid var(--b); border-radius: 6px; background: #fff; color: var(--t); font-family: inherit; font-size: 0.9rem; line-height: 1.5; resize: vertical; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
input.d-ctrl:focus, select.d-ctrl:focus, textarea.d-ctrl:focus { border-color: var(--a); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.pl-input-group { display: flex; gap: 10px; align-items: center; width: 100%; }
.pl-input-group > input, .pl-input-group > select { flex: 1; min-width: 0; }

/* 5. SEARCHABLE DROPDOWNS */
.pl-ac { position: relative; width: 100%; }
.pl-ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--w); border: 1px solid var(--b); border-radius: 6px; max-height: 220px; overflow-y: auto; z-index: 100; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); display: none; }
.pl-ac-item { padding: 10px 15px; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; transition: 0.2s; }
.pl-ac-item:last-child { border-bottom: none; }
.pl-ac-item:hover { background: #f0f9ff; color: var(--a); padding-left: 20px; }

/* 6. TOGGLE SWITCHES & SEGMENTED CONTROLS */
.pl-switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; flex-shrink: 0; }
.pl-switch input { opacity: 0; width: 0; height: 0; }
.pl-switch-label { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--t); cursor: pointer; margin-top: 4px; }
.pl-switch-label.primary { color: var(--a); }
.pl-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 24px; }
.pl-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .pl-slider { background-color: var(--success); }
input:checked + .pl-slider:before { transform: translateX(20px); }
.pl-toggle { display: inline-flex; border: 1px solid var(--b); border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.pl-toggle-opt { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #94a3b8; transition: .15s; background: var(--w); border: none; padding: 0 12px; border-right: 1px solid var(--b); height: 38px; outline: none; }
.pl-toggle-opt:last-child { border-right: none; }
.pl-toggle-opt:hover { color: var(--a); background: #f8fafc; }
.pl-toggle-opt.active { color: var(--a); background: #eff6ff; }
.pl-toggle.sm .pl-toggle-opt { width: 38px; padding: 0; }

/* 7. MODALS */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(3px); }
.modal-bg.open { display: flex; }
.modal-box { background: var(--w); border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); max-width: 500px; width: 90%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--b); display: flex; align-items: center; justify-content: space-between; background: #f8fafc; }
.modal-head h3 { margin: 0; font-size: 1.1rem; color: var(--p); font-weight: 600; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--b); background: var(--w); padding: 0 20px; overflow-x: auto; }
.modal-tab { padding: 12px 16px; cursor: pointer; color: #64748b; border-bottom: 2px solid transparent; font-weight: 600; transition: 0.2s; font-size: 0.9rem; white-space: nowrap; }
.modal-tab:hover, .modal-tab.active { color: var(--a); border-bottom-color: var(--a); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.modal-foot { padding: 16px 20px; border-top: 1px solid var(--b); display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: #f8fafc; }

/* 8. TABLES */
.pl-table { width: 100%; border-collapse: separate; border-spacing: 0; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid var(--b); margin-bottom: 1rem; }
.pl-table th { background: #f8fafc; padding: 14px 16px; text-align: left; font-size: 0.85rem; font-weight: 600; color: #475569; border-bottom: 1px solid var(--b); cursor: pointer; white-space: nowrap; user-select: none; transition: background 0.2s, color 0.2s; }
.pl-table th:hover { background: #f1f5f9; color: var(--a); }
.pl-table td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; vertical-align: middle; color: var(--t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-table tr:last-child td { border-bottom: none; }
.pl-table tr { transition: background 0.15s; }
.pl-table tr:hover { background: #f8fafc; }
.pl-table tr.selected { background: #eff6ff; }
.pl-table tr.selected td { border-bottom-color: #dbeafe; }

/* COLUMN FILTER (PlColumnFilter) — shared "header-is-the-picker" dropdown.
   Promoted to global in 2.20 from pl_tools_contracts' plugin-local .tcf-*
   styles so EVERY plugin table can use the same filter without copying CSS.
   The header span (.pl-cf-th) lives inside a <th>; the dropdown panel
   (.pl-cf-dd) is portaled to <body> by the JS on first open so the table's
   overflow:hidden can't clip it. Theming uses --a / --w / --b / --t tokens,
   so it inherits each tenant's accent automatically. See manifest §11-G. */
.pl-cf-th { position: relative; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; padding: 2px 4px; margin: -2px -4px; border-radius: 4px; transition: background .15s; }
.pl-cf-th:hover { background: rgba(99,102,241,.06); }
.pl-cf-th.open { background: rgba(99,102,241,.1); }
.pl-cf-car { font-size: .55rem; color: #94a3b8; transition: transform .15s; }
.pl-cf-th.open .pl-cf-car { transform: rotate(180deg); }
.pl-cf-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--a); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.pl-cf-th.active { color: var(--a); font-weight: 700; }
.pl-cf-th.active .pl-cf-dot { display: inline-block; }
.pl-cf-th.active .pl-cf-car { color: var(--a); }
.pl-cf-dd { display: none; position: fixed; top: 0; left: 0; min-width: 220px; max-width: 300px; background: var(--w); border: 1px solid var(--b); border-radius: 8px; box-shadow: 0 8px 24px -6px rgba(15,23,42,.18), 0 2px 6px -2px rgba(15,23,42,.08); z-index: 9500; overflow: hidden; font-weight: 400; }
.pl-cf-dd.open { display: block; }
.pl-cf-dd-search { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; }
.pl-cf-dd-search input { width: 100%; padding: 5px 8px; font-size: .78rem; border: 1px solid var(--b); border-radius: 4px; font-family: inherit; color: var(--t); background: #fff; }
.pl-cf-dd-search input:focus { outline: none; border-color: var(--a); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.pl-cf-dd-list { max-height: 260px; overflow-y: auto; padding: 4px 0; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.pl-cf-dd-list::-webkit-scrollbar { width: 6px; }
.pl-cf-dd-list::-webkit-scrollbar-track { background: transparent; }
.pl-cf-dd-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.pl-cf-dd-list::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.pl-cf-dd-item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: .82rem; color: var(--t); cursor: pointer; transition: background .1s; text-transform: none; letter-spacing: 0; font-weight: 400; }
.pl-cf-dd-item:hover { background: #f1f5f9; }
.pl-cf-dd-item.sel { background: #eff6ff; color: var(--a); font-weight: 600; }
.pl-cf-dd-item.sel::before { content: "\2713"; color: var(--a); font-weight: 700; margin-right: -2px; }
.pl-cf-dd-item.all { border-bottom: 1px solid #f1f5f9; color: #64748b; font-style: italic; }
.pl-cf-dd-item.all.sel { background: transparent; color: #64748b; font-weight: 400; }
.pl-cf-dd-item.all.sel::before { content: ""; }
.pl-cf-dd-empty { padding: 14px 12px; font-size: .78rem; color: #94a3b8; text-align: center; font-style: italic; }
.pl-cf-dd-item.sort { font-weight: 600; color: var(--p); }
.pl-cf-dd-item.sort.sel { background: #eff6ff; color: var(--a); }
.pl-cf-dd-item.sort.sel::before { content: ""; margin: 0; }
.pl-cf-dd-sep { height: 1px; background: #eef2f7; margin: 4px 0; }
.pl-cf-th.pl-cf-sort-asc, .pl-cf-th.pl-cf-sort-desc { color: var(--a); font-weight: 700; }
.pl-cf-th.pl-cf-sort-asc::after { content: "\2191"; color: var(--a); font-size: .7rem; margin-left: 1px; }
.pl-cf-th.pl-cf-sort-desc::after { content: "\2193"; color: var(--a); font-size: .7rem; margin-left: 1px; }
@media (max-width: 768px) { .pl-cf-dd { left: 8px !important; right: 8px !important; width: auto; max-width: none; } }

/* SORT INDICATOR (optional, driven by PlColumnFilter.markSort or by hand).
   A th carrying data-pl-sort gets a caret reflecting the active direction.
   Sortable headers are already mandated by §11-G; this only standardises the
   visual so every plugin's arrow looks identical. */
.pl-table th[data-pl-sort] { padding-right: 22px; position: relative; }
.pl-table th[data-pl-sort]::after { content: "\2195"; position: absolute; right: 8px; opacity: .35; font-size: .8em; }
.pl-table th[data-pl-sort="asc"]::after { content: "\2191"; opacity: 1; color: var(--a); }
.pl-table th[data-pl-sort="desc"]::after { content: "\2193"; opacity: 1; color: var(--a); }

/* 9. CARDS & GRIDS */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 1rem; }
.pl-card { background: var(--w); border: 1px solid var(--b); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; transition: 0.2s; position: relative; }
.pl-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--a); }
.pl-card-title { font-weight: 700; margin-bottom: 10px; color: var(--p); display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.pl-card-body { font-size: 0.9rem; color: #64748b; flex: 1; line-height: 1.5; }
.pl-card-meta { margin-top: 15px; padding-top: 10px; border-top: 1px solid #f1f5f9; font-size: 0.75rem; color: #94a3b8; display: flex; justify-content: space-between; }
.pl-grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.pl-card-mini { background: var(--w); border: 1px solid var(--b); border-radius: 8px; padding: 15px 10px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pl-card-mini:hover { border-color: var(--a); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.pl-card-mini svg { width: 32px; height: 32px; margin-bottom: 8px; color: var(--t); }
.pl-card-mini .title { font-size: 0.75rem; color: #64748b; word-break: break-all; font-weight: 600; }

/* 10. TAGS, BADGES & TABS */
.pl-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; border: 1px solid transparent; gap: 4px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.pl-tag:hover { filter: brightness(95%); transform: translateY(-1px); }
.pl-tag.selected { box-shadow: 0 0 0 2px var(--w), 0 0 0 4px var(--a); z-index: 1; }
.pl-tag-private { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.pl-tag-internal { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pl-tag-public { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.pl-badge { background: #f1f5f9; color: #475569; padding: 3px 8px; border-radius: 12px; font-weight: 700; font-size: 0.7rem; white-space: nowrap; border: 1px solid #e2e8f0; }
.pl-tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--b); padding-bottom: 10px; overflow-x: auto; margin-bottom: 20px; }
.pl-tab { display: flex; align-items: center; gap: 6px; padding: 6px 12px; cursor: pointer; opacity: 0.7; border-bottom: 2px solid transparent; transition: 0.2s; white-space: nowrap; font-weight: 500; text-decoration: none; color: var(--t); }
.pl-tab:hover { opacity: 1; color: var(--a); }
.pl-tab.active { border-bottom-color: var(--a); color: var(--a); opacity: 1; font-weight: 600; }
.pl-panel { display: none; flex: 1; overflow-y: auto; }
.pl-panel.active { display: block; padding-top: 0.5rem; }
.pl-panel.active > div > .pl-card:first-child { margin-top: 0; }

/* 11. TOOLBARS & UTILITIES */
.d-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 10px; flex-wrap: wrap; }
.d-toolbar-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-toolbar-search { width: 260px; min-width: 150px; position: relative; }
.pl-filter-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pl-filter-tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; border: 1px solid var(--a); background: #eff6ff; color: var(--a); gap: 6px; font-weight: 600; }
.pl-spinner { width: 16px; height: 16px; border: 2px solid #e2e8f0; border-top-color: var(--a); border-radius: 50%; animation: pl-spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes pl-spin { 100% { transform: rotate(360deg); } }

/* 12. TOASTS & NOTIFICATIONS */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 300px; padding: 14px 20px; border-radius: 8px; background: var(--w); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; border-left: 5px solid var(--info); animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); transition: opacity 0.5s, transform 0.5s; font-weight: 500; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.confirm { border-left-color: var(--error); background: #fff5f5; }
.toast-actions { display: flex; gap: 8px; margin-left: 10px; }
.toast-btn { border: 1px solid currentColor; border-radius: 6px; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; background: transparent; width: 32px; height: 32px; }
.toast-btn:hover { background: rgba(0,0,0,0.05); transform: scale(1.05); }
.toast-btn.confirm { color: var(--success); border-color: var(--success); }
.toast-btn.info { color: var(--info); border-color: var(--info); }
.pl-alert { padding: 14px 16px; border-radius: 8px; border-left: 4px solid var(--info); background: #f0f9ff; color: #0369a1; font-size: 0.9rem; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; line-height: 1.5; font-weight: 500; }
.pl-alert.warning { border-left-color: var(--warning); background: #fffbeb; color: #92400e; }
.pl-alert.success { border-left-color: var(--success); background: #f0fdf4; color: #166534; }
.pl-alert.error { border-left-color: var(--error); background: #fef2f2; color: #991b1b; }
.toast-close { background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; display: flex; align-items: center; }
.toast-close:hover { color: var(--t); }
.toast-close svg { width: 16px; height: 16px; }

/* ERROR ALERTS POPUP (Level 4) — condensed view of "confirm" notifications */
.pl-alerts-box { max-width: 760px !important; }
.pl-alerts-group { border: 1px solid var(--b); border-left: 4px solid var(--error); border-radius: 8px; margin-bottom: 10px; background: var(--w); }
.pl-alerts-group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.pl-alerts-group > summary::-webkit-details-marker { display: none; }
.pl-alerts-group[open] > summary { border-bottom: 1px solid #f1f5f9; }
.pl-alerts-title { font-weight: 600; color: var(--p); }
.pl-alerts-meta { font-size: 0.78rem; color: #64748b; margin-top: 2px; }
.pl-alerts-count { background: #fee2e2; color: #991b1b; font-weight: 700; font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.pl-alerts-items { padding: 6px 12px 10px; max-height: 260px; overflow-y: auto; }
.pl-alerts-item { font-size: 0.82rem; padding: 6px 0; border-bottom: 1px dashed #f1f5f9; }
.pl-alerts-item:last-child { border-bottom: none; }
.pl-alerts-item .when { color: #94a3b8; margin-right: 6px; }
.pl-alerts-item .msg { color: var(--t); white-space: pre-wrap; word-break: break-word; margin-top: 2px; }

/* 13. DASHBOARD CARDS */
.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 2rem; }
.db-card { background: white; border-radius: 12px; padding: 25px; text-decoration: none; color: inherit; border: 1px solid #e2e8f0; transition: all 0.2s ease; display: flex; flex-direction: row; align-items: center; gap: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: relative; }
.db-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--a); }
.db-card.big { grid-column: span 2; }
.db-card.line { grid-column: 1 / -1; }
.db-icon { width: 48px; height: 48px; background: #f1f5f9; color: var(--a); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-title { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin: 0; }
.db-desc { font-size: 0.9rem; color: #64748b; margin: 0; line-height: 1.4; }
.db-fav-indicator { position: absolute; top: 10px; right: 10px; color: var(--warning); }

/* 14. MOBILE OVERRIDES */
.fab-menu { display: none; position: fixed; bottom: 20px; right: 20px; width: 56px; height: 56px; background: var(--a); border-radius: 50%; color: white; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 100; cursor: pointer; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: var(--p); z-index: 200; flex-direction: column; overflow-y: auto; }
.mobile-overlay.open { display: flex; }
.mobile-close { position: absolute; top: 20px; right: 20px; color: white; background: none; border: none; cursor: pointer; }
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0 !important; }
    .fab-menu { display: flex; }
    body.has-banner .fab-menu { bottom: 68px; }
    .top { padding: 0 1rem; }
    .pg-title span { display: none; }
    .db-grid { grid-template-columns: 1fr; gap: 15px; }
    .db-card.big, .db-card.line { grid-column: span 1; }
    .modal-box { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; margin: 0 !important; }
    .modal-head { border-radius: 0 !important; }
    .pl-table { display: block; border: none; background: transparent; box-shadow: none; }
    .pl-table thead { display: none; }
    .pl-table tbody { display: block; }
    .pl-table tr { display: grid; grid-template-columns: 50px 1fr; gap: 5px; background: white; margin-bottom: 10px; border-radius: 8px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }
    .pl-table td { display: block; padding: 2px 0; border: none; white-space: normal; }
    .desk-only { display: none !important; }
    .d-toolbar { flex-direction: column; align-items: stretch; }
    .d-toolbar-left { flex-wrap: wrap; justify-content: flex-start; }
    .d-toolbar-search { width: 100%; }
}
/* SEARCHABLE SELECT (PlSelect) */
.pl-search-select { position: relative; display: block; }
.pl-search-select-dropdown { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: var(--w); border: 1px solid var(--b); border-radius: 6px; max-height: 220px; overflow-y: auto; z-index: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.12); display: none; }
.pl-search-select-dropdown.open { display: block; }
.pl-search-select-option { padding: 9px 14px; cursor: pointer; font-size: 0.9rem; border-bottom: 1px solid #f8fafc; transition: background 0.1s; }
.pl-search-select-option:last-child { border-bottom: none; }
.pl-search-select-option:hover { background: #f0f9ff; color: var(--a); }
.pl-search-select-option.selected { font-weight: 600; color: var(--a); }
.pl-search-select-empty { padding: 10px 14px; color: #94a3b8; font-size: 0.85rem; font-style: italic; }

/* 16. FILE DROPZONE */
.pl-dropzone { border: 2px dashed var(--b); border-radius: 8px; padding: 22px 16px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s; background: #f8fafc; color: #64748b; display: flex; flex-direction: column; align-items: center; gap: 6px; user-select: none; }
.pl-dropzone:hover, .pl-dropzone.drag-over { border-color: var(--a); background: #eff6ff; color: var(--a); }
.pl-dropzone.uploading { pointer-events: none; opacity: 0.6; }
.pl-file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--b); border-radius: 8px; margin-bottom: 8px; transition: border-color 0.15s, background 0.15s; }
.pl-file-item:hover { border-color: #cbd5e1; background: var(--w); }
.pl-file-item:last-child { margin-bottom: 0; }
.pl-file-icon { width: 36px; height: 36px; background: #e2e8f0; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #64748b; }
.pl-file-meta { flex: 1; min-width: 0; }
.pl-file-name { font-weight: 600; font-size: 0.9rem; color: var(--p); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-file-info { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }

/* 16-§16. PlFilesAttach — host-plugin file attachments (pl_files manifest §16-D) */
.pl-file-attach-zone { display: flex; gap: 10px; align-items: stretch; }
.pl-file-attach-zone .pl-dropzone:first-child { flex: 1; }
.pl-file-attach-zone .pl-dropzone:last-child { width: 120px; flex-shrink: 0; cursor: pointer; }
.pl-file-attach-list { margin-top: 15px; }
.pl-file-attach-list:empty::before { content: attr(data-empty-msg); color: #94a3b8; font-size: 0.85rem; }
.pl-file-attach-progress { margin-top: 10px; font-size: 0.85rem; color: var(--a); display: flex; align-items: center; gap: 8px; }
.pl-file-attach-progress.error { color: var(--error, #dc2626); }
.pl-file-attach-preview-pane { background: #0f172a; height: 100%; display: flex; flex-direction: column; }
.pl-file-attach-preview-pane .pl-file-attach-pv-container { position: relative; flex: 1; background: #0f172a; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.pl-file-attach-preview-pane img { max-width: 100%; max-height: 100%; object-fit: contain; display: none; }
.pl-file-attach-preview-pane .pl-file-attach-pv-err { display: none; color: #94a3b8; text-align: center; padding: 20px; }
.pl-file-attach-preview-pane .pl-file-attach-pv-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #1e293b; border-top: 1px solid #334155; }
.pl-file-attach-preview-pane .pl-file-attach-pv-foot .pl-file-attach-pv-title { flex: 1; color: #e2e8f0; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-file-attach-edit-modal { max-width: 540px; }
.pl-file-attach-edit-modal .pl-file-attach-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pl-file-attach-edit-modal .pl-file-attach-title-input { background: transparent; border: none; outline: none; font-size: 1rem; font-weight: 600; color: var(--p); width: 100%; padding: 4px 0; }
.pl-file-attach-edit-modal .pl-file-attach-title-input:focus { border-bottom: 2px solid var(--a); }
.pl-file-attach-browse-modal { max-width: 700px; height: 80vh; }
.pl-file-attach-browse-modal .pl-file-attach-browse-bar { padding: 12px 20px; border-bottom: 1px solid var(--b); display: flex; gap: 8px; align-items: center; }
.pl-file-attach-browse-modal .pl-file-attach-browse-results { padding: 12px 20px; overflow-y: auto; flex: 1; }


/* 15. AUTH & MISC */
.auth-wrap { width: 100%; display: flex; justify-content: center; align-items: center; position: relative; height: 100vh; }
.auth-box { background: var(--w); padding: 2.5rem; border-radius: 12px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); width: 350px; position: relative; z-index: 2; }
.auth-btn { width: 100%; background: var(--a); color: white; padding: 12px; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; margin-top: 10px; transition: 0.2s; }
.auth-btn:hover { filter: brightness(110%); transform: translateY(-1px); }
.lang-dd { position: relative; cursor: pointer; display: flex; align-items: center; }
.lang-lst { display: none; position: absolute; right: 0; top: 100%; margin-top: 10px; background: white; border: 1px solid var(--b); border-radius: 6px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); min-width: 180px; z-index: 100; overflow: hidden; }
.lang-dd.open .lang-lst { display: block; }
.lang-it { display: flex; align-items: center; gap: 10px; padding: 12px 15px; text-decoration: none; color: var(--t); font-size: 0.85rem; transition: 0.1s; border-bottom: 1px solid #f1f5f9; }
.lang-it:hover { background: #f1f5f9; }
.lang-it.active { background: #f0f9ff; color: var(--a); font-weight: 600; }
.footer-banner { position: fixed; bottom: 0; left: 0; width: 100%; padding: 8px 24px; background: rgba(241, 245, 249, 0.8); backdrop-filter: blur(4px); z-index: 48; display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 0.75rem; font-weight: 600; color: #64748b; text-decoration: none; box-sizing: border-box; transition: left 0.3s ease; }
.footer-banner svg { display: block; flex-shrink: 0; color: #64748b; }
body.pinned-mode .footer-banner { left: 240px; width: calc(100% - 240px); }
.footer-banner:hover { color: var(--a); }
.footer-banner:hover svg { color: var(--a); }
.brand-name { font-weight: 900; color: #1e293b; }

/* PWA install row — icon-only square button, matches .d-ctrl sizing */
.pwa-install-row { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #f1f5f9; text-align: center; }
.pwa-install-btn { width: 38px; height: 38px; background: #fff; border: 1px solid var(--b); color: var(--t); padding: 0; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; }
.pwa-install-btn:hover { border-color: var(--a); color: var(--a); background: #f8fafc; }

/* ─────────────────────────────────────────────────────────────────────
 * Manifest 2.7 §11-A.2 — FORMS RESIZABLE ON DESKTOP
 * Plugins apply .pl-form-resizable to the outermost form container.
 * ───────────────────────────────────────────────────────────────────── */
.pl-form-resizable {
    resize: both;
    overflow: auto;
    min-width: 320px;
    min-height: 240px;
    max-width: 100vw;
    max-height: 90vh;
}
@media (max-width: 768px) {
    .pl-form-resizable { resize: none; width: 100%; max-width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Manifest 2.8.1 §11-A.3 — SEARCH INPUT CONTRACT
 * Reserved icon slot + clear-X; theme-consistent with .d-ctrl.
 * ───────────────────────────────────────────────────────────────────── */
.pl-search {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 38px;
}
/* Fixed-width leading-magnifier slot so the input can't visually overflow it. */
.pl-search-icon {
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    background: var(--bg, #fff);
    border: 1px solid var(--b, #e2e8f0);
    border-right: 0;
    border-radius: 6px 0 0 6px;
}
.pl-search-icon svg { width: 16px; height: 16px; display: block; }
/* Input fills remaining space — joins seamlessly with the icon slot. */
.pl-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
    padding-left: 8px !important;
    padding-right: 36px !important;
    width: 100%;
}
/* Without .has-icon restore normal edges + padding (bare search bar). */
.pl-search-input:not(.has-icon) {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    border-left: 1px solid var(--b, #e2e8f0) !important;
    padding-left: 12px !important;
}
.pl-search-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
}
.pl-search-clear:hover { background: rgba(148,163,184,0.15); color: #475569; }
.pl-search-clear svg { width: 14px; height: 14px; display: block; }
.pl-search[data-has-value="1"] .pl-search-clear { display: flex; }

/* ─────────────────────────────────────────────────────────────────────
 * Manifest 2.7 §11-A.1 — AUTOSAVE STATUS INDICATOR
 * Small, non-intrusive pill near the primary save button.
 * ───────────────────────────────────────────────────────────────────── */
.pl-autosave-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: opacity 0.4s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}
.pl-autosave-status[data-state="idle"]   { opacity: 0; pointer-events: none; }
.pl-autosave-status[data-state="saving"] { color: #6366f1; background: #eef2ff; }
.pl-autosave-status[data-state="saved"]  { color: #15803d; background: #f0fdf4; }
.pl-autosave-status[data-state="error"]  { color: #dc2626; background: #fef2f2; border-color: #fecaca; cursor: pointer; }
.pl-autosave-status .pl-autosave-dot {
    width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pl-autosave-status[data-state="saving"] .pl-autosave-dot { animation: pl-autosave-pulse 1s ease-in-out infinite; }
@keyframes pl-autosave-pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

/* ======================================================================================
 * PLUGIN SECTIONS — rules used by ONE plugin only (rule 2). Prefix = plugin's own.
 * ====================================================================================== */

/* ---------------------------------------------------------------------------
 * pl_edi_hornbach only (prefix .edihb-) — also the template for every copied EDI
 * interface plugin. Copies keep the .edihb- classes (same markup), so they do NOT
 * count as a "second plugin" for rule 3 unless they add new rules.
 * Reuses: .pl-alert (banners, messages), .pl-card, .pl-table, .pl-tabs, .pl-toggle,
 * .pl-switch, .pl-ac, .pl-badge, .d-ctrl, .btn-icon, .pl-spinner, .modal-*.
 * --------------------------------------------------------------------------- */
.edihb-meta { font-size: .8rem; color: #64748b; }
.edihb-muted { color: #64748b; font-weight: 400; }
.edihb-muted.sm, .edihb-err.sm { font-size: .75rem; }
.edihb-err { color: #b91c1c; }
.edihb-c-warn { color: #b45309; } .edihb-c-err { color: #b91c1c; }
.edihb-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.edihb-hidden { display: none !important; }
.edihb-empty { color: #94a3b8; font-style: italic; padding: 10px 0; white-space: normal; }
.edihb .pl-spinner, .edihb-pane .pl-spinner { width: 14px; height: 14px; }
.edihb .d-ctrl.primary .pl-spinner { border-top-color: #fff; }

/* banners (reuse .pl-alert colours) */
.edihb-banners .pl-alert { margin-bottom: 10px; padding: 10px 12px; }
.edihb-banner svg { width: 20px; height: 20px; flex-shrink: 0; }
.edihb-banner-t { flex: 1; }
.edihb-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #fee2e2; color: #991b1b; font-size: .7rem; font-weight: 700; text-align: center; line-height: 18px; }
.edihb-envbadge { margin-left: 10px; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; border: 1px solid; vertical-align: middle; }
.edihb-envbadge.env-test, .edihb-env.env-test { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.edihb-envbadge.env-prod, .edihb-env.env-prod { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* legend: normal top margin. (The old -6px margin pushed the ticks under the scrolling
   panel's top edge and clipped them — the "margin issue".) */
.edihb-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: #64748b; margin: 0 0 12px; padding-top: 2px; }
.edihb-legend > span { display: inline-flex; gap: 6px; align-items: center; }

/* ticks */
.edihb-tick { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid; flex-shrink: 0; vertical-align: middle; box-sizing: border-box; }
.edihb-tick svg { width: 12px !important; height: 12px !important; stroke-width: 3; }
.edihb-tick + .edihb-tick { margin-left: 3px; }
.edihb-tick.sm { width: 18px; height: 18px; border-width: 1.5px; }
.edihb-tick.sm svg { width: 10px !important; height: 10px !important; }
.edihb-tick.ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.edihb-tick.sync { background: #fff; border-color: #86efac; color: #16a34a; }
.edihb-tick.warn { background: #fffbeb; border-color: #f59e0b; color: #b45309; }
.edihb-tick.pending { background: #fff; border-color: #cbd5e1; color: #64748b; }
.edihb-tick.error { background: #fef2f2; border-color: #ef4444; color: #dc2626; }
.edihb-tick.na { background: #fff; border-color: #e2e8f0; color: #cbd5e1; }

/* pills */
.edihb-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .7rem; font-weight: 700; background: #f1f5f9; color: #475569; white-space: nowrap; }
.edihb-pill.st-open, .edihb-pill.ds-new, .edihb-pill.ds-received, .edihb-pill.lv-info { background: #eff6ff; color: #1d4ed8; }
.edihb-pill.st-partial_delivered, .edihb-pill.st-partial_invoiced, .edihb-pill.ds-queued, .edihb-pill.ds-sending, .edihb-pill.lv-warning { background: #fef3c7; color: #92400e; }
.edihb-pill.st-delivered { background: #e0f2fe; color: #075985; }
.edihb-pill.st-invoiced, .edihb-pill.ds-sent, .edihb-pill.ds-parsed { background: #dcfce7; color: #166534; }
.edihb-pill.st-missing, .edihb-pill.ds-failed, .edihb-pill.ds-parse_error, .edihb-pill.lv-error { background: #fee2e2; color: #991b1b; }
.edihb-pill.st-canceled, .edihb-pill.ds-skipped, .edihb-pill.ds-duplicate { background: #f1f5f9; color: #64748b; }

/* tables */
.edihb-tblwrap { overflow-x: auto; }
.edihb-ovt tbody tr { cursor: pointer; }
.edihb-ovt td.ticks { width: 64px; }
.edihb-ovt tr.closed td { color: #64748b; }
.edihb-tbl { font-size: .82rem; margin-bottom: 0; }
.edihb-tbl th, .edihb-tbl td { padding: 7px 10px !important; }
.edihb-tbl td.wrap { white-space: normal; }
.edihb-tbl .num { text-align: right; }
.edihb-tbl tr.lv-error td { background: #fef2f2; color: #991b1b; }
.edihb-tbl tr.lv-warning td { background: #fffbeb; color: #92400e; }
.edihb-row-act { display: flex; gap: 2px; justify-content: flex-end; }
.edihb-bar { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: #e2e8f0; vertical-align: middle; margin-right: 6px; overflow: hidden; position: relative; }
.edihb-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #38bdf8; }
.edihb-bar b { position: absolute; left: 0; top: 0; bottom: 0; background: #16a34a; }
.edihb-prog { font-size: .78rem; color: #64748b; }

/* "i" button, "?" hint, tooltip box, info pop-up content */
.edihb-i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #93c5fd; background: #eff6ff; color: #1d4ed8; font: italic 700 12px/1 Georgia, serif; cursor: pointer; padding: 0; flex-shrink: 0; vertical-align: middle; transition: .15s; }
.edihb-i:hover { background: var(--a); border-color: var(--a); color: #fff; }
.edihb-q { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: #e2e8f0; color: #475569; font-size: .65rem; font-weight: 700; cursor: help; margin-left: 4px; vertical-align: middle; }
.edihb-tipbox { position: fixed; z-index: 20000; max-width: 320px; padding: 7px 10px; border-radius: 6px; background: #0f172a; color: #f8fafc; font-size: .78rem; font-weight: 500; line-height: 1.4; box-shadow: 0 6px 16px rgba(0,0,0,.2); pointer-events: none; opacity: 0; transition: opacity .12s; white-space: pre-line; }
.edihb-tipbox.show { opacity: 1; }
.edihb-info { padding: 16px 18px; font-size: .88rem; line-height: 1.55; color: var(--t); }
.edihb-info p { margin: 0 0 10px; }
.edihb-info ul, .edihb-info ol { margin: 0 0 10px; padding-left: 20px; }
.edihb-info li { margin-bottom: 4px; }
.edihb-info-tbl { border-collapse: collapse; margin: 6px 0 10px; width: 100%; }
.edihb-info-tbl td { padding: 7px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.edihb-info-ic { width: 64px; white-space: nowrap; }
.edihb-info-note { color: #64748b; font-size: .8rem; }
.edihb-pre { margin: 10px 0 0; padding: 10px; background: #0f172a; color: #e2e8f0; border-radius: 6px; font-size: .75rem; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.edihb-pre.tall { max-height: none; margin: 0; border-radius: 0; min-height: 100%; }

/* cards, status board */
.edihb .pl-card.edihb-card { transform: none; box-shadow: none; margin-bottom: 16px; padding: 16px; }
.edihb .pl-card.edihb-card:hover { transform: none; box-shadow: none; border-color: var(--b); }
.edihb-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--p); flex-wrap: wrap; }
.edihb-sys-h { margin: 0 0 10px; }
.edihb-sub { font-size: .78rem; font-weight: 600; color: #64748b; margin: 4px 0 6px; }
.edihb-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.edihb-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.edihb-board .pl-card.edihb-card { margin-bottom: 0; border-top-width: 4px; }
.edihb-tile.st-ok { border-top-color: #16a34a; } .edihb-tile.st-error { border-top-color: #ef4444; }
.edihb-tile.st-warn { border-top-color: #f59e0b; } .edihb-tile.st-na { border-top-color: #cbd5e1; }
.edihb-tile-st { margin-left: auto; font-size: .72rem; font-weight: 700; color: #64748b; }
.edihb-tile.st-ok .edihb-tile-st { color: #15803d; } .edihb-tile.st-error .edihb-tile-st { color: #b91c1c; } .edihb-tile.st-warn .edihb-tile-st { color: #b45309; }
.edihb-tile-b { font-size: .82rem; color: #475569; line-height: 1.6; word-break: break-word; flex: 1; }
.edihb-tile-note { margin-top: 6px; font-weight: 600; color: var(--p); }
.edihb-tile .pl-alert.edihb-res { margin: 8px 0 0; padding: 8px 10px; font-size: .8rem; }
.edihb-hc { display: flex; gap: 8px; align-items: center; font-size: .8rem; margin-bottom: 4px; min-width: 0; }
.edihb-hc .lbl { flex-shrink: 0; font-weight: 600; color: var(--p); }
.edihb-hc .det { color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.edihb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edihb-cols > .pl-card.edihb-card { margin-bottom: 16px; }
@media (max-width: 900px) { .edihb-cols { grid-template-columns: 1fr; } }
.edihb-fields { font-size: .72rem; word-break: break-word; margin-bottom: 6px; }
.edihb-danger { border-color: #fecaca !important; }
.edihb-mini td { padding: 5px 8px !important; font-size: .78rem; }

/* settings */
.edihb-setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.edihb-setgrid .pl-card.edihb-card { margin-bottom: 0; }
.edihb .d-ctrl.edihb-bad { border-color: var(--error) !important; }
.edihb-save-saving { color: #6366f1; } .edihb-save-saved { color: #15803d; } .edihb-save-error { color: #b91c1c; cursor: pointer; }

/* test tab */
.edihb-off .edihb-cols, .edihb-off .edihb-steps { opacity: .55; }
.edihb-mode.on { border-color: #fde68a !important; background: #fffbeb; }
.edihb-mode.off { border-color: #fecaca !important; background: #fef2f2; }
.edihb-mode .edihb-card-h { margin-bottom: 0; }
.edihb-mode-t { font-size: .85rem; font-weight: 600; color: var(--p); }
.edihb-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.edihb-step { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; }
.edihb-step-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--a); color: #fff; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.edihb-step-st { display: inline-flex; align-items: center; gap: 4px; color: #94a3b8; font-size: .8rem; }
.edihb-step-st svg { width: 14px !important; height: 14px !important; }
.edihb-step-st.ok { color: #15803d; } .edihb-step-st.err { color: #b91c1c; }
.edihb-tline { display: grid; grid-template-columns: 1fr 80px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.edihb-tline-i { grid-column: 1 / -1; margin-top: -4px; }
.edihb-tline-i:empty { display: none; }
#edihb-test-msg .pl-alert, #edihb-test-send-result .pl-alert { margin: 12px 0 0; }
#edihb-import-text { min-height: 140px; font-size: .78rem; }

/* order pop-up */
.edihb-pane { display: flex; flex-direction: column; min-height: 100%; font-size: .9rem; outline: none; }
.edihb-summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--b); background: #f8fafc; }
.edihb-sum-main { flex: 1; min-width: 0; }
.edihb-sum-title { font-weight: 700; font-size: 1.05rem; color: var(--p); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edihb-env { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; border: 1px solid; }
.edihb-ticks-lg { display: flex; gap: 4px; }
.edihb-ticks-lg .edihb-tick { width: 28px; height: 28px; }
.edihb-ticks-lg .edihb-tick svg { width: 16px !important; height: 16px !important; }
.edihb-ptabs { margin: 0; padding: 8px 16px 0; border-bottom: 1px solid var(--b); }
.edihb-ptabs .pl-tab { padding-bottom: 8px; }
.edihb-ptabs .edihb-tick { width: 18px; height: 18px; border-width: 1.5px; }
.edihb-ptabs .edihb-tick svg { width: 10px !important; height: 10px !important; }
.edihb-ppanels { flex: 1; min-height: 420px; overflow: auto; }
.edihb-ppanel { display: none; padding: 12px 16px 20px; }
.edihb-ppanel.active { display: block; }
.edihb-ptoolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.edihb-pstatus { margin-left: auto; font-size: .8rem; color: #64748b; }
.edihb-pstatus.err { color: #b91c1c; } .edihb-pstatus.ok { color: #15803d; }
.edihb-ppanel .pl-alert { margin-bottom: 12px; word-break: break-word; }
.edihb-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; margin-bottom: 8px; }
.edihb-kv.one { grid-template-columns: 1fr; }
.edihb-kv > div { display: flex; flex-direction: column; }
.edihb-kv span { font-size: .72rem; color: #64748b; }
.edihb-kv b { font-weight: 600; color: var(--p); word-break: break-word; }
.edihb-h { margin: 18px 0 8px; font-size: .85rem; color: var(--p); display: flex; gap: 8px; align-items: center; }
.edihb-scroll { max-height: 300px; overflow: auto; border-radius: 8px; }
.edihb-scroll.short { max-height: 220px; }
.edihb-reasons { margin: 0; padding-left: 18px; font-size: .84rem; line-height: 1.6; }
.edihb-note { margin-top: 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid var(--b); border-radius: 6px; font-size: .82rem; }
.edihb-lv { font-size: .7rem; color: #64748b; }
.edihb-pend-box { padding: 10px 12px; border: 1px solid var(--b); border-radius: 8px; font-size: .84rem; line-height: 1.6; }
.edihb-pend-box.warn { border-color: #fde68a; background: #fffbeb; }
.edihb-pend-box.ok { border-color: #bbf7d0; background: #f0fdf4; }
/* --- end pl_edi_hornbach only --- */
