/* File: App/Main/index.asset.css — the shell's styles. Travels with index.php
 * (PL_PLATFORM_FILES); loaded by it with ?v=<mtime>. Only values that need PHP
 * stay inline in index.php: the theme colour (--a) and sidebar_force_hide. */

:root {
    --p: #0f172a; --a: #2563eb; --bg: #f8fafc; --w: #ffffff; --t: #334155; --b: #b6c2d1;
    --m: #64748b; --l: #e2e8f0;
    --success: #22c55e; --error: #ef4444; --warning: #f59e0b; --info: #3b82f6;
    /* --a is overridden by the theme colour inline in index.php; the tints follow it. */
    --a-soft: color-mix(in srgb, var(--a) 8%, var(--w));
    --a-ring: color-mix(in srgb, var(--a) 15%, transparent);
}
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; }
/* The hidden attribute always hides, whatever display a class sets (3.06). */
[hidden] { display: none !important; }

html, body { cursor: default !important; }

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: var(--a) !important;
}

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;
}

input:disabled, textarea:disabled, select:disabled, button:disabled {
    cursor: not-allowed !important;
}

.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-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 { 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; background: none; border: none; padding: 0; }
.fav-star:hover, .fav-star.active { color: var(--warning); fill: var(--warning); transform: scale(1.1); }

.pl-gsearch { position: relative; display: flex; align-items: center; }
.pl-gsearch-toggle { color: var(--t); opacity: 0.7; background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; transition: 0.2s; }
.pl-gsearch-toggle:hover, .pl-gsearch[data-open="1"] .pl-gsearch-toggle { opacity: 1; color: var(--a); }
.pl-gsearch-field { position: relative; display: flex; align-items: center; }
.pl-gsearch-input { width: 0; min-width: 0; height: 34px; padding: 0; margin: 0; font-size: 0.9rem; font-family: inherit; color: var(--t); background: transparent; border: 1px solid transparent; border-radius: 6px; outline: none; opacity: 0; visibility: hidden; transition: width 0.25s ease, padding 0.25s ease, margin 0.25s ease, opacity 0.2s ease; }
.pl-gsearch[data-open="1"] .pl-gsearch-input { width: 240px; padding: 0 32px 0 10px; margin-left: 8px; opacity: 1; visibility: visible; background: var(--bg); border-color: var(--b); }
.pl-gsearch-close { display: none; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; background: transparent; border: 1px solid var(--b); border-radius: 6px; cursor: pointer; color: var(--t); }
.pl-gsearch-close svg { width: 18px !important; height: 18px !important; }
.pl-gsearch[data-open="1"] .pl-gsearch-input:focus { border-color: var(--a); box-shadow: var(--pl-glow-focus); }
.pl-gsearch-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: none; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 4px; cursor: pointer; color: #94a3b8; padding: 0; }
.pl-gsearch-clear:hover { background: rgba(148,163,184,0.15); color: #475569; }
.pl-gsearch-clear svg { width: 14px !important; height: 14px !important; }
.pl-gsearch[data-open="1"][data-has-value="1"] .pl-gsearch-clear { display: flex; }
.pl-gsearch-bg { display: none; }
.pl-gsearch[data-open="1"][data-focus="1"] .pl-gsearch-box,
.pl-gsearch[data-open="1"][data-has-value="1"] .pl-gsearch-box { display: flex; }
.pl-gsearch-box { display: none; flex-direction: column; position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-height: 380px; background: var(--w); border: 1px solid var(--b); border-radius: 8px; box-shadow: 0 10px 30px rgba(15,23,42,0.16); z-index: 9300; overflow: hidden; }
.pl-gsearch-head { display: none; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--b); }
.pl-gsearch-list { overflow-y: auto; padding: 6px; }
.pl-gsearch-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--t); text-decoration: none; cursor: pointer; }
.pl-gsearch-item:hover, .pl-gsearch-item.active { background: var(--bg); color: var(--a); }
.pl-gsearch-item svg { width: 18px !important; height: 18px !important; flex-shrink: 0; opacity: 0.75; }
.pl-gsearch-txt { display: flex; flex-direction: column; min-width: 0; }
.pl-gsearch-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-gsearch-grp { font-size: 0.75rem; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-gsearch-empty { display: none; padding: 20px 16px; text-align: center; font-size: 0.85rem; color: #94a3b8; }
.pl-gsearch[data-empty="1"] .pl-gsearch-empty { display: block; }

.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: var(--a-soft); color: var(--a); border-color: var(--a); }
.btn-icon { width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0; color: var(--m); 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; }

.pl-label { font-size: 0.85rem; font-weight: 600; color: var(--m); 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: var(--pl-glow-focus); }
.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; }

