/* ================================================================
   admin-inline.css — extracted verbatim from html/admin.html's inline
   <style> block on 30 October 2026 (the parked sweep of 29 October,
   redone on the page as it then stood). Moves only: no selector, property
   or value was changed. The page links this sheet exactly where the block
   stood, so the cascade is unchanged.
   ================================================================ */

        /* ── Admin-specific styles ── */
        .admin-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.875rem;
        }
        .admin-table th {
            text-align: left;
            padding: 0.6rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border);
        }
        .admin-table td {
            padding: 0.75rem;
            border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
            vertical-align: top;
        }
        .admin-table tbody tr:last-child td {
            border-bottom: none;
        }
        .admin-table tbody tr:hover td {
            background: color-mix(in srgb, var(--accent) 4%, transparent);
        }
        .admin-table a {
            color: var(--accent);
            text-decoration: none;
        }
        .admin-table a:hover {
            text-decoration: underline;
        }
        /* A table wider than a phone scrolls in its own box; the page's
           container clips, so the System table's State column was cut off. */
        #requests-wrap, #users-wrap, #orgs-wrap, #usage-wrap, #system-wrap, #audit-wrap, #lessons-wrap {
            overflow-x: auto;
        }
        .admin-message {
            max-width: 280px;
            color: var(--text-secondary);
            font-size: 0.82rem;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .admin-date {
            white-space: nowrap;
            color: var(--text-secondary);
            font-size: 0.82rem;
            font-family: var(--font-mono, monospace);
        }
        .admin-actions {
            white-space: nowrap;
        }
        .admin-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.35rem 0.85rem;
            border: none;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.15s, transform 0.1s;
        }
        .admin-btn:hover { opacity: 0.85; transform: translateY(-1px); }
        .admin-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
        .admin-btn--approve {
            background: #15803d; /* white on #22c55e was 2.3:1 */
            color: #fff;
            margin-right: 0.4rem;
        }
        .admin-btn--reject {
            background: color-mix(in srgb, #ef4444 15%, transparent);
            color: #ef4444;
            border: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
        }
        .admin-empty {
            padding: 2.5rem 1rem;
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        .admin-empty i { font-size: 1.1em; color: #22c55e; }
        .admin-empty--error { color: #ef4444; }
        .admin-empty--error i { color: #ef4444; }
        .admin-loading {
            padding: 2rem 1rem;
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }
        .tab-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.25rem;
            height: 1.25rem;
            padding: 0 0.3rem;
            border-radius: 99px;
            background: var(--accent);
            color: #1a1208;
            font-size: 0.7rem;
            font-weight: 700;
            margin-left: 0.4rem;
        }
        .admin-tab-content { display: none; }
        .admin-tab-content.active { display: block; }
        .admin-subhead { margin: 2rem 0 0.5rem; font-size: 1rem; }
        .admin-warn { color: var(--warning); font-weight: 600; }
        .admin-section-info {
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 1.25rem;
            line-height: 1.5;
        }

        /* ── Companies ── */
        /* The unassigned badge is amber, not the accent: it counts people who
           are waiting on the moderator, not items that merely exist. */
        .tab-badge--warn { background: #f59e0b; color: #241802; }
        .admin-newco {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }
        .admin-newco input {
            flex: 0 1 22rem;
            min-width: 0;
            padding: 0.45rem 0.7rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.85rem;
        }
        /* ── Disputes (admin-disputes.js), and the quiet days (admin-blindspots.js) ── */
        .admin-dispute {
            border: 1px solid var(--border);
            border-radius: 10px;
            margin-bottom: 1rem;
            overflow: hidden;
        }
        .admin-dispute--open { border-color: #f59e0b; }
        .admin-dispute-head {
            display: flex;
            flex-wrap: wrap;
            align-items: baseline;
            gap: 0.6rem;
            padding: 0.85rem 1rem;
            background: color-mix(in srgb, var(--accent) 5%, transparent);
        }
        .admin-dispute-link { margin-left: auto; font-size: 0.8rem; }
        .admin-dispute-body, .admin-dispute-answer { padding: 0.6rem 1rem; font-size: 0.85rem; line-height: 1.5; }
        .admin-dispute-answer { border-top: 1px solid var(--border); }
        .admin-dispute-line, .admin-dispute-answer p { margin: 0.2rem 0; overflow-wrap: anywhere; }
        .admin-dispute-evidence { margin: 0.2rem 0 0.4rem; padding-left: 1.2rem; }
        .admin-dispute-reply { white-space: pre-line; }
        .admin-dispute-reply-input {
            display: block;
            width: 100%;
            box-sizing: border-box;
            margin-bottom: 0.5rem;
            padding: 0.4rem 0.5rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.85rem;
        }
        .admin-dispute-answer .admin-org-tools { margin-left: 0; }

        .admin-org {
            border: 1px solid var(--border);
            border-radius: 10px;
            margin-bottom: 1rem;
            overflow: hidden;
        }
        /* Wraps on a phone: the tools ran past the box's clipped edge, and
           the company delete — whose panel opens under this row — was out of
           reach there. */
        .admin-org-head {
            display: flex;
            flex-wrap: wrap;
            align-items: baseline;
            gap: 0.6rem;
            padding: 0.85rem 1rem;
            background: color-mix(in srgb, var(--accent) 5%, transparent);
        }
        .admin-org-name {
            font-weight: 600;
            font-size: 0.95rem;
        }
        .admin-org-count {
            font-size: 0.78rem;
            color: var(--text-secondary);
        }
        /* Pushed to the right so the destructive one is never next to the
           company name it would destroy. */
        .admin-org-tools {
            margin-left: auto;
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .admin-btn--quiet {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }
        /* What deleting or merging away a company takes (admin-ui.js,
           footprintPanel): under the header, before anything else in the
           box, so it is read before the button that ends the company. */
        .admin-footprint {
            padding: 0.85rem 1rem;
            border-top: 1px solid color-mix(in srgb, #ef4444 30%, transparent);
            background: color-mix(in srgb, #ef4444 5%, transparent);
            font-size: 0.85rem;
        }
        .admin-footprint p { margin: 0 0 0.4rem; }
        .admin-footprint-title { font-weight: 600; }
        .admin-footprint .admin-footprint-heading { font-weight: 600; margin-top: 0.6rem; }
        .admin-footprint-list {
            margin: 0 0 0.4rem;
            padding-left: 1.2rem;
            font-variant-numeric: tabular-nums;
        }
        .admin-footprint-note { color: var(--text-secondary); }
        .admin-footprint-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 0.6rem;
        }
        .admin-footprint-name {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-wrap: wrap;
            color: var(--text-secondary);
            font-size: 0.8rem;
        }
        .admin-footprint-actions select,
        .admin-footprint-name input { max-width: 100%; min-width: 0; }
        .admin-org .admin-table th { font-size: 0.7rem; }
        /* A box's table scrolls in a .table-scroll (admin-ui.js, scrollBox);
           its shared 1rem gap would open under the box's header row. */
        .admin-org .table-scroll,
        .admin-unassigned .table-scroll { margin-top: 0; }
        /* Below the member list, separated: adding somebody is a different act
           from editing who is already here. */
        .admin-org-add {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            padding: 0.7rem 1rem;
            border-top: 1px solid var(--border);
        }
        .admin-org-add select { max-width: 22rem; }
        .admin-org-empty {
            padding: 1rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        /* ── Teelten (admin-crops.js): a stage's fields, each named above it ── */
        .admin-crop-field {
            display: inline-flex;
            flex-direction: column;
            gap: 0.15rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        /* A limit's cell holds a number, not a sentence. */
        .admin-crop-num { width: 5.5rem; }
        .admin-role-select {
            padding: 0.25rem 0.4rem;
            border-radius: 5px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.78rem;
        }
        /* ── Usage ── */
        /* Counts are compared down a column, which is the only reason anyone
           reads them here. */
        .admin-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
        .admin-rate {
            display: inline-block;
            padding: 0.1rem 0.45rem;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 600;
        }
        /* Semantic, not the accent: this is a state to act on, not a highlight.
           Below a fifth rated, the company's model has nothing to learn from. */
        .admin-rate--good { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
        .admin-rate--ok   { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #f59e0b; }
        .admin-rate--low  { background: color-mix(in srgb, #ef4444 18%, transparent); color: #ef4444; }

        /* Onboarding: the furthest milestone reached, not true drop-off — this
           product tracks no event for a step that was started and abandoned. */
        .admin-onboarding { display: flex; gap: 0.3rem; white-space: nowrap; }
        .admin-onb-chip {
            padding: 0.1rem 0.4rem;
            border-radius: 999px;
            font-size: 0.7rem;
            font-weight: 600;
            background: color-mix(in srgb, #94a3b8 16%, transparent);
            color: #94a3b8;
        }
        .admin-onb-chip--done { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }

        /* ── Activity ── */
        /* The counts are the point of a merge entry and they are long, so this
           column wraps and everything else stays on one line. */
        .admin-audit-detail {
            color: var(--text-secondary);
            font-size: 0.8rem;
            max-width: 32rem;
        }
        .admin-unassigned {
            border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent);
            border-radius: 10px;
            margin-bottom: 1.5rem;
            overflow: hidden;
        }
        .admin-unassigned .admin-org-head {
            background: color-mix(in srgb, #f59e0b 10%, transparent);
        }
