.resource-view {
      min-height: 100vh;
      background: #f4f7fb;
      padding: 8px;
    }

    .resource-shell {
      min-height: calc(100vh - 16px);
      background: #fbfcfe;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
      display: grid;
      grid-template-rows: auto auto 1fr;
    }

    .resource-tabs {
      display: flex;
      gap: 6px;
      padding: 10px 12px;
      border-bottom: 1px solid #dce3ee;
      background: white;
      overflow-x: auto;
    }

    .resource-tabs button {
      border: 1px solid #d7e2ef;
      background: #f8fafc;
      color: #164266;
      font-weight: 900;
      white-space: nowrap;
    }

    .resource-tabs button.active {
      background: var(--blue);
      color: white;
      border-color: var(--blue);
    }

    .resource-content {
      padding: 14px;
      overflow: auto;
      display: grid;
      gap: 14px;
      align-content: start;
    }

    .resource-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: white;
      padding: 16px;
    }

    .resource-hero h2 {
      margin: 0;
      color: var(--blue);
      font-size: 24px;
    }

    .resource-hero p {
      margin: 5px 0 0;
      color: #526579;
      line-height: 1.45;
    }

    .drive-content {
      grid-template-rows: auto auto 1fr;
      height: 100%;
      min-height: calc(100vh - 120px);
    }

    .drive-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: white;
      padding: 10px;
    }

    .drive-toolbar .drive-search {
      flex: 1 1 260px;
      min-width: 0;
      border: 1px solid #c7d7e8;
      border-radius: 8px;
      padding: 10px 12px;
      font-weight: 800;
      color: #16324f;
    }

    .drive-root-pane {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: white;
      padding: 18px;
      min-height: 360px;
    }

    .drive-root-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
      color: #526579;
      font-weight: 800;
    }

    .drive-root-card {
      width: min(100%, 420px);
      display: grid;
      grid-template-columns: 50px 1fr auto;
      gap: 14px;
      align-items: center;
      border: 1px solid #d7e2ef;
      border-radius: 8px;
      background: #f8fafc;
      color: #16324f;
      padding: 14px;
      text-align: left;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .drive-root-card:hover,
    .drive-root-card:focus-visible {
      background: #eef7ff;
      border-color: #1292e6;
      box-shadow: 0 10px 22px rgba(18, 146, 230, 0.14);
      transform: translateY(-1px);
      outline: none;
    }

    .drive-folder-icon {
      width: 50px;
      height: 38px;
      border-radius: 6px 6px 5px 5px;
      background: #fbbc04;
      position: relative;
      box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.08);
    }

    .drive-folder-icon::before {
      content: "";
      position: absolute;
      left: 4px;
      top: -7px;
      width: 22px;
      height: 10px;
      border-radius: 5px 5px 0 0;
      background: #fbbc04;
    }

    .drive-root-card strong {
      display: block;
      font-size: 15px;
      color: var(--blue);
    }

    .drive-root-card span {
      display: block;
      margin-top: 3px;
      color: #526579;
      font-size: 12px;
      font-weight: 800;
    }

    .drive-root-arrow {
      color: #1292e6;
      font-weight: 900;
      font-size: 22px;
    }

    .drive-frame-shell {
      min-height: 560px;
      height: calc(100vh - 280px);
      border: 1px solid #c7d7e8;
      border-radius: 8px;
      overflow: hidden;
      background: white;
    }

    .drive-frame-shell iframe {
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
      background: white;
    }

    .word-unesco-view {
      min-height: 100vh;
      background: #e7f1fb;
      padding: 0;
    }

    .word-unesco-shell {
      width: 100%;
      max-width: none;
      margin: 0;
      display: grid;
      gap: 0;
    }

    .word-unesco-frame-shell {
      min-height: calc(100vh - 88px);
      border: 0;
      border-radius: 0;
      overflow: visible;
      background: #fff;
      box-shadow: none;
    }

    .word-unesco-frame-shell iframe {
      width: 100%;
      min-height: calc(100vh - 88px);
      height: calc(100vh - 88px);
      border: 0;
      display: block;
      background: #fff;
      overflow: hidden;
    }

    .collaboration-home-panel {
      margin-top: 16px;
      border: 1px solid #cfe0ef;
      border-radius: 12px;
      background: #fff;
      padding: 16px;
      box-shadow: 0 10px 28px rgba(15, 48, 82, .08);
    }

    .word-collaboration-widget {
      position: relative;
      width: auto;
      min-width: 250px;
      border: 1px solid #cfe0ef;
      border-radius: 0;
      padding: 8px 12px;
      background: #fff;
      color: #0a416f;
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 10px;
      align-items: center;
      text-align: left;
      box-shadow: none;
      cursor: pointer;
    }

    .word-collaboration-widget:hover {
      border-color: #8fc3ef;
      background: #f4f9ff;
      transform: none;
      box-shadow: none;
    }

    .word-collaboration-widget strong,
    .word-collaboration-widget small {
      display: block;
    }

    .word-collaboration-widget strong {
      margin-bottom: 3px;
      font-size: 14px;
      font-weight: 900;
    }

    .word-collaboration-widget small {
      color: #5a7289;
      font-size: 12px;
      line-height: 1.25;
    }

    .word-collab-icon {
      position: relative;
      width: 42px;
      height: 42px;
      border-radius: 10px;
      display: grid;
      place-items: center;
      background: #165a9f;
      color: white;
      font-weight: 1000;
      letter-spacing: -.02em;
      box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1);
    }

    .word-collab-icon svg {
      width: 23px;
      height: 23px;
      display: block;
    }

    .word-collab-badge {
      position: absolute;
      top: -8px;
      right: -8px;
      min-width: 22px;
      height: 22px;
      border: 2px solid #fff;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: #e6362e;
      color: #fff;
      font-size: 11px;
      font-weight: 1000;
      line-height: 1;
    }

    .word-collab-badge[hidden] {
      display: none;
    }

    .collaboration-home-panel.compact {
      position: absolute;
      left: 0;
      top: calc(100% + 8px);
      z-index: 80;
      width: min(520px, calc(100vw - 32px));
      margin-top: 0;
      padding: 12px;
      box-shadow: 0 10px 24px rgba(15, 48, 82, .08);
    }

    .collaboration-home-panel header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 12px;
    }

    .collaboration-home-panel h3 {
      margin: 0 0 4px;
      color: #073b67;
      font-size: 20px;
    }

    .collaboration-home-panel header > span {
      min-width: 34px;
      height: 34px;
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: #eaf6ff;
      color: #07518b;
      font-weight: 900;
    }

    .collaboration-list {
      display: grid;
      gap: 10px;
    }

    .collaboration-card {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: center;
      border: 1px solid #d8e7f4;
      border-radius: 10px;
      padding: 12px;
      background: #f8fbff;
    }

    .collaboration-card .notification-kind {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      margin-bottom: 5px;
      border-radius: 999px;
      padding: 3px 8px;
      background: #e8f3ff;
      color: #07518b;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .collaboration-card.calendar-notification {
      border-left: 4px solid #f59e0b;
    }

    .collaboration-card.word-notification {
      border-left: 4px solid #165a9f;
    }

    .collaboration-card[role="button"] {
      cursor: pointer;
    }

    .collaboration-card[role="button"]:hover {
      border-color: #8fc3ef;
      background: #eef8ff;
    }

    .collaboration-card.unread {
      border-color: #87c7f5;
      background: #eef8ff;
    }

    .collaboration-card strong {
      display: block;
      color: #0a416f;
      margin-bottom: 4px;
    }

    .collaboration-card p {
      margin: 0;
      color: #465f75;
      font-size: 13px;
    }

    .notifications-dropdown-actions {
      display: flex;
      justify-content: flex-end;
      padding-top: 10px;
    }

    .notification-link-button {
      border: 0;
      background: transparent;
      color: #07518b;
      font-weight: 900;
      cursor: pointer;
      padding: 8px 0;
    }

    .notification-link-button:hover,
    .notification-link-button:focus-visible {
      text-decoration: underline;
      outline: none;
    }

    .notifications-detail-card {
      width: min(860px, calc(100vw - 32px));
    }

    .notification-detail-list {
      display: grid;
      gap: 12px;
      max-height: min(68vh, 640px);
      overflow: auto;
    }

    .notification-detail-item {
      border: 1px solid #d8e7f4;
      border-radius: 12px;
      padding: 14px;
      background: #f8fbff;
    }

    .notification-detail-item h3 {
      margin: 6px 0 8px;
      color: #073b67;
      font-size: 18px;
    }

    .notification-detail-item p {
      margin: 0 0 6px;
      color: #334155;
      line-height: 1.45;
    }

    .resource-bell {
      border: 1px solid #c7d7e8;
      border-radius: 8px;
      background: #eef7ff;
      color: #164266;
      padding: 10px 12px;
      font-weight: 900;
      min-width: 160px;
      text-align: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
      user-select: none;
    }

    .resource-bell::before {
      content: "\1F514";
      font-size: 17px;
      line-height: 1;
    }

    .resource-bell:hover,
    .resource-bell:focus-visible {
      border-color: var(--blue);
      background: #eaf6ff;
      box-shadow: 0 8px 18px rgba(31, 78, 121, 0.16);
      transform: translateY(-1px);
      outline: none;
    }

    .resource-bell.ready {
      border-color: #22c55e;
      background: #ecfdf3;
      color: #166534;
      box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
    }

    .resource-bell.ready:hover,
    .resource-bell.ready:focus-visible {
      background: #dcfce7;
      border-color: #16a34a;
      box-shadow: 0 10px 22px rgba(22, 163, 74, 0.18);
    }

    .resource-ready-alert {
      border: 1px solid #22c55e;
      border-left: 7px solid #16a34a;
      border-radius: 8px;
      background: #ecfdf3;
      color: #14532d;
      padding: 12px 14px;
      display: grid;
      gap: 4px;
      font-weight: 800;
    }

    .resource-ready-alert.full-span,
    .resource-board.full-span {
      grid-column: 1 / -1;
    }

    .resource-ready-alert strong {
      font-size: 16px;
    }

    .resource-dashboard {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .resource-stat {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: white;
      padding: 12px;
      display: grid;
      gap: 4px;
    }

    .resource-stat span {
      color: #667085;
      font-size: 12px;
      font-weight: 900;
    }

    .resource-stat strong {
      color: var(--ink);
      font-size: 24px;
    }

    .resource-layout {
      display: grid;
      grid-template-columns: 320px minmax(0, 1fr);
      gap: 12px;
      align-items: start;
    }

    .resource-layout.upload-mode {
      grid-template-columns: minmax(0, 1fr);
    }

    .resource-panel,
    .resource-board {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: white;
      padding: 12px;
      display: grid;
      gap: 10px;
    }

    .resource-panel h3,
    .resource-board h3 {
      margin: 0;
      color: var(--blue);
    }

    .resource-form {
      display: grid;
      gap: 9px;
    }

    .resource-form.single-column {
      grid-template-columns: 1fr;
    }

    .resource-form.resource-filter-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
      margin: 12px 0;
    }

    .resource-form label,
    .resource-filter label {
      display: grid;
      gap: 4px;
      color: #164266;
      font-size: 12px;
      font-weight: 900;
    }

    .resource-form input,
    .resource-form select,
    .resource-form textarea,
    .resource-filter input,
    .resource-filter select {
      width: 100%;
      border: 1px solid #c7d7e8;
      border-radius: 7px;
      padding: 8px 9px;
      background: #fbfdff;
      color: var(--ink);
      font-weight: 700;
    }

    .resource-form textarea {
      min-height: 70px;
      resize: vertical;
    }

    .resource-form button,
    .resource-board button {
      border: 1px solid #bfd0e2;
      background: #eef5fb;
      color: var(--blue);
      font-weight: 900;
    }

    .resource-form .primary,
    .resource-board .primary {
      background: var(--blue);
      color: white;
      border-color: var(--blue);
    }

    .resource-filter {
      display: grid;
      grid-template-columns: 1.3fr repeat(5, minmax(120px, 1fr)) auto;
      gap: 8px;
      align-items: end;
    }

    .resource-list-tools {
      display: flex;
      gap: 6px;
      justify-content: flex-end;
      align-items: center;
    }

    .resource-list-tools button.active {
      background: var(--blue);
      color: white;
      border-color: var(--blue);
    }

    .resource-cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
      gap: 10px;
    }

    .resource-card {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: #fff;
      padding: 12px;
      display: grid;
      gap: 8px;
      box-shadow: 0 8px 18px rgba(31, 41, 55, 0.05);
    }

    .resource-card h4 {
      margin: 0;
      color: var(--ink);
      font-size: 16px;
      line-height: 1.25;
    }

    .resource-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      color: #526579;
      font-size: 12px;
      font-weight: 800;
    }

    .resource-pill {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 4px 8px;
      background: #eef4ff;
      color: #164266;
      font-size: 11px;
      font-weight: 900;
    }

    .resource-pill.warn { background: #fff7ed; color: #c2410c; }
    .resource-pill.good { background: #ecfdf3; color: #166534; }
    .resource-pill.bad { background: #fef2f2; color: #b42318; }

    .resource-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .resource-table th,
    .resource-table td {
      border-bottom: 1px solid #e5edf5;
      padding: 9px 7px;
      text-align: left;
      vertical-align: top;
    }

    .resource-table th {
      color: #164266;
      background: #f8fafc;
      font-size: 11px;
      text-transform: uppercase;
    }

    .print-queue {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .print-column {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: #f8fafc;
      padding: 10px;
      display: grid;
      gap: 8px;
      align-content: start;
      min-height: 220px;
    }

    .print-column h3 {
      margin: 0;
      color: var(--blue);
      font-size: 15px;
    }

    .resource-chart {
      display: grid;
      gap: 8px;
    }

    .resource-print-calendar {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      border: 1px solid #c8d7e6;
      border-radius: 8px;
      overflow: hidden;
      background: white;
    }

    .resource-print-title {
      grid-column: 1 / -1;
      background: #dff0fb;
      color: var(--blue);
      padding: 10px 12px;
      font-weight: 900;
      border-top: 1px solid #c8d7e6;
      border-bottom: 1px solid #c8d7e6;
    }

    .resource-print-title:first-child {
      border-top: 0;
    }

    .resource-week-head {
      background: var(--blue);
      color: white;
      text-align: center;
      padding: 9px;
      font-size: 13px;
      font-weight: 900;
      border-right: 1px solid #c8d7e6;
    }

    .resource-day-card {
      border: 0;
      border-right: 1px solid #dce3ee;
      border-bottom: 1px solid #dce3ee;
      background: #fffdf5;
      padding: 10px;
      min-height: 132px;
      display: grid;
      gap: 6px;
      align-content: start;
      text-align: left;
      cursor: pointer;
    }

    .resource-day-card:hover,
    .resource-day-card.active {
      background: #eaf6ff;
      box-shadow: inset 0 0 0 2px var(--blue);
    }

    .resource-day-card strong {
      color: var(--ink);
      font-size: 24px;
      line-height: 1;
    }

    .resource-day-card span {
      color: #526579;
      font-size: 12px;
      font-weight: 800;
    }

    .resource-day-count {
      margin-top: 4px;
      border-radius: 5px;
      background: #eef4ff;
      color: #164266;
      padding: 5px 6px;
      font-size: 11px;
      font-weight: 900;
    }

    .resource-day-file {
      border-left: 4px solid #38bdf8;
      background: #f8fafc;
      padding: 4px 5px;
      font-size: 11px;
      line-height: 1.2;
      color: #344054;
      font-weight: 800;
    }

    .resource-print-section {
      display: grid;
      gap: 10px;
    }

    .resource-print-section h3 {
      margin: 0;
      color: var(--blue);
    }

    .print-quick-card {
      border: 1px solid #dce3ee;
      border-left: 5px solid var(--blue);
      border-radius: 8px;
      background: white;
      padding: 10px;
      display: grid;
      gap: 7px;
    }

    .resource-ready-toggle {
      border: 0;
      border-radius: 8px;
      padding: 10px 12px;
      color: white;
      font-weight: 900;
      cursor: pointer;
    }

    .resource-ready-toggle.pending {
      background: #dc2626;
    }

    .resource-ready-toggle.ready {
      background: #16a34a;
    }

    .resource-upload-card {
      width: min(760px, calc(100vw - 28px));
      max-height: calc(100vh - 36px);
      overflow: auto;
      border: 1px solid #d9e1ec;
      border-radius: 10px;
      background: white;
      box-shadow: 0 24px 70px rgba(15, 23, 42, 0.38);
      padding: 18px;
      display: grid;
      gap: 14px;
    }

    .resource-upload-card header {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: start;
    }


    .resource-upload-card h2 {
      margin: 0;
      color: var(--ink);
      font-size: 20px;
    }

    .resource-day-manage-card {
      width: min(620px, calc(100vw - 28px));
    }

    .resource-day-manage-list {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .resource-day-manage-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .resource-dropzone {
      border: 2px dashed #98b9d7;
      border-radius: 10px;
      background: #f8fbff;
      min-height: 150px;
      padding: 18px;
      display: grid;
      gap: 10px;
      place-items: center;
      text-align: center;
      color: #526579;
      font-weight: 800;
    }

    .resource-dropzone.active {
      border-color: var(--blue);
      background: #eaf6ff;
    }

    .resource-dropzone strong {
      color: var(--blue);
      font-size: 17px;
    }

    .resource-copy-options {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .resource-folder-toolbar {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) auto;
      gap: 10px;
      align-items: end;
    }

    .resource-folder-toolbar label {
      display: grid;
      gap: 4px;
      color: #164266;
      font-size: 12px;
      font-weight: 900;
    }

    .resource-folder-toolbar input {
      border: 1px solid #c7d7e8;
      border-radius: 7px;
      padding: 8px 9px;
      background: #fbfdff;
      color: var(--ink);
      font-weight: 700;
    }

    .resource-folder-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 10px;
    }

    .resource-folder {
      border: 1px solid #dce3ee;
      border-radius: 8px;
      background: #fffdf5;
      padding: 12px;
      display: grid;
      gap: 8px;
      box-shadow: 0 8px 18px rgba(31, 41, 55, 0.05);
      cursor: pointer;
      text-align: left;
      transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    }

    .resource-folder:hover,
    .resource-folder:focus-visible {
      border-color: var(--blue);
      box-shadow: 0 10px 22px rgba(31, 78, 121, 0.14);
      transform: translateY(-1px);
      outline: none;
    }

    .resource-folder-icon {
      width: 42px;
      height: 32px;
      border-radius: 6px 6px 4px 4px;
      background: #f4c542;
      position: relative;
    }

    .resource-folder-icon::before {
      content: "";
      position: absolute;
      top: -6px;
      left: 0;
      width: 22px;
      height: 9px;
      border-radius: 5px 5px 0 0;
      background: #f7d86d;
    }

    .resource-folder h4 {
      margin: 0;
      color: var(--ink);
      font-size: 15px;
    }

    .resource-file-list {
      display: grid;
      gap: 6px;
    }

    .resource-file-list.spaced {
      margin-top: 12px;
    }

    .resource-ready-delivered-action {
      margin-top: 8px;
    }

    .resource-file-row {
      border: 1px solid #e5edf5;
      border-radius: 6px;
      background: #f8fafc;
      padding: 7px;
      font-size: 12px;
      color: #344054;
      display: grid;
      gap: 3px;
    }

    .resource-file-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 4px;
    }

    .resource-file-actions button {
      border: 1px solid #bfd0e2;
      border-radius: 6px;
      background: #eef5fb;
      color: var(--blue);
      padding: 6px 8px;
      font-size: 11px;
      font-weight: 900;
    }

    .resource-breadcrumbs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      color: #526579;
      font-size: 12px;
      font-weight: 800;
    }

    .resource-breadcrumbs button {
      border: 1px solid #d7e2ef;
      background: #f8fafc;
      color: var(--blue);
      border-radius: 999px;
      padding: 5px 9px;
      font-size: 12px;
      font-weight: 900;
    }

    .resource-bar {
      display: grid;
      grid-template-columns: 150px minmax(0, 1fr) 52px;
      gap: 8px;
      align-items: center;
      font-size: 12px;
      color: #344054;
      font-weight: 800;
    }

    .resource-bar-track {
      height: 10px;
      border-radius: 999px;
      background: #e5edf5;
      overflow: hidden;
    }

    .resource-bar-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #38bdf8, #1f4e79);
    }

    @media print {
      body.print-scale * { visibility: hidden; }
      body.print-scale #gradeScaleView,
      body.print-scale #gradeScaleView * { visibility: visible; }
      body.print-scale #gradeScaleView {
        position: absolute;
        inset: 0;
        padding: 0;
        background: white;
      }
      body.print-scale #gradeScaleView .grade-top,
      body.print-scale #gradeScaleView .scale-toolbar { display: none !important; }
      body.print-scale #gradeScaleView .scale-shell {
        min-height: auto;
        border: 0;
        box-shadow: none;
      }
      body.print-scale #gradeScaleView .scale-workspace { grid-template-columns: 1fr; }
      body.print-scale #gradeScaleView .scale-panel {
        border-right: 0;
        border-bottom: 1px solid #dce3ee;
      }
    }

    .grade-card h3 {
      margin: 0;
      color: var(--blue);
      font-size: 17px;
    }

    .grade-card p {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .accumulative-intro {
      align-items: stretch;
      border-style: dashed;
      background: #f7fbff;
    }

    .accumulative-intro strong {
      color: var(--blue);
    }

    .grade-table-wrap {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: auto;
      background: white;
    }

    .grade-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 980px;
      font-size: 13px;
    }

    .grade-table th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: var(--blue);
      color: white;
      text-align: left;
      padding: 9px;
      border: 1px solid #1b4267;
    }

    .grade-table td {
      padding: 7px 8px;
      border: 1px solid var(--line);
      vertical-align: middle;
    }

    .grade-table tbody tr:nth-child(even) {
      background: #fbfcfe;
    }

    .student-name {
      font-weight: 800;
      color: var(--ink);
    }

    .grade-input {
      width: 62px;
      min-height: 38px;
      padding: 8px 6px;
      text-align: center;
      border: 1px solid #98b9d7;
      border-radius: 5px;
      background: #f7fbff;
      font-size: 13px;
      font-weight: 800;
      touch-action: manipulation;
    }

    .grade-input:disabled {
      background: #eef2f6;
      color: #667085;
    }

    .average-cell {
      font-weight: 900;
      color: var(--blue);
      text-align: center;
    }

    .accumulative-table {
      min-width: 1180px;
    }

    .accumulative-table tfoot td {
      background: #eef5fb;
      font-size: 12px;
      font-weight: 800;
      color: #123d63;
    }

    .accumulative-score {
      width: 74px;
      min-height: 34px;
      padding: 7px 6px;
      text-align: center;
      border: 1px solid #98b9d7;
      border-radius: 5px;
      background: #f7fbff;
      font-weight: 800;
    }

    .accumulative-config {
      width: 86px;
      min-height: 32px;
      padding: 6px;
      border: 1px solid #98b9d7;
      border-radius: 5px;
      background: white;
      font-weight: 800;
    }

    .accumulative-observation {
      width: 100%;
      min-width: 220px;
      min-height: 44px;
      resize: vertical;
      border: 1px solid #98b9d7;
      border-radius: 5px;
      padding: 7px;
      background: #fbfdff;
      font-family: inherit;
      font-size: 12px;
    }

    .accumulative-note {
      display: block;
      margin-top: 4px;
      color: var(--blue);
      font-size: 11px;
      font-weight: 900;
      text-align: center;
    }

    .grade-alert {
      border: 1px solid #ecd17e;
      background: #fff8df;
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 13px;
      color: #344054;
    }

    .grade-import-card {
      width: min(920px, calc(100vw - 28px));
      max-height: calc(100vh - 36px);
      overflow: auto;
      border: 1px solid #d9e1ec;
      border-radius: 10px;
      background: white;
      box-shadow: 0 24px 70px rgba(15, 23, 42, 0.38);
      padding: 18px;
    }

    .grade-import-card header {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: start;
      margin-bottom: 14px;
    }

    .grade-import-card h2 {
      margin: 0;
      font-size: 18px;
      color: var(--ink);
    }

    .grade-import-card p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }

    .grade-import-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 12px;
    }

    .grade-import-actions.flush {
      padding: 0;
      margin-top: 12px;
    }

    .grade-import-preview {
      display: grid;
      gap: 10px;
    }

    .grade-import-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .grade-import-table th {
      background: var(--blue);
      color: white;
      padding: 7px;
      border: 1px solid #1b4267;
      text-align: left;
    }

    .grade-import-table td {
      padding: 7px;
      border: 1px solid var(--line);
      vertical-align: top;
    }

    .grade-import-table input {
      width: 50px;
      padding: 5px;
      text-align: center;
    }

    .grade-import-status {
      border: 1px solid #b8d6f8;
      background: #eef6ff;
      border-radius: 8px;
      padding: 10px 12px;
      color: #17406c;
      font-size: 13px;
    }

    .report-legend {
      margin: 8px 0 10px;
      padding: 8px 10px;
      border: 1px solid #dce3ee;
      border-radius: 6px;
      background: #f8fafc;
      color: #344054;
      font-size: 12px;
    }

    .report-grade-cell {
      min-width: 28px;
      text-align: center;
      font-weight: 700;
    }

    .report-average-cell {
      text-align: center;
      font-weight: 900;
      color: var(--blue);
      background: #eef6ff;
    }

    .grade-stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 12px;
    }

    .student-report {
      width: min(100%, 850px);
      margin: 0 auto;
      padding: 42px 48px;
      border: 1px solid #d8dee8;
      background: white;
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    }

    .student-report-header {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 12px;
      align-items: center;
      border-bottom: 2px solid var(--blue);
      padding-bottom: 10px;
      margin-bottom: 14px;
    }

    .signature-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 42px;
      margin-top: 48px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
    }

    .signature-row.single-signature {
      grid-template-columns: minmax(260px, 1fr);
      justify-content: end;
    }

    .signature-line {
      border-top: 1px solid #344054;
      padding-top: 7px;
    }

    .activity-view {
      min-height: 100vh;
      background: var(--soft);
      padding: 8px;
    }

    .activity-shell {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
    }

    .activity-top {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 12px;
      align-items: center;
      padding: 8px 12px;
      border-bottom: 1px solid var(--line);
      background: white;
    }

    .activity-tabs {
      display: flex;
      gap: 0;
      background: #f8fafc;
      border-bottom: 1px solid var(--line);
    }

    .activity-tab {
      border-radius: 0;
      border-right: 1px solid var(--line);
      background: #f8fafc;
      padding: 8px 14px;
    }

    .activity-tab.active {
      background: var(--blue);
      color: white;
    }

    .activity-workspace {
      display: grid;
      grid-template-columns: minmax(290px, 360px) 1fr;
      gap: 12px;
      padding: 12px;
      min-height: calc(100vh - 132px);
    }

    .activity-panel,
    .activity-preview,
    .saved-panel {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfcfe;
      padding: 12px;
    }

    .activity-panel h2,
    .activity-preview h2,
    .saved-panel h2 {
      margin: 0 0 10px;
      color: var(--blue);
      font-size: 18px;
    }

    .activity-form {
      display: grid;
      gap: 10px;
      padding: 0;
      border: 0;
      grid-template-columns: 1fr;
    }

    .activity-form .actions,
    .activity-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .activity-actions {
      justify-content: flex-end;
      margin-bottom: 10px;
    }

    .activity-actions button,
    .activity-form button,
    .saved-card button {
      border: 1px solid #bfd0e2;
      background: #eef5fb;
      color: var(--blue);
    }

    .activity-actions .primary,
    .activity-form .primary {
      border-color: var(--blue);
      background: var(--blue);
      color: white;
    }

    .rating-box {
      display: grid;
      gap: 6px;
      padding: 8px;
      border: 1px solid #dbe6f2;
      border-radius: 7px;
      background: white;
    }

    .rating-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .planning-loader {
      display: grid;
      place-items: center;
      gap: 12px;
      min-height: 520px;
      text-align: center;
      color: #123d63;
    }

    .teacher-loader {
      position: relative;
      width: 170px;
      height: 130px;
      border-radius: 16px;
      background: linear-gradient(180deg, #eef6ff 0%, #dbeafe 100%);
      border: 1px solid #bfd0e2;
      box-shadow: 0 14px 28px rgba(31, 78, 121, 0.14);
      overflow: hidden;
    }

    .teacher-loader::before {
      content: "";
      position: absolute;
      left: 58px;
      top: 20px;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: #f4d76f;
      box-shadow: 0 54px 0 10px #1f4e79;
    }

    .paper-stack {
      position: absolute;
      left: 20px;
      bottom: 18px;
      display: grid;
      gap: 5px;
      animation: paperShift 1.2s ease-in-out infinite;
    }

    .paper-stack span {
      display: block;
      width: 48px;
      height: 30px;
      border-radius: 4px;
      background: white;
      border: 1px solid #bfd0e2;
      box-shadow: 0 4px 8px rgba(31, 78, 121, 0.08);
    }

    .planning-pencil {
      position: absolute;
      right: 24px;
      bottom: 32px;
      width: 58px;
      height: 8px;
      border-radius: 999px;
      background: #f4d76f;
      transform: rotate(-18deg);
      animation: pencilMove 0.9s ease-in-out infinite;
    }

    .planning-pencil::after {
      content: "";
      position: absolute;
      right: -8px;
      top: -4px;
      border-left: 10px solid #1f2937;
      border-top: 8px solid transparent;
      border-bottom: 8px solid transparent;
    }

    @keyframes paperShift {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-8px); }
    }

    @keyframes pencilMove {
      0%, 100% { transform: translate(0, 0) rotate(-18deg); }
      50% { transform: translate(-8px, 5px) rotate(-10deg); }
    }

    .generation-note {
      border: 1px solid #c8d9ec;
      border-radius: 7px;
      padding: 9px;
      background: #eef6ff;
      color: #123d63;
      font-size: 12px;
      line-height: 1.35;
    }

    .stars {
      display: flex;
      gap: 4px;
    }

    .star {
      width: 30px;
      height: 30px;
      padding: 0;
      border: 1px solid #f0c95d;
      background: #fff8df;
      color: #9a6a00;
      font-size: 18px;
      line-height: 1;
    }

    .star.active {
      background: #f4d76f;
      color: #473400;
    }

    .plan-document {
      background: #eef2f6;
      border: 1px solid #dce3ee;
      border-radius: 8px;
      padding: 18px;
      min-height: 620px;
      overflow: auto;
    }

    .plan-document [contenteditable="true"] {
      outline: 1px dashed transparent;
      border-radius: 5px;
      padding: 3px;
      min-height: 22px;
    }

    .plan-document [contenteditable="true"]:focus {
      outline-color: #5b9bd5;
      background: #f7fbff;
    }

    .plan-view-tabs {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin: -18px -18px 18px;
      padding: 10px 12px;
      border-bottom: 1px solid #dce3ee;
      background: #f8fafc;
      border-radius: 8px 8px 0 0;
    }

    .plan-view-tabs button {
      border: 1px solid #bfd0e2;
      background: #eef5fb;
      color: var(--blue);
      font-weight: 700;
    }

    .plan-view-tabs button.active {
      border-color: var(--blue);
      background: var(--blue);
      color: white;
    }

    .plan-view-pane.hidden {
      display: none;
    }