.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: var(--a-soft); color: var(--a); padding-left: 20px; }

.pl-switch { position: relative; display: inline-block; width: 44px; height: 24px; vertical-align: middle; flex-shrink: 0; }
/* THE CHECKBOX IS THE HIT AREA — do not shrink it back to 0x0.
   The switch is drawn by .pl-slider, so the real <input> is transparent. It was
   previously collapsed with width:0;height:0, which left NOTHING clickable: the
   markup wraps the pair in a <span>, and a span (unlike a <label>) does not
   forward its clicks to the input it contains. Every toggle built this way was
   inert — no toggle, no change event, no console error, because a click that
   lands on a plain span is simply a click on a span.
   Stretching the input over the whole 44x24 area and lifting it above the
   slider with z-index makes the control clickable wherever it looks clickable,
   for every plugin using this pattern, with no markup change. opacity:0 still
   hit-tests (unlike visibility:hidden or display:none), and the
   'input:checked + .pl-slider' rules below are unaffected — z-index changes
   paint order, not sibling order. */
.pl-switch input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.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; z-index: 1; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .3s; border-radius: 24px; }
.pl-switch input:focus-visible + .pl-slider { outline: 2px solid var(--a); outline-offset: 2px; }
.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); }

/* ── PLATFORM CHECKBOX — the rounded tile (manifest §11-A.6, 2.60) ──────────────
   Styles EVERY <input type="checkbox"> except the switch track (.pl-switch), the
   opt-out .pl-check-native and [hidden] inputs. No class and no wrapper needed.
   :where() keeps the base at ZERO specificity, so any plugin rule that hides or
   positions a checkbox still wins. The tick is a mask, so it follows --a. */
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])){
  appearance:none;-webkit-appearance:none;margin:0;flex:none;
  display:inline-grid;place-content:center;vertical-align:middle;cursor:pointer;
  width:20px;height:20px;border:1px solid #cbd5e1;border-radius:6px;background:#f1f5f9;
  transition:background-color .12s,border-color .12s}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden]))::before{
  content:"";width:13px;height:13px;background:#fff;transform:scale(0);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.4 2.4 4.8-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.4 6.3l2.4 2.4 4.8-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):indeterminate::before{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
          mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6h6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):hover:not(:disabled){
  border-color:#94a3b8;background:#fff}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):checked,
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):indeterminate{
  background:var(--a);border-color:var(--a)}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):checked::before,
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):indeterminate::before{
  transform:scale(1)}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):focus-visible{
  outline:2px solid var(--a);outline-offset:2px}
:where(input[type="checkbox"]:not(.pl-switch input, .pl-check-native, [hidden])):disabled{
  opacity:.45;cursor:not-allowed}
/* ── /PLATFORM CHECKBOX ─────────────────────────────────────────────────────── */

.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: var(--a-soft); }
.pl-toggle.sm .pl-toggle-opt { width: 38px; padding: 0; }

.pl-ms { position: relative; display: block; }
.pl-ms-control { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 38px; }
.pl-ms-control[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.pl-ms-summary { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; overflow: hidden; }
.pl-ms-summary .pl-ms-ph { color: #94a3b8; }
.pl-ms-tag { background: var(--a-soft); color: var(--a); border-radius: 4px; padding: 2px 8px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.pl-ms-caret { color: #94a3b8; display: flex; flex-shrink: 0; }
.pl-ms-panel { margin-top: 6px; border: 1px solid var(--b); border-radius: 8px; padding: 8px; background: var(--w); display: none; }
.pl-ms-panel.open { display: block; }
.pl-ms-search { width: 100%; }
.pl-ms-list { max-height: 220px; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.pl-ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.pl-ms-opt:hover { background: var(--a-soft); color: var(--a); }
.pl-ms-opt.sel { background: var(--a-soft); }
.pl-ms-opt input { pointer-events: none; }
.pl-ms-empty { padding: 10px 8px; color: #94a3b8; font-size: 0.85rem; font-style: italic; }

.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: none; justify-content: center; align-items: center; z-index: 1000; }
.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; align-items: center; border-bottom: 1px solid var(--b); background: var(--w); padding: 0 20px; overflow-x: auto; flex-shrink: 0; }
.modal-tab { padding: 12px 16px; cursor: pointer; color: var(--m); 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; }

.pl-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--w); 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: var(--a-soft); }
.pl-table tr.selected td { border-bottom-color: #dbeafe; }

.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: color-mix(in srgb, var(--a) 6%, transparent); }
.pl-cf-th.open { background: color-mix(in srgb, var(--a) 10%, transparent); }
.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 var(--a-ring); }
.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 var(--a-ring); }
.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: var(--a-soft); 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: var(--m); font-style: italic; }
.pl-cf-dd-item.all.sel { background: transparent; color: var(--m); 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: var(--a-soft); 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), (max-width: 1140px) and (pointer: coarse) { .pl-cf-dd { left: 8px !important; right: 8px !important; width: auto; max-width: none; } }

