/* Phase 1 shell extras: user menu, Ctrl+K palette, keyboard hint, helpers, mobile card tables. */
.search { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface-solid); color: var(--text-muted);
    font: inherit; text-align: left; cursor: pointer; }
.search span { flex: 1; }
kbd { font: inherit; font-size: 12px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-muted); }
.menu-wrap { position: relative; }
.avatar { border: 0; cursor: pointer; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px;
    display: none; z-index: 60; }
.menu-wrap.open .dropdown { display: block; animation: rise 0.25s both; }
.dropdown__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown__head small { display: block; color: var(--text-muted); }
.dropdown__item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0;
    background: transparent; color: var(--text); font: inherit; border-radius: 10px; cursor: pointer; text-align: left; }
.dropdown__item:hover { background: rgba(22, 163, 74, 0.08); }
.palette-search { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--surface-solid); margin-bottom: 10px; }
.palette-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.palette-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; display: grid; gap: 4px; }
.palette-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette-list li small { margin-left: auto; color: var(--text-muted); }
.palette-list li.is-sel, .palette-list li:hover { background: rgba(22, 163, 74, 0.12); }
.palette-empty { color: var(--text-muted); cursor: default !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field__hint { display: block; margin: -10px 4px 0; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.checklist a { color: inherit; text-decoration: none; flex: 1; }
.checklist a:hover { color: var(--brand-700); }
.json { background: var(--bg); border-radius: 10px; padding: 10px; overflow: auto; font-size: 12px;
    max-height: 200px; margin: 6px 0 10px; white-space: pre-wrap; word-break: break-word; }
details summary { cursor: pointer; color: var(--brand-700); font-weight: 600; }
.empty { text-align: center; color: var(--text-muted); padding: 24px; }
.role-matrix .table th { font-size: 11px; }
.table-wrap { -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
    .search span, kbd { display: none; }
}

/* Mobile: tables become card lists (labels come from data-label). */
@media (max-width: 720px) {
    .table-wrap { border: 0; background: transparent; overflow: visible; max-height: none; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { margin-bottom: 10px; padding: 12px; border-radius: var(--radius-md);
        background: var(--surface-solid); border: 1px solid var(--border); }
    .table td { border: 0; padding: 6px 0; }
    .table td.actions { text-align: left; }
    .table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px;
        text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 2px; }
    .table td.actions::before { content: none; }
    .table .icon-btn { min-width: 44px; min-height: 44px; }
    .dropdown { right: -4px; }
    .icon-btn, .btn { min-height: 44px; }
    .tabs { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .menu-wrap.open .dropdown { animation: none; }
}
