/* HUTECH Program — Notion-inspired Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #2383e2;
  --primary-hover: #1b6ec2;
  --primary-bg: rgba(35,131,226,0.06);
  --success: #0f7b6c;
  --success-bg: rgba(15,123,108,0.06);
  --warning: #d9730d;
  --warning-bg: rgba(217,115,13,0.06);
  --danger: #e03e3e;
  --danger-bg: rgba(224,62,62,0.06);
  --info: #2383e2;

  --bg: #ffffff;
  --bg-secondary: #f7f7f5;
  --bg-hover: rgba(55,53,47,0.04);
  --bg-active: rgba(55,53,47,0.06);

  --text: #37352f;
  --text-secondary: #37352f;
  --text-muted: #787774;
  --text-light: #a4a4a0;

  --border: rgba(55,53,47,0.09);
  --divider: rgba(55,53,47,0.09);

  --sidebar-w: 240px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-sm: rgba(15,15,15,0.04) 0px 0px 0px 1px, rgba(15,15,15,0.03) 0px 3px 6px;
  --shadow-md: rgba(15,15,15,0.04) 0px 0px 0px 1px, rgba(15,15,15,0.03) 0px 3px 6px, rgba(15,15,15,0.06) 0px 9px 24px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Button outline */
  --outline-border: rgba(55, 53, 47, 0.16);
  --outline-border-hover: rgba(55, 53, 47, 0.3);

  /* Warning hover */
  --warning-hover: #c76b0a;

  /* Table row divider (lighter than --divider) */
  --row-divider: rgba(55, 53, 47, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LAYOUT ===== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 14px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-header h1 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}
.sidebar-header p { display: none; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.nav-section {
  padding: 16px 8px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 400;
  border-radius: var(--radius);
  margin: 1px 0;
  user-select: none;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}
.nav-item .icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  opacity: 0.8;
}

.sidebar-user {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-user .user-info { font-size: 12px; }
.sidebar-user .user-name { font-weight: 500; color: var(--text); }
.sidebar-user .user-role { color: var(--text-muted); font-size: 11px; }
.sidebar-user .logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  transition: all 0.15s;
}
.sidebar-user .logout-btn:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 48px;
  max-width: 1100px;
  min-height: 100vh;
}

/* ===== CARDS (no border, no shadow, no background) ===== */
.card {
  margin-bottom: 24px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.card-body {
  padding: 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-secondary);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.85;
}
.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-outline-primary {
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--outline-border);
}
.btn-outline-primary:hover {
  background: var(--primary-bg);
  border-color: var(--outline-border-hover);
}
.btn-outline-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--outline-border);
}
.btn-outline-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--outline-border-hover);
}
.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: var(--warning-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: none;
}
.btn-ghost:hover {
  background: var(--bg-hover);
}

/* ===== FORMS ===== */
.input-group {
  margin-bottom: 16px;
}
.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(35,131,226,0.12);
}
.input-group input:disabled,
.input-group select:disabled,
.input-group textarea:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
}
.input-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
}
body.modal-open {
  overflow: hidden;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  transform: translateY(10px);
  transition: transform 0.15s;
  box-shadow: var(--shadow-md);
}
.modal-overlay.active .modal {
  transform: translateY(0);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider);
}
.modal-header h2 {
  font-size: 15px;
  font-weight: 600;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
}
.modal-error {
  color: var(--danger);
  font-size: 12px;
  padding: 8px 12px;
  background: var(--danger-bg);
  border-radius: var(--radius);
  display: none;
  margin-bottom: 8px;
}
.modal-error.show { display: block; }

/* ===== UI DIALOG ===== */
.ui-dialog-overlay {
  z-index: 1100;
}
.ui-dialog {
  max-width: 460px;
}
.ui-dialog-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--divider);
}
.ui-dialog-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--primary-bg);
  color: var(--primary);
}
.ui-dialog-overlay[data-tone="success"] .ui-dialog-badge {
  background: var(--success-bg);
  color: var(--success);
}
.ui-dialog-overlay[data-tone="warning"] .ui-dialog-badge {
  background: var(--warning-bg);
  color: var(--warning);
}
.ui-dialog-overlay[data-tone="danger"] .ui-dialog-badge {
  background: var(--danger-bg);
  color: var(--danger);
}
.ui-dialog-copy {
  flex: 1;
  min-width: 0;
}
.ui-dialog-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ui-dialog-copy h2 {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
}
.ui-dialog-body {
  padding-top: 16px;
}
.ui-dialog-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}
.ui-dialog-input-wrap {
  margin-top: 16px;
}
.ui-dialog-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ui-dialog-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(35,131,226,0.12);
}
.ui-dialog-footer {
  padding-top: 16px;
}
.ui-dialog-footer .btn {
  min-width: 92px;
  justify-content: center;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--divider);
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--row-divider);
  font-size: 13px;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: var(--bg-hover);
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
}
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--primary-bg); color: var(--primary); }
.badge-neutral { background: var(--bg-active); color: var(--text-muted); }