.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); }

.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: var(--m); 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: var(--m); word-break: break-all; font-weight: 600; }

.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: var(--l); }
.pl-tag-internal { background: color-mix(in srgb, var(--info) 10%, var(--w)); color: color-mix(in srgb, var(--info) 80%, #000); border-color: color-mix(in srgb, var(--info) 30%, var(--w)); }
.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 var(--l); }

/* ===================================================================
   2.44 — SHARED UI UTILITIES
   Purely ADDITIVE: every rule below is a new opt-in class. Nothing
   here restyles an existing element, so no current plugin changes
   appearance until it opts in. Colours come from the :root tokens via
   color-mix, so they follow the theme instead of hardcoding hex --
   which is what plugins have been doing inline, badly and
   inconsistently, for want of these classes.
   =================================================================== */

/* Status badge variants. Plugins were hand-rolling
   style="background:#f0fdf4;color:#15803d;..." on every status cell. */
.pl-badge.is-success { background: color-mix(in srgb, var(--success) 12%, var(--w)); color: color-mix(in srgb, var(--success) 78%, #000); border-color: color-mix(in srgb, var(--success) 32%, var(--w)); }
.pl-badge.is-danger  { background: color-mix(in srgb, var(--error) 12%, var(--w));   color: color-mix(in srgb, var(--error) 78%, #000);   border-color: color-mix(in srgb, var(--error) 32%, var(--w)); }
.pl-badge.is-warning { background: color-mix(in srgb, var(--warning) 14%, var(--w)); color: color-mix(in srgb, var(--warning) 82%, #000); border-color: color-mix(in srgb, var(--warning) 34%, var(--w)); }
.pl-badge.is-info    { background: color-mix(in srgb, var(--info) 12%, var(--w));    color: color-mix(in srgb, var(--info) 78%, #000);    border-color: color-mix(in srgb, var(--info) 32%, var(--w)); }
.pl-badge.is-muted   { background: var(--bg); color: var(--m); border-color: var(--b); }

/* bg-green / bg-red were already in use by pl_core_role_management but
   were never defined anywhere, so those status badges have been
   rendering plain grey. Aliased rather than renamed so the existing
   markup starts working without an edit. Prefer .is-success/.is-danger
   in new code. */
.pl-badge.bg-green { background: color-mix(in srgb, var(--success) 12%, var(--w)); color: color-mix(in srgb, var(--success) 78%, #000); border-color: color-mix(in srgb, var(--success) 32%, var(--w)); }
.pl-badge.bg-red   { background: color-mix(in srgb, var(--error) 12%, var(--w));   color: color-mix(in srgb, var(--error) 78%, #000);   border-color: color-mix(in srgb, var(--error) 32%, var(--w)); }

/* Initials avatar for identity rows. */
.pl-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; background: color-mix(in srgb, var(--a) 14%, var(--w)); color: color-mix(in srgb, var(--a) 72%, #000); border: 1px solid color-mix(in srgb, var(--a) 26%, var(--w)); flex-shrink: 0; user-select: none; }
.pl-avatar.is-off { background: var(--bg); color: #94a3b8; border-color: var(--b); }

/* Identity cell: avatar + stacked primary/secondary text. */
.pl-idcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-idcell-main { font-weight: 600; color: var(--p); overflow: hidden; text-overflow: ellipsis; }
.pl-meta { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }

/* Empty states. Plugins were emitting a bare centred <td> with an
   inline colour; this gives them one shape. */
.pl-empty { text-align: center; padding: 34px 18px; color: #94a3b8; }
.pl-empty-icon { opacity: 0.35; margin-bottom: 8px; }
.pl-empty-title { font-weight: 600; color: var(--m); margin-bottom: 4px; }
.pl-empty-text { font-size: 0.85rem; max-width: 460px; margin: 0 auto; line-height: 1.5; }

/* Section grouping inside forms — replaces ad-hoc <hr> dividers. */
.pl-fieldset { border: 1px solid var(--b); border-radius: 8px; padding: 16px; margin-bottom: 16px; background: var(--w); }
.pl-fieldset-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; margin-bottom: 12px; }

/* Row of action buttons that should sit hard right in a table cell. */
.pl-rowactions { display: flex; gap: 2px; justify-content: flex-end; }
.pl-tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--b); padding-bottom: 10px; overflow-x: auto; margin-bottom: 20px; flex-shrink: 0; }
.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; }

.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: var(--a-soft); color: var(--a); gap: 6px; font-weight: 600; }
.pl-spinner { width: 16px; height: 16px; border: 2px solid var(--l); 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); } }

#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: color-mix(in srgb, var(--info) 8%, var(--w)); color: color-mix(in srgb, var(--info) 75%, #000); 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; }

.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 2rem; }
.db-card { background: var(--w); border-radius: 12px; padding: 25px; text-decoration: none; color: inherit; border: 1px solid var(--b); 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.1), 0 2px 6px 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: var(--m); margin: 0; line-height: 1.4; }
.db-fav-indicator { position: absolute; top: 10px; right: 10px; color: var(--warning); }

.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 NAVIGATION DRAWER.
   The drawer hosts the SAME markup render_sidebar_level() draws into
   #deskSidebar — groups, sub-groups, favourite stars and active state are
   identical to the desktop tree, because they are the same render. What
   differs is only how a child level is presented: the desktop opens a
   .sidebar-panel as a flyout BESIDE its parent (left:240px), which does not
   fit a phone, so here the same element becomes a full-screen cover with its
   own .panel-header — back arrow on the left, group name beside it. The back
   arrow is the only way out of a level on a touch device (there is no hover
   to leave and no click-outside to hit), so it is not decoration. */
.mobile-overlay { display: none; position: fixed; inset: 0; background: var(--p); z-index: 200; flex-direction: column; overflow: hidden; }
.mobile-overlay.open { display: flex; }
.mob-head { flex: 0 0 60px; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 0.5rem 0 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); color: white; font-weight: 700; font-size: 1.1rem; }
.mob-head-logo { display: flex; align-items: center; color: var(--a); flex-shrink: 0; }
.mob-head-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-close { color: white; background: none; border: none; cursor: pointer; padding: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 6px; }
.mobile-close:hover { background: rgba(255,255,255,0.08); }
.mob-foot { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding: 0.5rem 0; }
.mobile-overlay .menu { min-height: 0; padding: 0.5rem 0; -webkit-overflow-scrolling: touch; }
.mobile-overlay .sidebar-panel { left: 0; top: 0; bottom: 0; width: 100%; border-left: none; box-shadow: none; z-index: 210; }
.mobile-overlay .panel-header { flex: 0 0 60px; padding: 0 0.5rem; }
.mobile-overlay .panel-back-btn { padding: 10px; margin-right: 2px; }
.mobile-overlay .panel-content { min-height: 0; padding: 0.5rem 0; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px), (max-width: 1140px) and (pointer: coarse) {
    .sidebar { display: none; }
    .main { margin-left: 0 !important; }
    .fab-menu { display: flex; }
    body.has-banner .fab-menu { bottom: 68px; }
    /* Touch targets. 12px padding is a comfortable mouse row and a cramped
       thumb one; 50px is the smallest row that does not produce mis-taps
       between adjacent plugins in a long group. */
    .menu-item { padding: 14px 1.25rem; min-height: 50px; }
    .panel-header-link { font-size: 1.05rem; }
    .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; }
    /* MOBILE FULL-SCREEN POP-UP CONTRACT — §5 MODALS, §I-27-Q.
       Every dialog-style surface fills the viewport at these widths: the
       legacy .modal-box, and any plugin-owned or platform-owned overlay
       box that opts in with .pl-popup-box (confirm dialogs, prompts,
       custom overlays). .pl-popup-bg on the backdrop stops a centering
       flex parent from re-inseting the box. min-width:0 matters on the
       narrowest cover screens (Galaxy Fold folded ~344px), where an
       inherited min-width overflows the viewport horizontally. */
    .modal-box, .pl-popup-box {
        width: 100% !important; height: 100% !important;
        max-width: none !important; max-height: none !important;
        min-width: 0 !important;
        border-radius: 0 !important; margin: 0 !important;
    }
    .modal-head { border-radius: 0 !important; }
    .pl-popup-bg {
        padding: 0 !important;
        align-items: stretch !important; justify-content: stretch !important;
    }
    .pl-form-resizable { min-width: 0 !important; }

    /* GLOBAL PLUGIN SEARCH (§21) — full-screen cover surface. The box is a
       full-bleed column (sticky query row + scrolling list), not a centred
       dialog, so it does not use the .pl-popup-bg / .pl-popup-box opt-in;
       it fills the viewport directly at the SAME breakpoint. */
    .pl-gsearch[data-open="1"] { position: fixed; inset: 0; z-index: 9500; background: var(--w); display: flex; flex-direction: column; align-items: stretch; }
    .pl-gsearch[data-open="1"] .pl-gsearch-toggle { display: none; }
    .pl-gsearch[data-open="1"] .pl-gsearch-field { width: 100%; padding: 12px 14px; gap: 8px; border-bottom: 1px solid var(--b); }
    .pl-gsearch[data-open="1"] .pl-gsearch-input { flex: 1 1 auto; width: auto; min-width: 0; height: 40px; margin: 0; padding: 0 12px; }
    .pl-gsearch[data-open="1"] .pl-gsearch-clear { position: static; transform: none; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--b); }
    .pl-gsearch[data-open="1"] .pl-gsearch-close { display: flex; }
    .pl-gsearch[data-open="1"] .pl-gsearch-box { display: flex; position: static; width: auto; max-height: none; flex: 1 1 auto; border: 0; border-radius: 0; box-shadow: none; }
    .pl-gsearch[data-open="1"] .pl-gsearch-item { padding: 14px 12px; }

    .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: var(--w); margin-bottom: 10px; border-radius: 8px; padding: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid var(--l); }
    .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%; }

    /* .pl-mp-pane geometry. min-width:0 is load-bearing: panes carry a
       320px floor (confirms 360px) that width:100% does NOT defeat, and
       both overflow a folded Fold cover screen (~344px). pl_sys_minipane
       re-states the confirm case at higher specificity because this rule
       cannot outrank its .pl-mp-centered top/left — see its MOBILE block. */
    [data-pl-mp-id], .pl-mp-pane {
        position: fixed !important;
        left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important;
        width: 100% !important; max-width: 100% !important;
        height: 100% !important; max-height: 100% !important;
        min-width: 0 !important;
        transform: none !important; border-radius: 0 !important;
    }
}

.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: var(--a-soft); color: var(--a); }
.pl-search-select-option.selected { font-weight: 600; color: var(--a); }
.pl-search-select-option.active { background: var(--a-soft); color: var(--a); }
.pl-search-select-empty { padding: 10px 14px; color: #94a3b8; font-size: 0.85rem; font-style: italic; }

.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: var(--m); 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: var(--a-soft); 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: var(--l); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--m); }
.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; }

