@import '_content/Kimio.UI/Kimio.UI.96fr1p36h5.bundle.scp.css';

/* /Components/AdminAvatar.razor.rz.scp.css */
/*
    The shared person roundel (ADMIN4 #1036). One circular chip — image-or-initials — in two sizes, so the top-bar
    operator, the Users-list rows, and the drill-in head are identical. Colours come from the theme-aware tokens in
    app.css. Replaces the former three hand-rolled classes (.whoami .picture, .mini-picture, .identityhead .big).
*/
.admin-avatar[b-og6gudmsp1] {
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
    overflow: hidden; /* clip the image to the circle */
    flex: none;
}

.admin-avatar img[b-og6gudmsp1] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.admin-avatar--small[b-og6gudmsp1] {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.admin-avatar--large[b-og6gudmsp1] {
    width: 40px;
    height: 40px;
    font-size: 17px;
}
/* /Components/AdminTable/AdminTable.razor.rz.scp.css */
/*
    Isolated styles for the reusable AdminTable (ADMIN4 #1036). The table/toolbar/chip base styles are shared
    verbatim from app.css; this file adds only what the component introduces — sortable header links, the
    drag-to-resize handle, the column menu, hidden-column state, and the pager. Design tokens come from the
    shared kimio-design.css (theme-aware).
*/

.admin-table[b-eyeztn49f4] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* A drill-in table already inside a card drops its own frame so the chrome does not double up. */
.tablewrap.bare[b-eyeztn49f4] {
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
}

/* Sortable header link: the label + a sort arrow, sitting beside the resize handle. */
[b-eyeztn49f4] thead th {
    position: relative;
}

[b-eyeztn49f4] .col-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

[b-eyeztn49f4] .col-sort:hover {
    color: var(--accent);
}

[b-eyeztn49f4] .sort-arrow {
    font-size: 9px;
    color: var(--accent);
    line-height: 1;
}

/* Drag-to-resize handle on the right edge of each header cell (wired by admintable.js). */
[b-eyeztn49f4] .col-resize {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
}

[b-eyeztn49f4] .col-resize:hover,
[b-eyeztn49f4] .col-resize.resizing {
    background: var(--accent-soft);
}

/* A column hidden via the column menu (JS also toggles inline display, this covers the initial DefaultHidden). */
[b-eyeztn49f4] .col-hidden {
    display: none;
}

/* Column show/hide menu. */
.col-menu[b-eyeztn49f4] {
    position: relative;
}

.col-menu > summary[b-eyeztn49f4] {
    list-style: none;
}

.col-menu > summary[b-eyeztn49f4]::-webkit-details-marker {
    display: none;
}

.col-menu-panel[b-eyeztn49f4] {
    position: absolute;
    right: 0;
    z-index: 20;
    margin-top: 4px;
    min-width: 170px;
    background: var(--panel);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.col-menu-panel label[b-eyeztn49f4] {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--ink);
    padding: 4px 6px;
    border-radius: 5px;
    cursor: pointer;
}

.col-menu-panel label:hover[b-eyeztn49f4] {
    background: var(--panel-2);
}

.contains-toggle[b-eyeztn49f4] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ink-3);
    cursor: pointer;
}

/* Collapsable per-column filter panel (item 5): hidden until the toolbar "Filters" toggle — or an applied
   filter — opens it (the `filters-open` class, set server-side when active and flipped by admintable.js). */
