/* ============ admin › admin log + staff & access (design canvas "Admin log", "Staff & access") ============
   The log: filters, kind chips, a table with day groups and lines that open; on a phone two-line
   rows and one line at a time. Staff: tabs, the list grouped by role with the person (or the add
   form) beside it; on a phone the list, then a person covers it with a way back. */

.al, .as {
    --al-dash: color-mix(in srgb, var(--line) 12%, transparent);
    --al-head: color-mix(in srgb, var(--line) 8%, var(--surface));
    --al-on: color-mix(in srgb, var(--hi-yellow) 22%, var(--surface));
    --al-hover: color-mix(in srgb, var(--line) 4%, transparent);
    --al-soft: color-mix(in srgb, var(--line) 4%, var(--surface));

    /* kind stickers and role badges: the same in every theme */
    --al-people: var(--blue-100);
    --al-reports: var(--red-100);
    --al-communities: var(--purple-100);
    --al-uploads: var(--green-100);
    --al-settings: var(--amber-200);
    --al-requests: var(--pink-150);
    --al-staff: var(--gray-900);
    --al-sticker-ink: var(--gray-900);
}

/* ---- log ---- */
.al-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.al-find { flex: 1; min-width: 240px; }
.al-two { display: contents; }
.al-sel { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-soft); }
.al-sel select {
    min-width: 150px; height: 44px; padding: 0 30px 0 12px; font: inherit; font-size: 16px; color: var(--ink);
    background: var(--sheet); border: 2px solid var(--line); border-radius: 14px 18px 12px 16px;
}

.al-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.al-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; white-space: nowrap;
    border: 2px solid var(--line); border-radius: 16px 12px 15px 11px; background: var(--paper);
    font: inherit; font-size: 14.5px; color: var(--ink); cursor: pointer;
}
.al-chip i { width: 10px; height: 10px; border: 1.5px solid var(--line); border-radius: 50%; box-sizing: border-box; }
.al-chip small { font-size: 12.5px; color: var(--ink-soft); }
.al-chip.on { background: var(--hi-yellow); color: var(--gray-900); box-shadow: 2px 2px 0 var(--line); }
.al-chip.on small { color: var(--gray-900); }