/* ===== LOADING ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--divider);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 60px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toast {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  min-width: 260px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.2s ease;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  border-left: 3px solid var(--text-muted);
}
.toast.removing { animation: toastOut 0.2s ease forwards; }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ===== LOGIN ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-secondary);
}
.login-box {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-sm);
}
.login-box h1 {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.login-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}
.login-box .logo {
  text-align: center;
  font-size: 40px;
  margin-bottom: 12px;
}
.login-error {
  color: var(--danger);
  font-size: 12px;
  text-align: center;
  margin-bottom: 12px;
}

/* ===== TABS ===== */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-item {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.1s;
  white-space: nowrap;
}
.tab-item:hover {
  color: var(--text);
}
.tab-item.active {
  color: var(--text);
  font-weight: 500;
  border-bottom-color: var(--text);
}

/* ===== TYPOGRAPHY ===== */
.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.label-upper {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

/* ===== COMPONENTS ===== */
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
}
.breadcrumb-link:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  color: var(--text-muted);
}
.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}
.required-mark {
  color: var(--danger);
}
.rejection-banner {
  background: rgba(227, 179, 65, 0.12);
  border: 1px solid #e3a008;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.rejection-banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.rejection-banner-label {
  font-size: 13px;
  color: #92600a;
  font-weight: 500;
}
.rejection-panel {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}
.page-header {
  margin-bottom: var(--space-6);
}
.page-header-meta {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-1);
}
.text-muted-sm {
  color: var(--text-muted);
  font-size: 12px;
}
.page-header-actions {
  display: flex;
  gap: var(--space-2);
}
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 12px;
}
.role-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.role-item:hover {
  background: var(--bg-hover);
}
.role-item.active {
  background: rgba(59, 91, 219, 0.08);
  border-color: rgba(59, 91, 219, 0.25);
}

/* ===== TREE / LIST ITEM ===== */
.tree-node {
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}
.tree-node:hover {
  background: var(--bg-hover);
}

/* ===== KNOWLEDGE BLOCKS ===== */
.kb-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kb-accordion {
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}
.kb-accordion[data-depth="1"],
.kb-accordion[data-depth="2"],
.kb-accordion[data-depth="3"] {
  margin-top: 8px;
}
.kb-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--bg);
  transition: background 0.15s ease;
}
.kb-summary::-webkit-details-marker {
  display: none;
}
.kb-summary:hover {
  background: var(--bg-hover);
}
.kb-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.kb-chevron {
  width: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.kb-chevron::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
}
.kb-accordion[open] > .kb-summary .kb-chevron::before {
  transform: rotate(90deg);
}
.kb-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.kb-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.kb-meta {
  color: var(--text-muted);
  font-size: 12px;
}
.kb-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kb-actions .btn {
  box-shadow: none;
}
.kb-content {
  padding: 0 14px 14px 38px;
  border-top: 1px solid var(--divider);
  background: var(--bg-secondary);
}
.kb-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}
.kb-course-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}
.kb-course-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--bg);
}
.kb-course-code {
  color: var(--primary);
  font-weight: 600;
}
.kb-course-name {
  color: var(--text);
}
.kb-course-credits {
  color: var(--text-muted);
  font-size: 12px;
}
.kb-empty {
  padding: 12px 10px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== SYLLABUS ASSIGNMENT INLINE ===== */
.assign-inline-control {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.assign-inline-control:hover {
  background: rgba(55,53,47,0.06);
}
.assign-inline-control:focus {
  outline: none;
  border-color: transparent;
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(35,131,226,0.10);
}
.assign-inline-control.assign-inline-select {
  min-width: 220px;
}
.assign-inline-control.assign-inline-date {
  min-width: 138px;
}

/* ===== UTILITY ===== */
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex-row { display: flex; align-items: center; gap: var(--space-2); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.grid-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.gap-3 { gap: var(--space-3); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.15); }

/* ===== SELECTION ===== */
::selection { background: rgba(35,131,226,0.2); }

/* ===== PERMISSION MATRIX REFACTOR ===== */
.perm-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.perm-matrix-table th {
  padding: 12px 8px;
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--divider);
  text-align: center;
  white-space: normal;
  line-height: 1.2;
}
.perm-matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--divider);
  transition: background 0.1s;
}
.perm-matrix-table tr:hover td {
  background-color: var(--bg-hover) !important;
}

.mod-header {
  background: var(--bg-active) !important;
  color: var(--text) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px !important;
}

.mod-programs { background-color: rgba(35, 131, 226, 0.04); }
.mod-plo { background-color: rgba(15, 123, 108, 0.04); }
.mod-syllabus { background-color: rgba(217, 115, 13, 0.04); }
.mod-courses { background-color: rgba(146, 51, 255, 0.04); }
.mod-rbac { background-color: rgba(55, 53, 47, 0.04); }
