  .occ-list {
      margin-top: 12px;
      border-top: 1px solid var(--gc-border);
      padding-top: 8px;
  }

  .occ-rows {
      display: flex;
      flex-direction: column;
      gap: 6px;
  }

  .occ-row {
      display: flex;
      gap: 8px;
      align-items: center;
  }

  .occ-row input[type="datetime-local"] {
      border: 1px solid var(--gc-border);
      padding: 4px 6px;
  }

  .occ-add {
      margin-top: 8px;
      display: flex;
      gap: 8px;
  }


  #UJAM_Logo {
      max-width: 50px;
  }

  /* Top search suggestion dropdown styles */
  .top-actions .results {
      position: absolute;
      left: 0;
      right: 0;
      display: none;
      max-height: 260px;
      z-index: 9999;
      /* ensures search results appear above everything */
  }

  .top-actions .results .section {
      padding: 4px 8px;
      font-size: 0.8rem;
      color: var(--gc-muted);
      background: #f6f7f9;
      border-top: 1px solid var(--gc-border);
  }

  .top-actions .results .choices li {
      cursor: pointer;
  }

  .top-actions .results .choices li:hover {
      background: #f3f4f6;
  }

  .search-wrap {
      position: relative;
      display: inline-block;
  }

  .search-wrap .results {
      position: absolute;
      left: 0;
      right: 0;
      display: none;
  }

  .chips-line {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
  }

  .chips-line .chip {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 6px;
      border: 1px solid var(--gc-border);
      background: #f1f3f5;
  }

  .meta-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 6px 0;
  }

  .meta-row label {
      min-width: 64px;
      color: #4b5563;
  }

  /* ===== Class Editor layout & roster table ===== */
  .class-editor[hidden] {
      display: none
  }

  .ce-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px
  }

  .ce-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 16px
  }

  .roster-table {
      width: 100%;
      border-collapse: collapse;
      font-size: .95rem;
      background: #fff
  }

  .roster-table thead th {
      position: sticky;
      top: 0;
      background: #eef1f4;
      border-bottom: 1px solid var(--gc-border);
      text-align: left;
      padding: 8px
  }

  .roster-table td {
      border-top: 1px solid #eceff1;
      padding: 6px 8px;
      vertical-align: middle
  }

  .roster-table td .n {
      font-weight: 600
  }

  .roster-table td .m {
      color: var(--gc-muted)
  }

  .roster-table td.actions {
      width: 1%;
      white-space: nowrap
  }

  .roster-table button.x {
      border: 1px solid var(--gc-border);
      background: #f8d7da;
      color: #7a2128;
      padding: 2px 8px;
      cursor: pointer
  }

  /* Search drawer in editor */
  #add-student {
      width: 100%;
      padding: 6px 8px;
      border: 1px solid var(--gc-border);
      background: #fff
  }

  .results {
      margin-top: 8px;
      border: 1px solid var(--gc-border);
      background: #fff;
      max-height: 280px;
      overflow: auto;
  }

  .results .choices {
      list-style: none;
      margin: 0;
      padding: 0
  }

  .results .choices li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid #eceff1;
      padding: 6px 8px
  }

  .results .choices li:first-child {
      border-top: none
  }

  .results .choices .n {
      font-weight: 600
  }

  .results .choices .m {
      color: var(--gc-muted)
  }

  .results .choices button.add {
      border: 1px solid var(--gc-border);
      background: #e9ecef;
      padding: 2px 8px;
      cursor: pointer
  }

  /* ===== Enrolment: full-profile mode ===== */
  .hidden {
      display: none !important;
  }

  /* When a profile is open, the student panel should take full width */
  main.layout.profile-open {
      grid-template-columns: 1fr;
  }

  main.layout.profile-open #student-panel {
      margin-top: 0;
  }

  #student-panel.full {
      border: 1px solid var(--gc-border);
      background: #fff;
  }

  /* Optional polish: keep the table wrapper from reserving space when hidden */
  .class-list.hidden+#student-panel {
      margin-top: 0;
  }

  /* Make the back button look consistent */
  #sp-back {
      background: #e9ecef;
  }

  #sp-back:hover {
      background: #dde2e6;
  }

  :root {
      --gc-text: #212529;
      --gc-bg: #ffffff;
      --gc-muted: #6c757d;
      --gc-border: #c9ccd1;
      --gc-accent: #000000;
      --gc-accent-ink: #0b1e36;
      --gc-surface: #f5f6f7;
  }

  html,
  body {
      height: 100%
  }

  body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
      color: var(--gc-text);
      background: var(--gc-surface);
      line-height: 1.4
  }

  .container {
      max-width: 1500px;
      margin: 0 auto;
      padding: 0 16px
  }

  .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0
  }

  .muted {
      color: var(--gc-muted);
      font-size: .875rem
  }

  .gc-header {
      background: var(--gc-bg);
      border-bottom: 1px solid var(--gc-border)
  }

  .gc-header .brand {
      display: flex;
      align-items: baseline;
      gap: 12px;
      padding: 10px 0
  }

  .gc-header .wordmark {
      font-weight: 700;
      letter-spacing: .05em;
      color: var(--gc-accent-ink)
  }

  .gc-header .app-name {
      font-size: 1.1rem;
      margin: 0
  }

  .top-actions {
      display: flex;
      gap: 12px;
      align-items: center;
      padding: 8px 0 12px
  }

  .select,
  .search {
      border: 1px solid var(--gc-border);
      padding: 6px 8px;
      background: var(--gc-bg);
      color: var(--gc-text)
  }

  .search {
      min-width: 340px
  }

  .select:focus,
  .search:focus {
      outline: 3px solid #9ec5fe;
      outline-offset: 1px
  }

  .layout {
      display: grid;
      grid-template-columns: 5fr 2fr;
      gap: 16px;
      max-width: 1400px;
      margin: 16px auto
  }

  .calendar-wrap {
      background: var(--gc-bg);
      border: 1px solid var(--gc-border)
  }

  .detail-panel {
      background: var(--gc-bg);
      border: 1px solid var(--gc-border);
      padding: 12px
  }

  .section-title {
      font-size: 1rem;
      margin: 8px 0 12px
  }

  .detail-body {
      font-size: .95rem
  }

  .toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--gc-border);
      background: var(--gc-surface);
      padding: 8px 12px
  }

  .btn-group {
      display: inline-flex
  }

  .btn {
      border: 1px solid var(--gc-border);
      background: #e9ecef;
      color: var(--gc-text);
      padding: 6px 10px;
      cursor: pointer
  }

  .btn+.btn {
      margin-left: -1px
  }

  .btn:focus {
      outline: 3px solid #9ec5fe;
      outline-offset: 0
  }

  .btn-primary {
      background: var(--gc-accent);
      color: #fff;
      border-color: var(--gc-accent)
  }

  .week-label {
      color: var(--gc-muted);
      font-size: .9rem
  }

  .gc-footer {
      margin: 16px 0;
      color: var(--gc-muted)
  }

  * {
      border-radius: 0 !important;
      box-shadow: none !important
  }

  /* ===== Absolute-positioned calendar (Week + Day) ===== */
  :root {
      --slot-h: 50px;
      --time-col-w: 88px;
      --day-head-h: 34px;
  }

  .calendar-wrap {
      overflow: hidden;
  }

  .cal-shell {
      display: grid;
      grid-template-columns: var(--time-col-w) 1fr;
  }

  .time-rail {
      border-right: 1px solid var(--gc-border);
      background: #f7f8f9;
      padding-top: var(--day-head-h);
      box-sizing: border-box;
  }

  .time-rail .tick {
      height: var(--slot-h);
      border-bottom: 1px solid #eee;
      font-size: 12px;
      color: var(--gc-muted);
      display: flex;
      align-items: flex-start;
      justify-content: flex-end;
      padding-right: 6px;
      box-sizing: border-box;
  }

  .time-rail .tick:nth-child(2n) {
      color: #9aa0a6;
  }

  .days-wrap {
      position: relative;
      overflow: auto;
  }

  .days {
      display: flex;
      min-height: calc(var(--slot-h) * 14);
      /* 09:00–16:00 in 30-min slots */
  }

  .day-col {
      position: relative;
      flex: 1 1 0;
      border-left: 1px solid var(--gc-border);
      box-sizing: border-box;
  }

  .day-col:first-child {
      border-left: none;
  }

  .day-header {
      background: #eef1f4;
      border-bottom: 1px solid var(--gc-border);
      padding: 6px 8px;
      font-weight: 600;
      position: sticky;
      top: 0;
      z-index: 1;
      height: var(--day-head-h);
      display: flex;
      align-items: center;
      box-sizing: border-box;
  }

  .grid-lines {
      z-index: 1;
      position: absolute;
      /* share same containing block as events */
      left: 0;
      right: 0;
      top: 0;
      /* start at content top (after padding) */
      bottom: 0;
      /* stretch to bottom */
      pointer-events: none;
  }

  .grid-lines .line {
      height: var(--slot-h);
      border-bottom: 1px solid #f0f1f2;
      box-sizing: border-box;
  }

  .events-layer {
      position: absolute;
      top: var(--day-head-h);
      left: 0;
      right: 0;
      bottom: 0;
  }

  /* Event cards */
  .event {
      position: absolute;
      left: 6px;
      right: 6px;
      border: 1px solid var(--gc-border);
      background: #eef4ff;
      font-size: .75rem;
      padding: 6px 8px;
      box-sizing: border-box;
      z-index: 2;
      word-break: normal;
      white-space: normal;
      overflow: clip;
  }

  .event .title {
      font-weight: 600;
  }

  .event .meta {
      color: var(--gc-muted);
      font-size: .85rem;
  }

  /* Day view: single column fills width */
  .days.single {
      display: block;
  }

  .days.single .day-col {
      width: 100%;
  }

  /* View controls */
  .toolbar .view-switch {
      display: flex;
      gap: 8px;
      align-items: center;
  }

  .day-nav {
      display: none;
      align-items: center;
      gap: 6px;
  }

  .day-nav.visible {
      display: inline-flex;
  }

  .btn-plain {
      background: transparent;
      border: 1px solid var(--gc-border);
      padding: 4px 8px;
      cursor: pointer;
      font: inherit;
  }

  /* Fixed time column width */
  .calendar-day .time-col,
  .time-rail {
      width: var(--time-col-w);
  }

  /* Make day columns wider to fit class titles */
  .calendar-week .day-column {
      min-width: 260px;
      /* was smaller before */
      width: 280px;
  }

  /* ===== Nav links ===== */
  .top-actions a {
      display: inline-block;
      padding: 6px 10px;
      text-decoration: none;
      border: 1px solid var(--gc-border);
      background: var(--gc-bg);
      color: var(--gc-text);
  }

  .top-actions a+a {
      margin-left: 6px;
  }

  .top-actions a:hover {
      background: #f3f4f6;
  }

  .top-actions a.active {
      background: var(--gc-accent);
      color: #fff;
      border-color: var(--gc-accent);
  }

  .class-editor {
      background: #fff;
      border: 1px solid var(--gc-border);
      padding: 16px;
      animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
      from {
          transform: translateY(10px);
          opacity: 0;
      }

      to {
          transform: translateY(0);
          opacity: 1;
      }
  }

  /* ===== Data table (Enrolment list) ===== */
  .table-wrap {
      overflow-x: auto;
      background: var(--gc-bg);
      border: 1px solid var(--gc-border);
  }

  .table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.95rem;
  }

  .table thead th {
      position: sticky;
      top: 0;
      background: #eef1f4;
      border-bottom: 1px solid var(--gc-border);
      text-align: left;
      padding: 8px;
      white-space: nowrap;
  }

  .table tbody td {
      border-top: 1px solid #eceff1;
      padding: 8px;
      vertical-align: top;
  }

  .table tbody tr:nth-child(odd) td {
      background: #fafbfc;
  }

  .list-toolbar {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      padding: 8px 0;
  }

  .badge {
      display: inline-block;
      padding: 2px 6px;
      border: 1px solid var(--gc-border);
      background: #f1f3f5;
      color: var(--gc-text);
      font-size: 0.8rem;
      border-radius: 3px !important;
      /* only exception */
  }

  /* Student profile side panel */
  .student-panel {
      margin-top: 16px;
      border: 1px solid var(--gc-border);
      background: #fff;
  }

  .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      background: #eef1f4;
      border-bottom: 1px solid var(--gc-border);
  }

  .panel-head h2 {
      margin: 0;
      font-size: 1.1rem;
  }

  .panel-body {
      display: flex;
      gap: 24px;
      padding: 12px;
  }

  .sp-col {
      flex: 1 1 50%;
      min-width: 280px;
  }

  .kv {
      display: grid;
      grid-template-columns: 120px 1fr;
      gap: 6px 12px;
  }

  .kv dt {
      color: #4b5563;
  }

  .kv dd {
      margin: 0;
  }

  .list {
      margin: 0;
      padding-left: 18px;
  }

  .list li {
      margin: 4px 0;
  }

  #sp-close {
      min-width: auto;
      padding: 2px 8px;
  }

  @media (max-width: 840px) {
      .panel-body {
          flex-direction: column;
      }
  }

  /* Occurrence section */
  fieldset.occur {
      border: 1px solid var(--gc-border);
      padding: 8px;
      margin: 8px 0;
      background: #fafbfc;
  }

  fieldset.occur legend {
      padding: 0 6px;
      color: #4b5563;
      font-size: 0.9rem;
  }

  .occ-wrap {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 6px;
  }

  /* ===== Enrolment table sorting ===== */
  .table thead th.sortable {
      cursor: pointer;
      user-select: none;
  }

  .table thead th[aria-sort="asc"]::after {
      content: " \25B2";
  }

  .table thead th[aria-sort="desc"]::after {
      content: " \25BC";
  }

  .table thead th[aria-sort] {
      color: #0b1e36;
  }