.al-active { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.al-pill {
    display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 4px 0 10px;
    border: 1.5px dashed var(--line); border-radius: 14px; background: var(--al-on); font-size: 14px; color: var(--ink);
}
.al-pill button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.al-pill button:hover { background: var(--al-hover); }
.al-clear { padding: 4px; border: none; background: none; font: inherit; font-size: 14px; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.al-tbl { margin-top: 12px; overflow: hidden; background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px; }
.al-hd, .al-r { display: grid; grid-template-columns: 62px 132px minmax(0, 1fr) 220px 200px 32px; gap: 12px; align-items: center; padding: 0 12px; }
.al-hd { min-height: 36px; background: var(--al-head); border-bottom: 2px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.al-day { padding: 10px 12px 4px; border-top: 2px dashed var(--al-dash); font-family: var(--font-marker); font-weight: 700; font-size: 20px; color: var(--ink-soft); }
.al-hd + .al-day { border-top: none; }
.al-day small { margin-left: 6px; font-family: var(--font-hand); font-weight: 400; font-size: 13px; }
.al-r { min-height: 48px; border-top: 2px dashed var(--al-dash); }
.al-day + .al-r { border-top: none; }
.al-r:hover { background: var(--al-hover); }
.al-r.on { background: var(--al-on); }
.al-when { font-size: 14px; color: var(--ink-soft); }
.al-who {
    display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 0; border: none; background: none;
    font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
}
.al-who > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--line) 25%, transparent); text-underline-offset: 3px; }
.al-who:hover > span:last-child { text-decoration-color: var(--line); }
.al-who.none { color: var(--ink-soft); cursor: default; }
.al-av {
    display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; box-sizing: border-box;
    border: 2px solid var(--line); border-radius: 50% 45% 55% 48%;
    font-family: var(--font-marker); font-weight: 700; font-size: 16px; color: var(--white);
}
.al-did { min-width: 0; line-height: 1.2; }
.al-did b { display: block; font-weight: 400; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-did .mono, .al-sub .mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.al-on {
    display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 0; border: none; background: none;
    font: inherit; font-size: 15px; color: var(--accent-strong); text-align: left; cursor: pointer;
}
.al-on .k, .al-link .k {
    display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; box-sizing: border-box;
    border: 1.5px solid var(--line); border-radius: 7px; color: var(--al-sticker-ink);
}
.al-on .n { min-width: 0; line-height: 1.15; }
.al-on .n > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.al-on .n small, .al-link .n small { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.al-on:hover .n > span { color: var(--link-ink); }
.al-on.none { color: var(--ink-soft); cursor: default; }
.al-on.none .n > span { text-decoration: none; }
.al-why { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-why.empty { color: var(--ink-faint); }
.al-more { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.al-more:hover { background: var(--al-hover); }
.al-more .icon { transition: rotate .15s; }
.al-r.on .al-more .icon { rotate: 180deg; }
/* the chevron points down; in links it points on */
.al-link > .icon:last-child, .as-link .icon { rotate: -90deg; }

.al-open { padding: 4px 12px 14px 86px; background: var(--al-on); border-top: 2px dashed var(--al-dash); }
.al-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: 14.5px; }
.al-kv dt { color: var(--ink-soft); }
.al-kv dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.al-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.al-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.al-foot .al-sp { flex: 1; }
.al-empty { padding: 28px 10px; text-align: center; font-size: 16px; color: var(--ink-soft); }

/* kind colours: chips, row icons and the phone rows */
.al-c-people { background: var(--al-people); }
.al-c-reports { background: var(--al-reports); }
.al-c-communities { background: var(--al-communities); }
.al-c-uploads { background: var(--al-uploads); }
.al-c-settings { background: var(--al-settings); }
.al-c-requests { background: var(--al-requests); }
.al-c-staff { background: var(--al-staff); }
.al .k.al-c-staff { color: var(--white); }
.al .k.al-c- { background: var(--al-head); color: var(--ink); }

/* log on a phone */
.al.phone .al-bar { gap: 8px; }
.al.phone .al-find { flex: none; width: 100%; min-width: 0; }
.al.phone .al-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.al.phone .al-sel select { width: 100%; min-width: 0; }
.al.phone .al-chips { flex-wrap: nowrap; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 4px; }
.al.phone .al-day { padding: 12px 2px 2px; border-top: none; }
.al-pr {
    display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; box-sizing: border-box;
    width: 100%; min-height: 64px; padding: 8px 2px; border: none; border-bottom: 2px dashed var(--al-dash);
    background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.al-pr .k { display: grid; place-items: center; width: 30px; height: 30px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 50% 45% 55% 48%; color: var(--al-sticker-ink); }
.al-pr .t { min-width: 0; line-height: 1.2; }
.al-pr .t b { display: block; font-weight: 400; font-size: 15.5px; }
.al-pr .t small { display: block; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-pr .w { font-size: 12.5px; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.al-card { padding: 14px; background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px; }
.al-back, .as-back {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: none; background: none;
    font: inherit; font-size: 16px; color: var(--accent-strong); cursor: pointer;
}
.al-mk { font-family: var(--font-marker); font-weight: 700; font-size: 27px; line-height: 1.05; }
.al-sub { font-size: 13.5px; color: var(--ink-soft); }
.al-link {
    display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: 52px; margin-top: 8px; padding: 6px 10px;
    border: 2px solid var(--line); border-radius: 12px 9px 13px 8px; background: var(--sheet);
    font: inherit; font-size: 15.5px; color: var(--ink); text-align: left; cursor: pointer;
}
.al-link .k { width: 28px; height: 28px; border-radius: 8px; }
.al-link .n { flex: 1; min-width: 0; line-height: 1.15; }
.al-link .n small.plain { font-family: inherit; font-size: 13px; }
.al.phone .al-kv { grid-template-columns: 92px minmax(0, 1fr); margin-top: 12px; }
.al.phone .al-acts .btn { flex: 1; min-height: 44px; }

/* ---- staff & access ---- */
.as-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.as-sp { flex: 1; }
.as.phone .as-seg { width: 100%; }
.as-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; margin-top: 14px; }
.as.phone .as-list, .as.phone .as-card { margin-top: 12px; }

.as-list { overflow: hidden; background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px; }
.as-grp { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 2px; font-family: var(--font-marker); font-weight: 700; font-size: 20px; color: var(--ink-soft); }
.as-grp small { font-family: var(--font-hand); font-weight: 400; font-size: 13px; }
.as-row {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; box-sizing: border-box;
    width: 100%; min-height: 62px; padding: 8px 14px; border: none; border-top: 2px dashed var(--al-dash);
    background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.as-row:hover { background: var(--al-hover); }
.as-row.on { background: var(--al-on); box-shadow: inset 4px 0 0 var(--line); }
.as-av {
    display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; box-sizing: border-box;
    border: 2.5px solid var(--line); border-radius: 50% 45% 55% 48%;
    font-family: var(--font-marker); font-weight: 700; font-size: 24px; line-height: 1; color: var(--white);
}
.as-av.big { width: 56px; height: 56px; font-size: 34px; }
.as-av.mid { width: 36px; height: 36px; font-size: 21px; }
.as-t { min-width: 0; line-height: 1.2; }
.as-t b { font-weight: 400; font-size: 17px; }
.as-t .u, .as-found .u { margin-left: 4px; font-size: 14px; color: var(--ink-soft); }
.as-t small { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; font-size: 13.5px; color: var(--ink-soft); }
.as-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.as-role {
    display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; white-space: nowrap;
    border: 1.5px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--gray-900);
}
.as-role.r-owner { background: var(--gray-900); color: var(--white); }
.as-role.r-admin { background: var(--red-100); }
.as-role.r-moderator { background: var(--blue-100); }
.as-role.r-support { background: var(--green-100); }
.as-flag { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; }
.as-flag.ok { background: var(--green-100); color: var(--green-900); }
.as-flag.warn { background: var(--amber-200); color: var(--amber-900); border: 1.5px dashed var(--amber-600); }
.as-when { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.as-hint { margin: 8px 0 0; font-size: 13.5px; line-height: 1.3; color: var(--ink-soft); }

.as-card { padding: 16px 18px; box-sizing: border-box; background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px; }
.as-head { display: flex; align-items: center; gap: 12px; }
.as-who { min-width: 0; }
.as-mk { font-family: var(--font-marker); font-weight: 700; font-size: 32px; line-height: 1.05; }
.as-sub { font-size: 14px; color: var(--ink-soft); }
.as-kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 5px 12px; margin: 10px 0 0; font-size: 15px; }
.as-kv dt { color: var(--ink-soft); }
.as-kv dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.as-note {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 9px 12px; font-size: 14.5px; line-height: 1.3;
    background: color-mix(in srgb, var(--amber-500) 12%, var(--surface)); border: 2px dashed var(--amber-600); border-radius: 12px 9px 13px 8px;
}
.as-note .icon { flex-shrink: 0; margin-top: 1px; color: var(--amber-600); }
.as-lbl { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 6px; font-family: var(--font-marker); font-weight: 700; font-size: 22px; }
.as-lbl small { font-family: var(--font-hand); font-weight: 400; font-size: 13.5px; color: var(--ink-soft); }

.as-pick { display: flex; flex-direction: column; gap: 6px; }
.as-opt {
    display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; box-sizing: border-box; width: 100%; padding: 9px 12px;
    border: 2px solid color-mix(in srgb, var(--line) 35%, transparent); border-radius: 12px 9px 13px 8px; background: var(--sheet);
    font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.as-opt:hover:not(:disabled) { border-color: var(--line); }
.as-opt:disabled { cursor: default; }
.as-opt.on { border: 2.5px solid var(--line); background: var(--al-on); box-shadow: 2px 2px 0 var(--line); }
.as-opt.locked { background: var(--al-soft); border-style: dashed; }
.as-opt .dot { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; box-sizing: border-box; border: 2.5px solid var(--line); border-radius: 50%; }
.as-opt.on .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.as-opt.locked:not(.on) .dot { border-style: dashed; }
.as-opt b { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 16px; }
.as-opt b small.now { display: inline; margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.as-opt > span > small { display: block; margin-top: 1px; font-size: 13.5px; line-height: 1.25; color: var(--ink-soft); }
.as-field { margin-top: 12px; }
.as-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.as-acts.as-off { padding-top: 12px; border-top: 2px dashed var(--al-dash); }
.as-fine { flex: 1; min-width: 160px; font-size: 13px; color: var(--ink-soft); }

.as-lines { display: flex; flex-direction: column; }
.as-line { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 2px dashed var(--al-dash); font-size: 14.5px; line-height: 1.2; }
.as-line .w { font-size: 12.5px; color: var(--ink-soft); }
.as-link {
    display: inline-flex; align-items: center; gap: 4px; padding: 6px 0 0; border: none; background: none;
    font: inherit; font-size: 15px; color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.as-found { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; background: var(--sheet); border: 2px solid var(--line); border-radius: 12px 9px 13px 8px; }
.as-found .t { flex: 1; min-width: 0; font-size: 15px; line-height: 1.2; }
.as-found small { display: block; font-size: 13px; color: var(--ink-soft); }

.as-mx {
    width: 100%; margin-top: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; font-size: 15px;
    background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px;
}
.as-mx th { padding: 10px 6px 8px; text-align: center; vertical-align: bottom; font-weight: 400; background: var(--al-head); border-bottom: 2px solid var(--line); }
.as-mx th:first-child { padding-left: 14px; text-align: left; font-size: 14px; color: var(--ink-soft); }
.as-mx th .as-role { font-size: 14px; }
.as-mx th small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-soft); }
.as-mx td { padding: 8px 6px; text-align: center; border-top: 2px dashed var(--al-dash); }
.as-mx td:first-child { padding-left: 14px; text-align: left; line-height: 1.25; }
.as-mx tr.g td { padding-top: 8px; padding-bottom: 2px; background: var(--al-soft); font-family: var(--font-marker); font-weight: 700; font-size: 19px; color: var(--ink-soft); }
.as-mx .col { background: var(--al-on); }
.as-mx .yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green-500); color: var(--white); }
.as-mx .no { display: inline-block; width: 12px; height: 2.5px; border-radius: 2px; background: color-mix(in srgb, var(--line) 20%, transparent); vertical-align: middle; }
.as.phone .as-mx { font-size: 14px; }
.as.phone .as-mx th, .as.phone .as-mx td { padding-left: 3px; padding-right: 3px; }
.as.phone .as-mx th:first-child, .as.phone .as-mx td:first-child { padding-left: 10px; }
.as.phone .as-mx th .as-role { padding: 0 5px; font-size: 11.5px; }

.as-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.as.phone .as-rules { grid-template-columns: minmax(0, 1fr); }
.as-rule { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--surface); border: 2.5px solid var(--line); border-radius: 12px 9px 13px 8px; }
.as-rule .i { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; box-sizing: border-box; border: 2px solid var(--line); border-radius: 50% 45% 55% 48%; background: var(--green-100); color: var(--gray-900); }
.as-rule b { display: block; font-weight: 400; font-size: 16.5px; line-height: 1.2; }
.as-rule span:not(.i) { display: block; margin-top: 2px; font-size: 14px; line-height: 1.3; color: var(--ink-soft); }