.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); }

/* §11-A.5 — FIELD HELP & VALIDATION (platform-global). Plugins write NO CSS
   for help buttons, required markers or validation states — these classes and
   the two glow vars are the single implementation. */
:root {
    --pl-glow-focus: 0 0 0 3px color-mix(in srgb, var(--a) 15%, transparent);
    --pl-glow-error: 0 0 0 3px rgba(239, 68, 68, 0.18);
    --pl-glow-error: 0 0 0 3px color-mix(in srgb, var(--error) 18%, transparent);
}
.pl-help { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; margin-left: 4px; vertical-align: middle; border: none; background: none; color: #94a3b8; cursor: pointer; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.pl-help:hover { color: var(--a); background: var(--a-soft); }
.pl-help svg { width: 14px !important; height: 14px !important; }
.pl-req { color: var(--error); font-weight: 700; margin-left: 2px; }
/* One shadow shape for focus and error — the glow means "this field wants
   attention", the colour says why. Element-agnostic so it also covers
   plugin-local input classes (e.g. minipane-hosted forms). */
input.pl-invalid, select.pl-invalid, textarea.pl-invalid, .pl-invalid[contenteditable] { border-color: var(--error) !important; box-shadow: var(--pl-glow-error) !important; }
.pl-field-msg { display: none; font-size: 0.75rem; color: var(--error); margin-top: 4px; line-height: 1.4; }
.pl-field-msg.show { display: block; }
.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: var(--l); 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; }

