/* Permissions Editor Styles */
.perm-col-group { min-width: 180px; }
.perm-col-action { min-width: 100px; }

.permissions-editor-wrapper .permissions-editor-table {
  background: var(--card-bg);
  color: var(--text-color);
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2em 0 1em 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.permissions-editor-wrapper .permissions-editor-table th,
.permissions-editor-wrapper .permissions-editor-table td {
  background: transparent;
  color: var(--text-color);
  padding: 0.5em 0.5em;
  text-align: left;
  font-size: 1em;
  border: none;
}
.permissions-editor-wrapper .permissions-editor-table th {
  color: var(--text-muted);
}
/* Rounded corners for first/last cells */
.permissions-editor-wrapper .permissions-editor-table tr:first-child th:first-child {
  border-top-left-radius: var(--radius-lg);
}
.permissions-editor-wrapper .permissions-editor-table tr:first-child th:last-child {
  border-top-right-radius: var(--radius-lg);
}
.permissions-editor-wrapper .permissions-editor-table tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}
.permissions-editor-wrapper .permissions-editor-table tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}
.permissions-editor-wrapper .permissions-editor-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}
.permissions-editor-wrapper .permissions-editor-table input[type="checkbox"] {
  width: 1.5em;
  height: 1.5em;
  accent-color: var(--primary);
  cursor: pointer;
}
.permissions-editor-wrapper .permissions-editor-table input[type="radio"] {
  display: none;
}
.permissions-editor-wrapper .sc-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0.5em;
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
  min-width: 1.8em;
  min-height: 1.8em;
  width: 1.8em;
  height: 1.8em;
  margin: 0 0.1em;
  transition: box-shadow 0.15s, border 0.15s, background 0.15s;
  border: none;
  font-size: 1.1em;
  position: relative;
  color: var(--text-color);
}
.permissions-editor-wrapper .sc-radio span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: inherit;
}
.permissions-editor-wrapper .permissions-editor-table input[type="radio"]:checked + span {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm);
  background: var(--primary-light);
  color: var(--text-color);
  border-radius: 0.5em;
}
html.dark-mode .permissions-editor-wrapper .sc-radio {
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
@media (max-width: 700px) {
  .permissions-editor-wrapper .permissions-editor-table {
    max-width: 100%;
  }
  .permissions-editor-wrapper .permissions-editor-table th, .permissions-editor-wrapper .permissions-editor-table td {
    padding: 0.5em 0.5em;
    font-size: 1em;
  }
  .permissions-editor-wrapper .sc-radio {
    min-width: 1.4em;
    min-height: 1.4em;
    width: 1.4em;
    height: 1.4em;
    font-size: 1em;
  }
}
