/* Admin-site additions on top of the shared platform stylesheet (all tokens come from app.css :root). */
.alert-err { background: var(--danger-tint); border: 1px solid #E7B9B4; border-left: 3px solid var(--danger); border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--danger); margin-bottom: 14px; }
.alert-err > div + div { margin-top: 2px; }
code.key { font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); color: var(--ink-2); padding: 1px 6px; border-radius: var(--r-sm); white-space: nowrap; }
.badge-plain { text-transform: none; letter-spacing: 0; font-weight: 600; }
.muted { font-size: 12px; color: var(--ink-3); }
.search-input { width: 240px; height: 34px !important; font-size: 13px !important; }

/* checkbox lists (role editor, user role dialog) */
.chk-list { display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: var(--r-lg); max-height: 260px; overflow-y: auto; background: var(--surface); }
.chk-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--ink); transition: background var(--t); }
.chk-row:last-child { border-bottom: none; }
.chk-row:hover { background: var(--surface-2); }
.chk-row input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.chk-row.is-disabled { opacity: .6; cursor: not-allowed; }
.chk-name { font-weight: 600; }
.chk-desc { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.chk-hint { font-size: 12px; color: var(--accent); margin-top: 1px; }

/* permission matrix */
.perm-module .card-hdr { background: var(--surface-2); flex-wrap: wrap; gap: 10px; }
.perm-module .chk-row { padding: 9px 20px; }
.perm-module .chk-row.is-access { background: var(--accent-tint); }
.perm-module .chk-row.is-access:hover { background: var(--accent-tint-2); }
.perm-module .perm-warn { margin: 0 20px 12px; }
.module-all { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.module-all input { accent-color: var(--accent); width: 16px; height: 16px; }

/* modules page */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; margin-bottom: 0; }
.module-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.module-card.is-off { background: var(--surface-2); }
.module-card.is-off .module-ico { background: var(--surface-3); color: var(--ink-3); }
.module-ico { width: 40px; height: 40px; border-radius: var(--r-lg); background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.module-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.module-desc { font-size: 13px; color: var(--ink-3); line-height: 1.5; min-height: 2.6em; }
.module-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