.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; }
/* Language picker on the login screen — pinned INSIDE the card, top-right,
   sitting in the box's own padding. An unauthenticated visitor gets no top bar,
   so this is the only chrome on the page and it belongs to the card, not the
   page around it.
   .lang-dd.auth-lang, not .auth-lang: the shared .lang-dd rule below declares
   position:relative and would otherwise win on source order at equal
   specificity, which drops the picker back into the flex flow beside the box. */
.lang-dd.auth-lang { position: absolute; top: 14px; right: 14px; z-index: 5; padding: 7px; border-radius: 8px; transition: background 0.15s; }
.lang-dd.auth-lang:hover { background: #f1f5f9; }
.lang-dd.auth-lang svg { width: 18px; height: 18px; }

/* Brand row: mark then name, on one line. */
.auth-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 1.75rem; }
.auth-head .auth-mark { color: var(--a); display: flex; align-items: center; flex-shrink: 0; }
.auth-head .auth-mark svg,
.auth-head .auth-mark img { display: block; max-height: 32px; width: auto; }
.auth-head h2 { margin: 0; color: var(--p); font-size: 1.5rem; line-height: 1.2; }

@media (max-width: 600px) { .auth-box { width: 100%; max-width: 350px; } }
.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: var(--w); 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: var(--a-soft); 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: var(--m); text-decoration: none; box-sizing: border-box; transition: left 0.3s ease; }
.footer-banner svg { display: block; flex-shrink: 0; color: var(--m); }
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 { 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; }

