.ep-access-intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ep-access-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--ui-line); border-radius: var(--ui-r); background: #fff; box-shadow: var(--ui-shadow); font-size: 13px; line-height: 1.55; color: #39463f; }
.ep-access-card p { margin: 0; }
.ep-access-card b { color: #122019; }
.ep-access-card a { color: #237a06; font-weight: 600; }
.ep-access-card-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ep-access-card-tile { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: #eef3ec; color: #4f5d54; }
.ep-access-card-tile svg { width: 18px; height: 18px; }
.ep-access-card-dppm .ep-access-card-tile { background: #e3f1dc; color: #237a06; }
.ep-access-card-system .ep-access-card-tile { background: #fdf0e3; color: #c26a1a; }
.ep-access-steps { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.ep-access-steps li { display: flex; align-items: center; gap: 5px; padding-left: calc(var(--ep-indent, 0) * 14px); font-size: 12.5px; font-weight: 600; color: #39463f; white-space: nowrap; }
.ep-access-steps li svg { flex: none; width: 15px; height: 15px; color: #77857c; }
.ep-access-card-dppm .ep-access-steps li { color: #1f5c0a; }
.ep-access-card-dppm .ep-access-steps li svg { color: #237a06; }
.ep-access-card p { color: #5b6b5a; }

.ep-access-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 12px; }
.ep-access-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-left: auto; }
.ep-access-search { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #e4e9e3; border-radius: 10px; background: #fff; }
.ep-access-search input { width: 190px; border: 0; outline: 0; padding: 0; font-size: 13px; background: transparent; }
.ep-access-search-icon { width: 16px; height: 16px; color: #77857c; }
.ep-access-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #39463f; cursor: pointer; }
.ep-access-tools { display: inline-flex; gap: 14px; }
.ep-access-link { font-size: 12.5px; font-weight: 600; color: #237a06; }
.ep-access-link:hover { text-decoration: underline; }
.ep-access-dirty { padding: 3px 10px; border-radius: 999px; background: #fbeed6; color: #8a5a00; font-size: 12px; font-weight: 600; }

.ep-access-legend-box { flex: 1 1 100%; display: grid; gap: 8px; padding: 10px 14px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; }
.ep-access-legend-box .ep-access-legend { color: #3f5f8a; }
.ep-access-viewonly { display: flex; align-items: center; gap: 6px; margin: 0; padding-top: 8px; border-top: 1px dashed #bfdbfe; font-size: 12px; font-weight: 600; color: #1e3a8a; }
.ep-access-viewonly svg { width: 14px; height: 14px; color: #2563eb; }
.ep-access-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: #77857c; }
.ep-access-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ep-access-legend input { width: 14px; height: 14px; }
.ep-access-swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid #cfe5c4; border-radius: 4px; background: #eef7ea; }
.ep-access-swatch.is-admin { border-color: #bccff0; background: #dfe9f8; }
.ep-access-swatch.is-teacher { border-color: #cfc0f0; background: #e7defa; }

/* Scrolls in its own box so the sticky header and column work. */
.ep-access-wrap { overflow: auto; max-width: 100%; max-height: calc(100vh - 230px); border: 1px solid var(--ui-line); border-radius: var(--ui-r); background: #fff; box-shadow: var(--ui-shadow); }
.ep-access-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.ep-access-table th,
.ep-access-table td { padding: 6px 10px; border-right: 1px solid var(--ui-line2); border-bottom: 1px solid var(--ui-line); white-space: nowrap; vertical-align: middle; }
.ep-access-table tr > :last-child { border-right: 0; }
.ep-access-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f8f5; font-weight: 600; text-align: left; border-bottom: 1px solid #e4e9e3; }
.ep-access-first { position: sticky; left: 0; z-index: 1; min-width: 240px; background: #fff; border-right-color: var(--ui-line) !important; }
.ep-access-table thead .ep-access-first { z-index: 3; background: #f6f8f5; }
.ep-access-dppm { background: #f4faf1; }
.ep-access-admin { background: #eef4fc; }
.ep-access-table thead .ep-access-admin { background: #dfe9f8; }
.ep-access-teacher { background: #f4effc; }
.ep-access-table thead .ep-access-teacher { background: #e7defa; }
.ep-access-table thead .ep-access-dppm { background: #e9f5e3; }
.ep-access-group td { background: #f6f8f5 !important; font-weight: 700; color: #2f5d2a; }
.ep-access-section td { background: #f6f8f5 !important; font-size: 12px; color: #5b6b5a; }
.ep-access-pin { position: sticky; left: 10px; display: inline-flex; align-items: center; }
.ep-access-fold { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: inherit; }
.ep-access-chevron { width: 16px; height: 16px; transition: transform 0.15s ease; }
.ep-access-chevron-closed { transform: rotate(-90deg); }
.ep-access-off { margin-left: 10px; font-size: 11.5px; font-weight: 600; color: #8a5a00; }
.ep-access-off a { text-decoration: underline; }
.ep-access-hint { display: block; font-size: 11.5px; font-weight: 400; color: #77857c; white-space: normal; }
.ep-access-cell { text-align: center !important; }
.ep-access-role b { display: inline-flex; align-items: center; gap: 5px; }
.ep-access-role small { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 3px; color: #5b6b5a; font-weight: 400; font-size: 11.5px; }
.ep-access-level { padding: 0 7px; border-radius: 999px; background: #f2f5f1; }
.ep-access-users { display: inline-flex; align-items: center; gap: 3px; }
.ep-access-users svg { width: 13px; height: 13px; color: #8a978d; }
.ep-access-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0ad4e; box-shadow: 0 0 0 3px #fff4e0; }
.ep-access-reset { display: block; margin-top: 2px; }
.ep-access-table .ep-access-reset .fi-link { gap: 0; font-size: 11.5px; line-height: 1.4; font-weight: 600; }
.ep-access-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 10px; background: #fff4e0; border: 1px solid #f0ad4e; color: #8a5a00; font-size: 11px; font-weight: 400; }
.ep-access-diff { outline: 2px solid #f0ad4e; outline-offset: 2px; }
.ep-access-none { color: #b8c2b6; }
.ep-access-hidden td { color: #8a948a; }
.ep-access-table tbody tr:not(.ep-access-group, .ep-access-section):hover td { background: var(--ui-brand-l); }
.ep-access-hidden input { opacity: 0.5; }

@media (max-width: 900px) {
    .ep-access-intro { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ep-access-first { min-width: 160px; white-space: normal !important; }
    .ep-access-search input { width: 150px; }
}

/* #207 M06: a phone shows one role; a touch screen scrolls the page. */
.ep-access-pick { display: none; }
@media (max-width: 640px) {
    .ep-access-pick { display: flex; flex-direction: column; gap: 4px; width: 100%; font-size: 12.5px; font-weight: 600; color: #39463f; }
    .ep-access-pick select { width: 100%; padding: 8px 10px; border: 1px solid #e4e9e3; border-radius: 10px; background: #fff; font-size: 16px; font-weight: 400; }
    .ep-access-search { width: 100%; }
    .ep-access-search input { width: 100%; }
    .ep-access-table [data-role] { display: var(--ep-pick, table-cell); }
    .ep-access-first { min-width: 0; }
    .ep-access-table th:not(.ep-access-first) { white-space: normal; }
}
@media (pointer: coarse) {
    .ep-access-wrap { max-height: none; }
    .ep-access-search input { font-size: 16px; }
}