.filter-panel[b-eyeztn49f4] {
    display: none;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 12px;
    background: var(--panel-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
}

.admin-table.filters-open .filter-panel[b-eyeztn49f4] {
    display: flex;
}

.filter-fields[b-eyeztn49f4] {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 1 1 auto;
}

.filter-field[b-eyeztn49f4] {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label[b-eyeztn49f4] {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-3);
}

.filter-input[b-eyeztn49f4] {
    font: inherit;
    font-size: 13px;
    padding: 5px 8px;
    background: var(--panel);
    border: 1px solid var(--line-2);
    border-radius: 6px;
    color: var(--ink);
    min-width: 140px;
    max-width: 100%;
}

.filter-input:focus[b-eyeztn49f4] {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
    border-color: var(--accent);
}

.filter-daterange[b-eyeztn49f4] {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-daterange .filter-input[b-eyeztn49f4] {
    min-width: 130px;
}

.filter-daterange .dash[b-eyeztn49f4] {
    color: var(--ink-3);
}

/* The general search sits at the head of the panel (Option 1) — a touch wider, with its contains toggle inline. */
.filter-field--search .filter-input[b-eyeztn49f4] {
    min-width: 200px;
}

.filter-search-row[b-eyeztn49f4] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-actions[b-eyeztn49f4] {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* The toolbar "Filters" toggle, highlighted when at least one per-column filter is applied. */
.btn.active[b-eyeztn49f4] {
    border-color: var(--accent);
    color: var(--accent);
}

/* Empty state row. */
[b-eyeztn49f4] .table-empty {
    text-align: center;
    padding: 18px;
    color: var(--ink-3);
    font-size: 13px;
}

/* Pager. */
.pager[b-eyeztn49f4] {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pager-range[b-eyeztn49f4] {
    color: var(--ink-3);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.pager .disabled[b-eyeztn49f4] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* A focused navigable row (keyboard Enter opens it — admintable.js). */
[b-eyeztn49f4] tbody tr[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* ── Row overflow menu ("…") ────────────────────────────────────────────────
   The per-row related-entity + actions menu (ADMIN3 #1008). A native <details>
   so it works under static SSR with no circuit; the panel is absolutely
   positioned inside a position:relative cell, so it floats over the rows
   beneath rather than stretching the row height. */
.admin-table col.row-actions-col[b-eyeztn49f4] { width: 44px; }
.admin-table th.row-actions-head[b-eyeztn49f4] { width: 44px; }
.admin-table td.row-actions-cell[b-eyeztn49f4] { position: relative; text-align: right; overflow: visible; }
/* Only lift the wrapper's clipping while a menu is actually open, so a wide table keeps its horizontal
   scrolling the rest of the time (an unconditional `overflow: visible` would remove it entirely). */
.admin-table .tablewrap:has(details[data-row-menu][open])[b-eyeztn49f4] { overflow: visible; }

.row-menu[b-eyeztn49f4] { display: inline-block; }
.row-menu > summary[b-eyeztn49f4] {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
}
.row-menu > summary[b-eyeztn49f4]::-webkit-details-marker { display: none; }
.row-menu > summary:hover[b-eyeztn49f4] { background: var(--panel-2); color: var(--ink); }
.row-menu[open] > summary[b-eyeztn49f4] { border-color: var(--accent); color: var(--accent); background: var(--panel-2); }

.row-menu-panel[b-eyeztn49f4] {
  position: absolute;
  right: 6px;
  top: calc(100% - 4px);
  z-index: 40;
  min-width: 208px;
  padding: 6px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgb(0 0 0 / 45%);
}
.row-menu-head[b-eyeztn49f4] {
  padding: 6px 10px 4px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.row-menu-item[b-eyeztn49f4] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.row-menu-item:hover[b-eyeztn49f4] { background: var(--panel-2); }
.row-menu-item.danger[b-eyeztn49f4] { color: var(--crit); }
.row-menu-item.danger:hover[b-eyeztn49f4] { background: color-mix(in srgb, var(--crit) 16%, transparent); }
.row-menu-icon[b-eyeztn49f4] { width: 16px; text-align: center; color: var(--ink-3); }
.row-menu-label[b-eyeztn49f4] { flex: 1; }
.row-menu-go[b-eyeztn49f4] { color: var(--ink-3); font-size: 11px; }
.row-menu-form[b-eyeztn49f4] { margin: 0; }
/* /Components/Pages/UserDetail.razor.rz.scp.css */
/* Styles for the inline per-row role editor on the user drill-in's roles table. Colocated (CSS isolation) rather
   than added to the global stylesheet: these rules belong to this component's markup alone, and the global sheet is
   reserved for the design system's tokens, resets and shared primitives (ADMIN3 review #17). */
.row-role-form[b-13yq5eoqbe] { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.row-role-select[b-13yq5eoqbe] {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