.pl-form-resizable {
    resize: both;
    overflow: auto;
    min-width: 320px;
    min-height: 240px;
    max-width: 100vw;
    max-height: 90vh;
}
@media (max-width: 768px), (max-width: 1140px) and (pointer: coarse) {
    .pl-form-resizable { resize: none; width: 100%; max-width: 100%; }
}

.pl-search {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 38px;
}

.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, var(--l));
    border-right: 0;
    border-radius: 6px 0 0 6px;
}
.pl-search-icon svg { width: 16px; height: 16px; display: block; }

.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%;
}

.pl-search-input:not(.has-icon) {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    border-left: 1px solid var(--b, var(--l)) !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; }

.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; }
}

/* ── Home dashboard (§4-C) ── */
/* HERO SECTION */
.dash-hero { background: var(--w); padding: 3rem; border-radius: 16px; border: 1px solid var(--l); display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 2rem; }
.hero-content { max-width: 600px; position: relative; z-index: 2; }
.hero-content h1 { margin: 0 0 1rem 0; font-size: 2.2rem; color: var(--p); font-weight: 800; letter-spacing: -0.02em; }
.hero-content p { color: var(--m); font-size: 1.1rem; line-height: 1.6; margin-bottom: 0; }

.hero-visual { width: 300px; height: 150px; position: relative; opacity: 0.8; }
.block-anim { position: absolute; background: var(--a); opacity: 0.1; border-radius: 12px; animation: float 6s ease-in-out infinite; }
.b1 { width: 80px; height: 80px; top: 10px; right: 40px; }
.b2 { width: 60px; height: 60px; bottom: 10px; right: 100px; animation-delay: 1s; opacity: 0.2; }
.b3 { width: 40px; height: 40px; top: 40px; right: 180px; animation-delay: 2s; opacity: 0.15; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }

