:root {
      --navy: #12324a;
      --blue: #1f6f9f;
      --light-blue: #eaf4fa;
      --green: #17785b;
      --red: #b42318;
      --amber: #a15c00;
      --text: #1f2937;
      --muted: #667085;
      --border: #d0d5dd;
      --surface: #ffffff;
      --background: #f4f7fa;
      --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Arial, Helvetica, sans-serif;
      color: var(--text);
      background: var(--background);
      line-height: 1.45;
    }

    .page {
      width: min(1450px, calc(100% - 32px));
      margin: 24px auto 40px;
    }

    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 24px 28px;
      border-radius: 16px;
      color: #fff;
      background: linear-gradient(135deg, var(--navy), var(--blue));
      box-shadow: var(--shadow);
    }

    .header h1 {
      margin: 0 0 6px;
      font-size: clamp(24px, 3vw, 36px);
      letter-spacing: -0.4px;
    }

    .header p {
      margin: 0;
      opacity: 0.88;
    }

    .header-badge {
      min-width: 170px;
      padding: 12px 16px;
      border: 1px solid rgba(255,255,255,0.25);
      border-radius: 12px;
      background: rgba(255,255,255,0.10);
      text-align: center;
      font-weight: 700;
    }

    .header-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      flex-wrap: wrap;
    }

    .header-home-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 0 22px;
      border: 1px solid rgba(255, 255, 255, 0.45);
      border-radius: 999px;
      color: var(--navy);
      background: linear-gradient(135deg, #ffd257, #f4bd22);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.2px;
      text-decoration: none;
      transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    }

    .header-home-button:hover,
    .header-home-button:focus-visible {
      color: var(--navy);
      filter: brightness(1.04);
      transform: translateY(-1px);
      box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    }

    .layout {
      display: grid;
      grid-template-columns: 1fr;
      gap: 22px;
      margin-top: 22px;
      align-items: start;
    }

    .card {
      background: var(--surface);
      border: 1px solid #e4e7ec;
      border-radius: 16px;
      box-shadow: var(--shadow);
    }

    .form-card {
      padding: 24px;
      position: static;
    }

    .card-title {
      margin: 0 0 5px;
      color: var(--navy);
      font-size: 22px;
    }

    .card-subtitle {
      margin: 0 0 22px;
      color: var(--muted);
      font-size: 14px;
    }

    .field {
      margin-bottom: 16px;
    }

    label {
      display: block;
      margin-bottom: 7px;
      color: #344054;
      font-size: 13px;
      font-weight: 700;
    }

    select, input {
      width: 100%;
      min-height: 44px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: #fff;
      color: var(--text);
      font-size: 14px;
      outline: none;
      transition: border-color .15s ease, box-shadow .15s ease;
    }

    select:focus, input:focus {
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(31,111,159,.14);
    }

    select:disabled {
      background: #f2f4f7;
      color: #98a2b3;
      cursor: not-allowed;
    }

    .custom-instructor-input {
      margin-top: 8px;
      border-color: #b8d4e5;
      background: #fbfdff;
    }

    .custom-instructor-input::placeholder {
      color: #8a96a8;
    }

    .two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .four-col {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      align-items: end;
    }

    .five-col {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
      align-items: end;
    }

    .session-box {
      margin: 6px 0 16px;
      padding: 16px;
      border: 1px solid #d6e6ef;
      border-radius: 12px;
      background: #f8fcfe;
    }

    .session-box h3 {
      margin: 0 0 14px;
      color: var(--blue);
      font-size: 15px;
    }

    .hidden { display: none !important; }

    .hint {
      margin-top: 6px;
      color: var(--muted);
      font-size: 12px;
    }

    .button-row {
      display: flex;
      gap: 10px;
      margin-top: 20px;
    }

    button {
      min-height: 44px;
      padding: 10px 16px;
      border: 0;
      border-radius: 9px;
      font-weight: 700;
      cursor: pointer;
      transition: transform .08s ease, opacity .15s ease;
    }

    button:active { transform: translateY(1px); }

    .btn-primary {
      flex: 1;
      color: #fff;
      background: var(--blue);
    }

    .btn-secondary {
      color: var(--navy);
      background: #eaf1f5;
    }

    .btn-danger {
      color: var(--red);
      background: #fee4e2;
    }

    .message {
      display: none;
      margin-top: 16px;
      padding: 12px 14px;
      border-radius: 9px;
      font-size: 13px;
      font-weight: 700;
    }

    .message.success {
      display: block;
      color: var(--green);
      background: #ecfdf3;
      border: 1px solid #abefc6;
    }

    .message.error {
      display: block;
      color: var(--red);
      background: #fef3f2;
      border: 1px solid #fecdca;
    }

    .content-card {
      overflow: hidden;
    }

    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      padding: 20px 22px;
      border-bottom: 1px solid #e4e7ec;
    }

    .toolbar h2 {
      margin: 0;
      color: var(--navy);
      font-size: 22px;
    }

    .toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      padding: 18px 22px 0;
    }

    .stat {
      padding: 14px;
      border: 1px solid #e4e7ec;
      border-radius: 12px;
      background: #fbfcfd;
    }

    .stat strong {
      display: block;
      color: var(--navy);
      font-size: 23px;
    }

    .stat span {
      color: var(--muted);
      font-size: 12px;
    }

    .table-wrap {
      overflow-x: auto;
      padding: 18px 22px 22px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 920px;
    }

    th, td {
      padding: 12px 10px;
      border-bottom: 1px solid #e4e7ec;
      text-align: left;
      vertical-align: top;
      font-size: 13px;
    }

    th {
      position: sticky;
      top: 0;
      z-index: 1;
      color: #344054;
      background: #f8fafc;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .35px;
    }

    tbody tr:hover { background: #f8fcfe; }

    .day-pill {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 999px;
      color: var(--blue);
      background: var(--light-blue);
      font-size: 12px;
      font-weight: 700;
    }

    .credit-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 31px;
      height: 25px;
      border-radius: 999px;
      color: var(--green);
      background: #ecfdf3;
      font-weight: 700;
    }

    .delete-row {
      min-height: 32px;
      padding: 6px 9px;
      color: var(--red);
      background: #fff1f0;
      font-size: 12px;
    }

    .semester-row td {
      padding: 13px 12px;
      color: #fff;
      background: var(--navy);
      border-bottom: 0;
      font-size: 14px;
      font-weight: 700;
    }

    .semester-row small {
      margin-left: 8px;
      opacity: 0.82;
      font-weight: 400;
    }

    .pending-row { background: #fffaf0; }
    .pending-row:hover { background: #fff6e5; }

    .pending-text {
      color: var(--amber);
      font-style: italic;
      font-weight: 700;
    }

    .scheduled-text {
      color: var(--green);
      font-weight: 700;
    }

    .empty-state {
      padding: 44px 20px;
      color: var(--muted);
      text-align: center;
    }

    .empty-state strong {
      display: block;
      margin-bottom: 5px;
      color: #475467;
    }

    .footer-note {
      margin-top: 14px;
      color: var(--muted);
      font-size: 12px;
      text-align: center;
    }

    @media (max-width: 1050px) {
      .layout { grid-template-columns: 1fr; }
      .form-card { position: static; }
      .four-col, .five-col { grid-template-columns: repeat(2, 1fr); }
    }

    @media (max-width: 620px) {
      .page { width: min(100% - 18px, 1450px); margin-top: 10px; }
      .header { align-items: flex-start; flex-direction: column; padding: 20px; }
      .header-actions { width: 100%; justify-content: stretch; }
      .header-home-button { width: 100%; }
      .header-badge { min-width: 0; width: 100%; }
      .form-card { padding: 18px; }
      .two-col, .four-col, .five-col { grid-template-columns: 1fr; }
      .stats { grid-template-columns: 1fr; }
      .toolbar, .table-wrap { padding-left: 16px; padding-right: 16px; }
    }

    @media print {
      body { background: #fff; }
      .page { width: 100%; margin: 0; }
      .header { box-shadow: none; border-radius: 0; }
      .form-card, .toolbar-actions, .delete-column, .footer-note { display: none !important; }
      .layout { display: block; margin: 14px 0 0; }
      .content-card { box-shadow: none; border: 0; }
      .table-wrap { overflow: visible; padding: 10px 0; }
      table { min-width: 0; }
      th, td { font-size: 10px; padding: 7px 5px; }
    }
