/* static/sharing_audit.css — table + badges for the sharing auditor.
 * Layered on sync.css (which provides the lk-* light-theme shell). */

.sa-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0; }
.sa-controls input[type="text"], .sa-controls input[type="search"] { flex: 1 1 220px; }
.sa-controls select { min-width: 130px; }
.sa-controls label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }

.sa-meta { font-size: 0.88rem; color: #555; margin: 8px 0 4px; }

#tableWrap { overflow-x: auto; }

.sa-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sa-table th, .sa-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
.sa-table thead th { position: sticky; top: 0; background: #fafafa; font-weight: 600; }
.sa-table tbody tr:hover { background: #fcf7f4; }
.sa-type { color: #888; font-size: 0.8rem; text-transform: lowercase; }

.sa-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 1px 7px;
    border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.sa-ext { background: #fde7dd; color: #b23c10; }
.sa-int { background: #e7f0e9; color: #2f6b45; }

/* Person-grouped rows: a bold header per collaborator, indented item rows. */
.sa-person td { background: #f7f4f1; font-weight: 600; border-top: 2px solid #eee; }
.sa-count { font-weight: 400; font-size: 0.78rem; color: #888; margin-left: 8px; }
.sa-indent { padding-left: 26px; }

.sa-export { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem;
    padding: 6px 12px; border: 1px solid #ddd; border-radius: 8px; background: #fff;
    cursor: pointer; }
.sa-export svg { width: 14px; height: 14px; }
.sa-export:disabled { opacity: 0.45; cursor: default; }
.sa-export:not(:disabled):hover { border-color: var(--brand-solid); color: var(--brand-text); }

.sa-status { margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: #f4f6f8;
    font-size: 0.9rem; }
.sa-status.sa-error { background: #fdecea; color: #a12; }

/* Reclaimable (idle licensed) seats in the user report. */
.au-idle td { background: #fff8f4; }

.au-manage, .au-remove { border-radius: 8px; background: #fff; cursor: pointer;
    font: inherit; font-weight: 600; padding: 6px 10px; }
.au-manage { border: 1px solid #d8d2cd; color: #444; }
.au-remove { border: 1px solid #c43d32; color: #a52f27; }
.au-manage:hover { border-color: var(--brand-solid); color: var(--brand-text); }
.au-remove:hover { background: #fff3f2; }
.au-manage:disabled, .au-remove:disabled { opacity: .45; cursor: default; }
/* Bulk selection bar — appears only once rows are ticked. The explicit
   [hidden] rule matters: display:flex would otherwise beat the attribute. */
.au-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin: 12px 0; padding: 10px 12px; border: 1px solid #e5d3cf;
    border-radius: 10px; background: #fdf6f4; }
.au-bulkbar[hidden] { display: none; }
.au-bulkcount { font-size: .88rem; font-weight: 600; }
.au-bulklabel { font-size: .88rem; color: #555; }
.au-bulkbar select { flex: 0 1 260px; }
.au-pick { width: 16px; height: 16px; }

/* Plan identity: the name leads, the 64-bit ID stays visible underneath so an
   admin can still match a row against Admin Center. */
.au-plan-id { color: #888; font-size: .74rem; font-variant-numeric: tabular-nums; }

.au-warning { color: #8d2f28; font-size: .82rem; margin: 10px 0 0; }

.au-stats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px; margin: 14px 0; }
.au-stat { border: 1px solid #ebe4df; border-radius: 10px; padding: 12px;
    background: #fffaf7; }
.au-stat strong { display: block; color: #8d2f28; font-size: 1.35rem; }
.au-stat span { display: block; color: #666; font-size: .78rem; margin-top: 2px; }

.au-details td { background: #fcfaf8; padding: 0 14px 14px; }
.au-details-wrap { border-left: 3px solid var(--brand-solid); padding: 12px 14px;
    overflow-x: auto; }
.au-details-wrap h3 { font-size: .95rem; margin: 0 0 8px; }
.au-manage[aria-expanded="true"] { border-color: var(--brand-solid); color: var(--brand-text); }

.au-dialog { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 14px;
    padding: 22px; box-shadow: 0 20px 60px rgba(41, 24, 16, .25); }
.au-dialog::backdrop { background: rgba(31, 22, 18, .52); }
.au-dialog h2 { margin: 0 0 12px; font-size: 1.2rem; }
.au-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.au-danger { border: 1px solid #a52f27; border-radius: 10px; padding: 10px 16px;
    background: #a52f27; color: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.au-danger:hover { background: #84251f; }
.au-danger:disabled { opacity: .55; cursor: wait; }

.au-toast { position: fixed; z-index: 1000; right: 20px; bottom: 20px;
    max-width: min(420px, calc(100% - 40px)); padding: 12px 16px; border-radius: 10px;
    background: #234d32; color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); }
.au-toast.au-toast-error { background: #8d2f28; }

@media (max-width: 720px) {
    .au-stats { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
    .sa-controls select { flex: 1 1 130px; }
    .au-dialog-actions { flex-direction: column-reverse; }
    .au-dialog-actions button { justify-content: center; width: 100%; }
}

.sa-applybar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; align-items: center; }

/* Secondary action (downgrade) — quieter than the primary Remove CTA. */
.sa-secondary { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem;
    font-weight: 600; padding: 10px 16px; border: 1px solid #ddd; border-radius: 10px;
    background: #fff; color: #333; cursor: pointer; }
.sa-secondary svg { width: 16px; height: 16px; }
.sa-secondary:disabled { opacity: 0.45; cursor: default; }
.sa-secondary:not(:disabled):hover { border-color: var(--brand-solid); color: var(--brand-text); }