/* WIDGET AREA */
.widget-area { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
.widget-container { background: var(--w); border-radius: 12px; border: 1px solid var(--l); padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

@media (max-width: 900px) {
    .dash-hero { flex-direction: column; text-align: center; padding: 2rem; }
    .hero-visual { display: none; }
    .hero-content { max-width: 100%; }
}

/* ── Shell markup classes (3.05: were inline styles in index.php) ── */
.toast-text { flex: 1; }
.lang-ico { color: var(--t); opacity: 0.7; display: flex; }
.auth-lang .lang-ico { opacity: 0.6; }
.auth-err { background: color-mix(in srgb, var(--error) 12%, var(--w)); color: color-mix(in srgb, var(--error) 78%, #000); padding: 10px; border-radius: 4px; font-size: 0.9rem; margin-bottom: 1rem; text-align: center; }
.auth-label { font-size: 0.85rem; font-weight: 600; display: block; margin-bottom: 5px; }
.auth-box .d-ctrl { margin-bottom: 1rem; }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--m); margin-bottom: 1rem; cursor: pointer; }
.auth-remember input { margin: 0; cursor: pointer; }
.auth-note { font-size: 0.9rem; color: var(--m); }
.brand-logo { display: flex; align-items: center; color: var(--a); }
.menu-item.menu-logout { color: #fca5a5; }
.top-item.top-btn { background: none; border: none; cursor: pointer; position: relative; }
.pl-shell-alert { margin-bottom: 20px; align-items: flex-start; }
.pl-shell-alert-body { flex: 1; min-width: 0; }
.pl-shell-alert-line { margin-top: 6px; }
.pl-shell-alert-code { margin-top: 6px; overflow-x: auto; }
.pl-shell-alert-code code { white-space: nowrap; }
.menu-fav, .menu-chev { margin-left: auto; }
.menu-fav { color: var(--warning); }
.menu-chev { opacity: 0.5; }
.pl-org-logo { max-height: 30px; max-width: 120px; object-fit: contain; }
.db-card.db-card-group { background: var(--bg); border-style: dashed; }
.db-card-group .db-icon { background: var(--l); color: var(--m); }

/* ===================================================================
   3.06 — SHARED BUILDING BLOCKS (first user: pl_org_vaults 3.6.0)
   RULE (master §11 CSS): plugins ship no <style> block and no inline
   style="" for layout. Every class lives in this file, generic (pl-
   prefix) so the next plugin reuses it. Reuse an existing class before
   adding one; add only what is genuinely missing, here, under a short
   heading. A class only one plugin uses carries a "used by: pl_x" note
   in its heading; delete the note when a second plugin uses it.
   =================================================================== */

/* Small utilities */
.pl-spacer { flex: 1 1 auto; min-width: 0; }
.pl-block { display: block; }
.pl-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.pl-pre { white-space: pre-wrap; }
.pl-mask { letter-spacing: 3px; color: var(--m); user-select: none; }
.pl-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.pl-file-name, .pl-file-info { display: block; }
.btn-icon.is-copied, .btn-icon.is-copied svg { color: var(--success); }
/* Conditional clear-filter control: keeps its slot, shows with data-on="1" (§11-D.2). */
.pl-clear[data-on="0"] { visibility: hidden; }
.d-toolbar-search.is-wide { width: min(480px, 100%); }
.d-toolbar-search > .pl-search { flex: 1 1 auto; min-width: 0; }

/* Pop-up sizes and the layer above other pop-ups (confirmations). */
.modal-box.is-narrow { max-width: 440px; }
.modal-box.is-mid { max-width: 640px; height: 82vh; }
.modal-box.is-wide { max-width: 720px; height: 90vh; }
.modal-bg.is-top { z-index: 1100; }
.modal-body > .pl-panel { flex: none; overflow: visible; }   /* the body is the one scroll region */

/* Lines inside a card or pop-up: icon · text · meta · actions */
.pl-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--l); font-size: 0.88rem; }
.pl-line:last-child { border-bottom: 0; }
.pl-line > svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--m); }
.pl-fieldset-head > svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }
.pl-enc-badge { display: inline-flex; align-items: center; color: var(--m); margin-right: 5px; vertical-align: middle; }
.pl-enc-badge svg { width: 14px; height: 14px; }

/* Key / value rows: label · value · actions (secrets, credentials, facts) */
.pl-kv { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 0.85rem; white-space: normal; }
.pl-kv-k { flex: 0 0 92px; color: var(--m); }
.pl-kv-v { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--p); }
.pl-kv-v a, .pl-meta a { color: var(--a); }
.pl-kv-acts { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.pl-kv-acts .btn-icon, .pl-sp-card-acts .btn-icon { width: 30px; height: 30px; }

/* Compact cards and rows: short label or an icon as label, the value on one
   line (full value in its title), two facts side by side in a wide pane.
   used by: pl_org_vaults (PL_VaultCard, also shown in pl_tools_infrastructure) */
.pl-sp-card.is-compact { padding: 8px 12px; gap: 2px; container-type: inline-size; }
.pl-sp-card.is-compact .pl-sp-card-head { min-height: 30px; }
.pl-kv-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 14px; }
@container (min-width: 520px) { .pl-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pl-kv.is-compact { min-height: 28px; gap: 4px; flex-wrap: nowrap; }
.pl-kv.is-compact .pl-kv-k { flex: 0 0 36px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.pl-kv.is-compact .pl-kv-k svg { width: 15px; height: 15px; vertical-align: -3px; }
.pl-kv.is-compact .pl-kv-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.pl-kv.is-compact .pl-kv-v[data-shown="1"] { white-space: normal; overflow-wrap: anywhere; }
.pl-kv.is-compact .pl-kv-acts .btn-icon { width: 28px; height: 28px; }

/* Tree / structure list: rows with caret · icon · label (+ sub line) · meta · actions */
.pl-tree { display: flex; flex-direction: column; gap: 2px; max-width: 720px; }
.pl-tree-group { display: flex; align-items: center; gap: 6px; margin: 18px 0 4px; padding: 0 8px; min-height: 30px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.pl-tree-group:first-child { margin-top: 0; }
.pl-tree-node { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--t); outline: none; }
.pl-tree-node:hover, .pl-tree-node:focus-visible { background: var(--a-soft); }
.pl-tree-node.is-active { background: color-mix(in srgb, var(--a) 12%, var(--w)); color: var(--a); font-weight: 600; }
.pl-tree-node.is-drop { outline: 2px dashed var(--a); outline-offset: -2px; }
.pl-tree-node.is-dragging, .pl-sp-card.is-dragging { opacity: 0.45; }
.pl-tree-caret { flex: 0 0 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }
.pl-tree-icon { flex-shrink: 0; display: inline-flex; color: var(--m); }
.pl-tree-node.is-active .pl-tree-icon { color: var(--a); }
.pl-tree-caret svg, .pl-tree-icon svg { width: 16px; height: 16px; }
.pl-tree-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tree-sub { display: block; font-size: 0.75rem; font-weight: 400; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; }
.pl-tree-acts { display: flex; gap: 2px; flex-shrink: 0; opacity: 0.55; transition: opacity 0.15s; }
.pl-tree-node:hover .pl-tree-acts, .pl-tree-node:focus-within .pl-tree-acts, .pl-tree-node.is-active .pl-tree-acts { opacity: 1; }
.pl-tree-acts .btn-icon, .pl-tree-group .btn-icon { width: 30px; height: 30px; }
.pl-tree-children { margin-left: 18px; padding-left: 6px; border-left: 1px solid var(--l); }

/* Side pane extras: folder chips as buttons, empty state with icon */
button.pl-sp-chip { border: 0; cursor: pointer; font: inherit; font-size: 0.78rem; }
button.pl-sp-chip:hover { color: var(--a); background: var(--a-soft); }
.pl-sp-nav { margin-bottom: 12px; }
.pl-sp-list-empty svg { width: 28px; height: 28px; opacity: 0.5; }
.pl-sp-list-empty p { margin: 8px 0 12px; }

/* Gate card: one thing must happen before the page can be used */
.pl-gate { max-width: 520px; margin: 30px auto; text-align: center; background: var(--w); border: 1px solid var(--b); border-radius: 10px; padding: 28px 24px; }
.pl-gate > svg { width: 34px; height: 34px; color: var(--a); }
.pl-gate h3 { margin: 10px 0 8px; font-size: 1.05rem; color: var(--p); }
.pl-gate p { font-size: 0.85rem; color: var(--m); line-height: 1.55; margin: 0 0 14px; }

@media (max-width: 768px), (max-width: 1140px) and (pointer: coarse) {
    .pl-tree { max-width: none; }
    .pl-tree-node { min-height: 48px; }
    .pl-tree-acts { opacity: 1; }
    .pl-kv { flex-wrap: wrap; }
    .pl-table.is-stack tr { grid-template-columns: 1fr; }   /* phone cards: one cell per line, no 50px first column */
    .pl-kv-k { flex-basis: 72px; }
    .pl-gate { margin: 12px auto; }
    .pl-sp-card-title { white-space: normal; }
}


/* ── Top bar on phones (2026-11-25): search, the window dock and the bell stay; every other top entry,
      the languages and Logout move into the "⋯" menu (.top-more), with their names. ── */
.top-more { position: relative; display: none; align-items: center; }
.top-more-lst { display: none; position: absolute; right: 0; top: 100%; margin-top: 10px; min-width: 230px; max-width: calc(100vw - 24px);
    max-height: calc(100vh - 90px); overflow-y: auto; background: var(--w); border: 1px solid var(--b); border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15); z-index: 200; padding: 6px 0; }
.top-more.open .top-more-lst { display: block; }
.top-more-it { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; color: var(--t); text-decoration: none; font-size: 0.95rem; }
.top-more-it svg { width: 20px; height: 20px; flex: none; opacity: 0.75; }
.top-more-it:hover { background: #f1f5f9; }
.top-more-it.active { color: var(--a); font-weight: 600; background: var(--a-soft); }
.top-more-it.active svg { opacity: 1; }
.top-more-h { margin-top: 6px; padding: 10px 16px 4px; border-top: 1px solid var(--b); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; }
.top-more-h:empty { padding: 0; }
@media (max-width: 768px), (max-width: 1140px) and (pointer: coarse) {
    .top-more { display: flex; }
    .top-right { gap: 4px; }
    .top-right > a.top-item:not(.top-keep), .top-right > #langDD { display: none; }
    .top-right > .top-item, .top-more-btn { min-width: 42px; height: 42px; justify-content: center; }
}
