* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
.selected {
	background: red;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background-color: #f5f7fa;
	color: #333;
	line-height: 1.6;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

header {
	background-color: #003366;
	color: white;
	padding: 2rem 1rem;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

header h1 {
	font-size: 2.2rem;
	font-weight: 600;
}

.layout {
	display: flex;
	flex: 1;
}

.sidebar {
	background-color: #243f58;
	color: white;
	padding: 1.35rem 0.8rem;
	width: 220px;
	flex-shrink: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 2px 0 10px rgba(15, 23, 42, 0.12);
}

.menu {
	display: flex;
	flex-direction: column;
	gap: 0.28rem;
}

.menu img {
	height: 108px !important;
	margin: 0 auto 0.65rem !important;
	opacity: 0.96;
}

.menu > span {
	margin: 0 0.45rem 0.55rem;
	padding: 0.32rem 0.48rem;
	overflow: hidden;
	color: #bed0df;
	background: rgba(255, 255, 255, 0.055);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.menu a {
	display: flex;
	align-items: center;
	min-height: 38px;
	padding: 0.5rem 0.68rem 0.5rem 0.76rem;
	color: #e6eef5;
	background: transparent;
	border: 1px solid transparent;
	border-left: 2px solid transparent;
	border-radius: 7px;
	font-size: 0.84rem;
	font-weight: 520;
	letter-spacing: 0.005em;
	text-decoration: none;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.menu a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.085);
	border-color: rgba(255, 255, 255, 0.08);
	border-left-color: #7dd3fc;
	transform: translateX(2px);
}

.menu a:focus-visible {
	outline: 2px solid rgba(125, 211, 252, 0.75);
	outline-offset: 2px;
}

.content {
	flex: 1;
	max-width: 900px;
	margin: 0 auto;
	padding: 2rem;
}

h2 {
	font-size: 2rem;
	margin-bottom: 1.5rem;
	color: #003366;
	border-bottom: 2px solid #e0e6ed;
	padding-bottom: 0.5rem;
}
h2.no-underline {
	font-size: 2rem;
	border: none;
	color: #003366;
	padding-bottom: 0rem;
	margin-bottom: 0rem;
}

.year-group {
	margin-bottom: 2rem;
}

.year-group h3 {
	font-size: 1.4rem;
	margin-bottom: 1rem;
	color: #002244;
}

.module-link {
	display: block;
	background-color: #137970;
	border: 2px solid #137970;
	color: white;
	padding: 1.2rem;
	margin-bottom: 0.75rem;
	text-decoration: none;
	border-radius: 12px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	font-weight: 600;
	font-size: 1.1rem;
}

.module-link:hover {
	background-color: #09a123;
	border-color: #09a123;
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Assessment link styling */
.assessment-link {
	display: block;
	background-color: #137970;
	border: 2px solid #137970;
	color: white;
	padding: 1rem;
	margin-bottom: 0.75rem;
	text-decoration: none;
	border-radius: 8px;
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	font-weight: bold;
	font-size: 1.1rem;
	font-family: 'Georgia', 'Times New Roman', serif;
}

.assessment-link:hover {
	background-color: #09a123;
	border-color: #09a123;
	transform: translateY(-2px);
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
	.layout {
		flex-direction: column;
	}

	.sidebar {
		width: 100%;
		text-align: center;
		padding: 1rem;
	}

	.menu a {
		justify-content: center;
	}

	.menu img {
		height: 92px !important;
	}

	.content {
		padding: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.menu a {
		transition: none;
	}
}
.login-section {
    margin-top: 2rem;
}

/* Styled form container */
.styled-form {
    background-color: #ffffff;
    border: 1px solid #d6e0f0;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input fields */
.styled-form input[type="text"],
.styled-form input[type="password"], 
.styled-form select,
.styled-form button
{
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

/* Submit button */
.styled-form input[type="submit"] {
    background-color: #003366;
    color: white;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.styled-form input[type="submit"]:hover {
    background-color: #0055a5;
}


/*HERE*/
table {
      width: 60%;
      margin: 20px auto;
      border-collapse: collapse;
      font-family: Arial, sans-serif;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    th, td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid #ddd;
    }
    th {
      background-color: #4CAF50;
      color: white;
      font-size: 16px;
    }
    tr:nth-child(even) {
      background-color: #f9f9f9;
    }
    tr:hover {
      background-color: #f1f1f1;
    }

/* Student Search Styles */
.student-search-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.student-search-section h4 {
    color: #003366;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #137970;
    box-shadow: 0 0 0 2px rgba(19, 121, 112, 0.2);
}

.search-container button {
    padding: 0.75rem 1.5rem;
    background-color: #137970;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background-color: #0f635c;
    transform: translateY(-1px);
}

.search-container button:active {
    transform: translateY(0);
}

/* Search Results Styles */
#searchResults {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MCQ (Multiple Choice Question) Styles */
.mcq-section {
    margin: 2rem 0;
}

.mcq-container {
    /* Container made invisible - only contents are visible */
}

.mcq-container h4 {
    color: #003366;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#mcqConfigForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

#mcqConfigForm label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

#mcqConfigForm input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#mcqConfigForm input:focus {
    outline: none;
    border-color: #137970;
    box-shadow: 0 0 0 2px rgba(19, 121, 112, 0.2);
}

#mcqTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#mcqTable th {
    background-color: #137970;
    color: white;
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
    font-weight: bold;
}

#mcqTable td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    vertical-align: middle;
}

#mcqTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#mcqTable tr:hover {
    background-color: #f1f1f1;
}

.answer-select, .mark-input {
    width: 100%;
    padding: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9rem;
}

.answer-select:focus, .mark-input:focus {
    outline: none;
    border-color: #137970;
    box-shadow: 0 0 0 1px rgba(19, 121, 112, 0.3);
}

/* MCQ Button Styles */
.mcq-container button {
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mcq-container button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mcq-container button:active {
    transform: translateY(0);
}

.mcq-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* MCQ Existing Markings List Styles */
.existing-mcq-list table {
    font-size: 0.9rem;
}

.existing-mcq-list th {
    background-color: #e9ecef !important;
    color: #495057;
    font-weight: 600;
}

.existing-mcq-list tbody tr:hover {
    background-color: #f8f9fa;
}

.existing-mcq-list button {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.existing-mcq-list button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.module-selection .form-input {
  font-size: 16px;              /* text size */
  font-family: "Inter", system-ui, sans-serif;
  width: 8rem;                  /* field width; adjust as needed */
  height: 2.2rem;               /* field height */
  padding: 0.25rem 0.5rem;
  border: 1px solid #ccd;
  border-radius: 6px;
  box-sizing: border-box;
}


#studentNo.form-input { width: 10rem; }

.module-selection .number-input {
  -moz-appearance: textfield;
}
.module-selection .number-input::-webkit-outer-spin-button,
.module-selection .number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mcq-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

.mcq-table th, .mcq-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.mcq-table th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.mcq-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.mcq-table td {
    vertical-align: middle;
}

/* Identification action buttons */
.action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    color: white !important;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,1);
}
.btn-skip { background-color: #003977; margin-right: 10px; }
.btn-delete { background-color: #a90011; margin-right: 10px; }
.btn-submitandpenalize { background-color: #a97f00; margin-right: 10px; }
.btn-submit { background-color: #00711a; }
.btn-generic { background-color: #aaaaaa; }

/* Identification workspace */
.identify-form {
    margin-bottom: 0.7rem;
}

.identify-toolbar {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.identify-toolbar-fields {
    display: flex;
    flex: 1 1 320px;
    min-width: 0;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.65rem;
}

.identify-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.identify-field label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.identify-field input,
.identify-view-toolbar input,
.identify-view-toolbar select {
    box-sizing: border-box;
    height: 34px;
    padding: 0.35rem 0.55rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.identify-field input:focus,
.identify-view-toolbar input:focus,
.identify-view-toolbar select:focus {
    background: #ffffff;
    border-color: #6b93b8;
    box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.12);
}

.identify-page-field input {
    width: 72px;
}

.identify-student-field .autocomplete-wrapper,
.identify-student-field input {
    width: 250px;
    max-width: 100%;
}

.identify-student-field {
    max-width: 100%;
}

.identify-student-suggestions {
    right: auto;
    width: max(100%, 310px);
}

.identify-toolbar .autocomplete-items {
    top: calc(100% + 4px);
    bottom: auto;
    border: 1px solid #d4dbe3;
    border-radius: 6px;
    overflow: hidden auto;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.identify-duplicate {
    align-self: center;
    padding: 0.28rem 0.5rem;
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffc9c5;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.identify-toolbar-actions {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.identify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.4rem 0.68rem;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.identify-btn-secondary {
    color: #475569;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.identify-btn-secondary:hover {
    color: #1e293b;
    background: #eef2f6;
}

.identify-btn-flip {
    color: #31506d;
    background: #edf5fb;
    border-color: #b9cee0;
}

.identify-btn-flip:hover,
.identify-btn-flip[aria-pressed="true"] {
    color: #ffffff;
    background: #315f86;
    border-color: #315f86;
}

.identify-btn-danger {
    color: #b42318;
    background: transparent;
    border-color: transparent;
}

.identify-btn-danger:hover {
    color: #8f1d14;
    background: #fff1f0;
}

.identify-btn-penalty {
    color: #8a5b00;
    background: #fffaf0;
    border-color: #e7c873;
}

.identify-btn-penalty:hover {
    background: #fff3d6;
    border-color: #d2aa42;
}

.identify-btn-primary {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
}

.identify-btn-primary:hover {
    background: #0b625c;
    border-color: #0b625c;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.22);
}

.identify-btn:focus-visible {
    outline: 3px solid rgba(0, 85, 165, 0.18);
    outline-offset: 2px;
}

.identify-action-divider {
    width: 1px;
    height: 24px;
    margin: 0 0.1rem;
    background: #e2e8f0;
}

.identify-view-toolbar {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    padding: 0.35rem 0.45rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 650;
}

.identify-view-toolbar input {
    width: 48px;
}

.identify-canvas {
    width: 100%;
    min-height: 600px;
    border: 1px solid #dbe3ec !important;
}

.identify-canvas.is-flipped .page,
.identify-canvas.is-flipped > canvas {
    transform: rotate(180deg);
}

@media (max-width: 760px) {
    .identify-toolbar-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .identify-action-divider {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .identify-field input,
    .identify-view-toolbar input,
    .identify-view-toolbar select,
    .identify-btn {
        transition: none;
    }
}

/* Student-number autocomplete */
.autocomplete-wrapper { position: relative; display: inline-block; width: 200px; }
.autocomplete-wrapper input { width: 100%; }
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 9999;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
}
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    border-top: 1px solid #d4d4d4;
}
.autocomplete-item:hover { background-color: #e9e9e9; }
.autocomplete-item strong { color: #137970; }

/* Marking toolbar buttons */
.marking-toolbar {
    box-sizing: border-box;
    position: sticky;
    top: 0.5rem;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.65rem;
    padding: 0.55rem;
    background: rgba(248, 250, 252, 0.97);
    border: 1px solid #d8e1eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(6px);
    transition: width 0.18s ease;
}

.marking-toolbar-view {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}

.marking-toolbar-view input,
.marking-toolbar-view select {
    min-height: 31px;
    padding: 0.3rem 0.4rem;
    color: #334155;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font: inherit;
}

.marking-toolbar-view input {
    width: 42px;
}

.tick-tool-group {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0;
    min-width: 0;
}

.marking-toolbar-actions .tick-tool-group .marking-btn {
    flex: 1 1 auto;
}

.tick-score-control {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 0;
    margin-left: 0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 650;
    white-space: nowrap;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-7px) scale(0.96);
    transform-origin: left center;
    transition: max-width 220ms ease, margin-left 220ms ease, opacity 150ms ease, transform 220ms ease;
}

.tick-tool-group.is-active .tick-score-control {
    max-width: 112px;
    margin-left: 0.35rem;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.tick-score-control input {
    box-sizing: border-box;
    width: 58px;
    min-height: 31px;
    padding: 0.3rem 0.4rem;
    color: #334155;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font: inherit;
    font-variant-numeric: tabular-nums;
    outline: none;
}

.tick-score-control input:focus {
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px var(--gf-focus);
}

.marking-toolbar-actions {
    display: flex;
    flex: 1 1 420px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.marking-toolbar-actions .marking-btn {
    flex: 1 1 auto;
    white-space: nowrap;
}

.legacy-view-navigation {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.marking-toolbar-actions.legacy-view-navigation .marking-btn {
    flex: 0 0 auto;
    min-width: 74px;
    text-align: center;
}

.marking-page-actions {
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.45rem;
}

.unidentify-page-button {
    padding: 0.32rem 0.58rem;
    color: #64748b;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 650;
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.unidentify-page-button:hover {
    color: #9f241b;
    background: #fff5f4;
    border-color: #e7a6a1;
}

.unidentify-page-button:focus-visible {
    outline: 3px solid rgba(180, 35, 24, 0.15);
    outline-offset: 2px;
}

.unidentify-page-button:disabled {
    color: #94a3b8;
    background: #f8fafc;
    cursor: wait;
}

.marking-text-container {
    box-sizing: border-box;
    background: transparent;
}

.marking-text-handle {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: 16px;
    background: rgba(239, 232, 205, 0.96);
    border: 1px solid #cfc39a;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.marking-text-handle::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 22px;
    height: 3px;
    background: #a89a6c;
    border-radius: 999px;
    transform: translateX(-50%);
    opacity: 0.75;
}

.marking-text-handle:hover {
    background: #e8dfbd;
}

.marking-textarea {
    box-sizing: border-box;
    display: block;
    width: 210px;
    min-width: 120px;
    min-height: 44px;
    margin: 0;
    padding: 0.55rem 0.65rem;
    color: #29281f;
    background: rgba(255, 253, 240, 0.97);
    border: 1px solid #cfc39a;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 3px 10px rgba(45, 42, 27, 0.14);
    font-family: inherit;
    line-height: 1.42;
    overflow-y: hidden;
    resize: horizontal;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.marking-textarea::placeholder {
    color: #89836d;
}

.marking-textarea:hover {
    border-color: #b7a970;
}

.marking-textarea:focus {
    background: rgba(255, 254, 246, 0.99);
    border-color: #97864d;
    box-shadow: 0 0 0 3px rgba(151, 134, 77, 0.16), 0 4px 12px rgba(45, 42, 27, 0.16);
}

.marking-symbol {
    display: grid;
    place-items: center;
    color: #16a34a;
    pointer-events: none;
}

.marking-symbol-cross { color: #dc2626; }

.marking-symbol svg {
    width: 74%;
    height: 74%;
    overflow: visible;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.2));
}

.marking-symbol path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.marking-symbol-halo {
    stroke: rgba(255, 255, 255, 0.96);
    stroke-width: 6;
}

.marking-symbol-stroke {
    stroke: currentColor;
    stroke-width: 3.3;
}

.marking-symbol-check .marking-symbol-halo,
.marking-symbol-cross .marking-symbol-halo {
    fill: rgba(255, 255, 255, 0.96);
    stroke: rgba(255, 255, 255, 0.96);
    stroke-width: 4.5;
}

.marking-symbol-check .marking-symbol-stroke,
.marking-symbol-cross .marking-symbol-stroke {
    fill: currentColor;
    stroke: none;
}

.marking-btn {
    display: inline-block;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    color: white !important;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #272727;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
}
.marking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,1);
}
.marking-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-next { background-color: #22c55e; }
.btn-previous { background-color: #0077b6; }
.btn-unmarked { background-color: #0264c6; }
.btn-redo { background-color: #0077b6; }
.btn-other { background-color: #0077b6; }

.selected {
    background-color: #5ec6fe !important;
    color: #ffffff !important;
    border: 2px solid #5ec6fe;
}

@media (prefers-reduced-motion: reduce) {
    .marking-toolbar {
        transition: none;
    }

    .unidentify-page-button {
        transition: none;
    }
}

/* Live PDF upload and processing progress */
.upload-progress-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #003366;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upload-progress-header h3 {
    color: #003366;
    margin: 0 0 0.25rem;
}

.upload-progress-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

.upload-status-pill {
    color: white;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

.upload-progress-track {
    height: 14px;
    overflow: hidden;
    background: #e9ecef;
    border-radius: 999px;
}

.upload-progress-fill {
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    transition: width 0.35s ease, background-color 0.35s ease;
}

.upload-progress-percent {
    color: #495057;
    font-size: 0.82rem;
    font-weight: bold;
    margin-top: 0.35rem;
    text-align: right;
}

.upload-progress-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.upload-identify-button {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.8rem;
    color: white;
    background: #0077b6;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 65, 110, 0.18);
    font-size: 0.84rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.upload-identify-button:hover {
    color: white;
    background: #005f92;
    box-shadow: 0 4px 9px rgba(0, 65, 110, 0.24);
    transform: translateY(-1px);
}

.upload-identify-button:focus-visible {
    outline: 3px solid rgba(0, 119, 182, 0.3);
    outline-offset: 2px;
}

.upload-progress-details {
    margin-top: 0.55rem;
    text-align: right;
}

.upload-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #003366;
    background: white;
    border: 1px solid #b8c5d1;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.upload-details-toggle::-webkit-details-marker { display: none; }
.upload-details-toggle::marker { content: ""; }

.upload-details-toggle:hover {
    background: #eef4f8;
    border-color: #003366;
}

.upload-details-toggle:focus-visible {
    outline: 3px solid rgba(0, 119, 182, 0.3);
    outline-offset: 2px;
}

.upload-details-hide { display: none; }
.upload-progress-details[open] .upload-details-show { display: none; }
.upload-progress-details[open] .upload-details-hide { display: inline; }

.upload-details-chevron {
    display: inline-block;
    font-size: 1rem;
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.upload-progress-details[open] .upload-details-chevron {
    transform: rotate(180deg) translateY(1px);
}

.upload-stage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.75rem;
    text-align: left;
}

.upload-stage {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 7px;
    padding: 0.85rem;
}

.upload-stage h4 {
    color: #003366;
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
}

.upload-metric {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f1f2;
    color: #495057;
    font-size: 0.83rem;
}

.upload-metric:last-child { border-bottom: none; }
.upload-metric strong { color: #003366; font-size: 0.95rem; }
.upload-metric-error span,
.upload-metric-error strong { color: #dc3545; }

@media (max-width: 1100px) {
    .upload-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .upload-progress-header { flex-direction: column; }
    .upload-status-pill { white-space: normal; }
    .upload-stage-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .upload-identify-button { transition: none; }
}

/* ========================================================================== 
   GradeFlow visual system
   Shared application shell, components, and public landing experience.
   ========================================================================== */

:root {
    color-scheme: light;
    --gf-ink: #18313f;
    --gf-ink-strong: #0d2532;
    --gf-muted: #667b86;
    --gf-subtle: #8a9aa3;
    --gf-canvas: #f3f6f5;
    --gf-surface: #ffffff;
    --gf-surface-soft: #f8faf9;
    --gf-border: #dce5e2;
    --gf-border-strong: #c7d4d0;
    --gf-primary: #176f68;
    --gf-primary-hover: #105c56;
    --gf-primary-soft: #e8f4f1;
    --gf-navy: #143544;
    --gf-navy-deep: #0d2936;
    --gf-blue: #356b8c;
    --gf-success: #2c7a5d;
    --gf-warning: #a86f18;
    --gf-danger: #a8463d;
    --gf-danger-soft: #fff1ef;
    --gf-focus: rgba(23, 111, 104, 0.2);
    --gf-shadow-sm: 0 1px 2px rgba(13, 41, 54, 0.05), 0 4px 14px rgba(13, 41, 54, 0.04);
    --gf-shadow-md: 0 14px 40px rgba(13, 41, 54, 0.1);
    --gf-radius-sm: 8px;
    --gf-radius: 12px;
    --gf-radius-lg: 18px;
    --gf-sidebar-width: 244px;
}

html {
    min-width: 320px;
    background: var(--gf-canvas);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--gf-ink);
    background:
        radial-gradient(circle at 100% 0, rgba(23, 111, 104, 0.045), transparent 28rem),
        var(--gf-canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    color: var(--gf-ink-strong);
    background: #cde7e2;
}

a {
    color: var(--gf-primary);
    text-underline-offset: 0.16em;
}

a:hover { color: var(--gf-primary-hover); }

button,
input,
select,
textarea { font: inherit; }

button,
input[type="submit"] { -webkit-tap-highlight-color: transparent; }

:focus-visible {
    outline: 3px solid var(--gf-focus);
    outline-offset: 2px;
}

.layout {
    min-height: 100vh;
    align-items: stretch;
}

.content {
    width: min(100%, 1180px);
    max-width: 1180px;
    min-width: 0;
    margin: 0 auto;
    padding: clamp(1.4rem, 3vw, 2.75rem);
}

.content > h2:first-child,
.content > .page-heading:first-child { margin-top: 0; }

body:not(.landing-page):not(.auth-page) header {
    padding: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

h1,
h2,
h3,
h4 {
    color: var(--gf-ink-strong);
    line-height: 1.24;
    letter-spacing: -0.018em;
}

h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); }

h2,
h2.no-underline {
    margin: 0 0 1.35rem;
    padding: 0;
    color: var(--gf-ink-strong);
    border: 0;
    font-size: clamp(1.45rem, 2.4vw, 1.95rem);
    font-weight: 700;
}

h3 { font-size: 1.05rem; }
h4 { font-size: 0.93rem; }
p { color: var(--gf-ink); }

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.page-title {
    margin: 0;
    color: var(--gf-ink-strong);
    font-size: clamp(1.65rem, 2.8vw, 2.2rem);
}

.page-kicker {
    margin: 0 0 0.35rem;
    color: var(--gf-primary);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.page-intro,
.muted-copy {
    max-width: 68ch;
    color: var(--gf-muted);
}

.surface-card,
.module-info,
.student-search-section,
.progress-table,
.existing-mcq-list {
    color: var(--gf-ink);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.surface-card { padding: clamp(1.1rem, 2.5vw, 1.55rem); }

.results-chart-card { margin: 1rem 0; }

.results-chart-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.results-chart-header h2 {
    margin: 0;
    padding: 0;
    color: var(--gf-ink-strong);
    border: 0;
    font-size: 1.05rem;
}

.chart-width-control {
    display: grid;
    grid-template-columns: auto minmax(90px, 150px) 34px;
    align-items: center;
    gap: 0.55rem;
    color: var(--gf-muted);
    font-size: 0.74rem;
    font-weight: 650;
}

.chart-width-control input { accent-color: var(--gf-primary); }
.chart-width-control output { color: var(--gf-ink); font-variant-numeric: tabular-nums; }

.results-chart-stage {
    position: relative;
    width: 100%;
    height: 340px;
}

/* Application navigation */
.sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: var(--gf-sidebar-width);
    height: 100vh;
    padding: 1.15rem 0.9rem;
    overflow-y: auto;
    color: #eaf2f2;
    background:
        radial-gradient(circle at 30% 0, rgba(88, 177, 166, 0.16), transparent 18rem),
        linear-gradient(180deg, var(--gf-navy), var(--gf-navy-deep));
    border: 0;
    box-shadow: 6px 0 24px rgba(13, 41, 54, 0.1);
}

.menu {
    min-height: calc(100vh - 2.3rem);
    gap: 0;
}

.menu-brand {
    display: flex !important;
    min-height: 0 !important;
    align-items: center;
    gap: 0.82rem;
    margin: 0 0 1.2rem;
    padding: 0.3rem 0.45rem !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    text-decoration: none;
    transform: none !important;
}

.menu-brand:hover { color: #fff; }

.menu-brand img,
.menu img.menu-brand-mark {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px;
    margin: 0 !important;
    object-fit: contain;
}

.menu-brand-copy {
    min-width: 0;
    display: grid;
    gap: 0.05rem;
}

.menu-brand-copy strong {
    color: #fff;
    font-family: "Avenir Next", Avenir, Inter, "Segoe UI", sans-serif;
    font-size: 1.34rem;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.menu-brand-copy small {
    overflow: hidden;
    color: #a9c1c8;
    font-size: 0.66rem;
    letter-spacing: 0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-user {
    margin: 0 0.35rem 0.85rem;
    padding: 0.68rem 0.72rem;
    color: #d9e7e8;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
}

.menu-user-label {
    display: block;
    margin-bottom: 0.08rem;
    color: #8fb0b8;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-user-name {
    display: block;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-impersonation {
    display: grid;
    gap: 0.45rem;
    margin: 0 0.35rem 0.85rem;
    padding: 0.68rem 0.72rem;
    color: #d9e7e8;
    background: rgba(239, 181, 77, 0.1);
    border: 1px solid rgba(239, 181, 77, 0.24);
    border-radius: 10px;
}

.menu-impersonation span {
    color: #d8c69c;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.menu-impersonation form { margin: 0; }

.menu-impersonation button {
    width: 100%;
    min-height: 34px;
    padding: 0.45rem 0.55rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 650;
}

.menu-impersonation button:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-links {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.22rem;
}

.menu a.menu-link {
    min-height: 40px;
    padding: 0.56rem 0.72rem;
    color: #dce8ea;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 580;
    transform: none;
}

.menu a.menu-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.075);
    border-color: rgba(255,255,255,0.07);
    transform: translateX(2px);
}

.menu-link-back {
    margin-top: auto;
    color: #bcd0d4 !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 0 !important;
}

.menu-link-logout {
    margin-top: auto;
    color: #bcd0d4 !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 0 !important;
}

/* Buttons and links */
.button,
.primary-button,
.secondary-button,
.danger-button,
.compact-button,
.styled-form input[type="submit"],
.edit-save,
.upload-identify-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.62rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 680;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.button,
.primary-button,
.styled-form input[type="submit"],
.edit-save,
.upload-identify-button {
    color: #fff;
    background: var(--gf-primary);
    border-color: var(--gf-primary);
    box-shadow: 0 4px 12px rgba(23, 111, 104, 0.16);
}

.button:hover,
.primary-button:hover,
.styled-form input[type="submit"]:hover,
.edit-save:hover,
.upload-identify-button:hover {
    color: #fff;
    background: var(--gf-primary-hover);
    border-color: var(--gf-primary-hover);
    box-shadow: 0 7px 18px rgba(23, 111, 104, 0.2);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--gf-ink);
    background: var(--gf-surface);
    border-color: var(--gf-border-strong);
    box-shadow: none;
}

.secondary-button:hover {
    color: var(--gf-ink-strong);
    background: var(--gf-surface-soft);
    border-color: #9eb1ab;
}

.danger-button {
    color: var(--gf-danger);
    background: var(--gf-danger-soft);
    border-color: #efc7c2;
}

.danger-button:hover {
    color: #87362f;
    background: #ffe5e1;
    border-color: #e2aaa3;
}

.compact-button {
    min-height: 32px;
    padding: 0.42rem 0.65rem;
    font-size: 0.76rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

/* Forms */
.login-section { margin-top: 0; }

.form-page {
    width: min(100%, 620px);
    margin: 0 auto;
}

.styled-form {
    width: 100%;
    max-width: 620px;
    gap: 0.9rem;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.styled-form label,
.form-group label {
    color: var(--gf-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.styled-form input[type="text"],
.styled-form input[type="email"],
.styled-form input[type="password"],
.styled-form input[type="number"],
.styled-form input[type="file"],
.styled-form select,
.styled-form textarea,
.form-control,
input.form-input,
table input:not([type="submit"]),
table select {
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.72rem;
    color: var(--gf-ink-strong);
    background: #fbfcfc;
    border: 1px solid var(--gf-border-strong);
    border-radius: 9px;
    font-size: 0.92rem;
    outline: none;
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.styled-form input:hover,
.styled-form select:hover,
.styled-form textarea:hover,
.form-control:hover { border-color: #aebeba; }

.styled-form input:focus,
.styled-form select:focus,
.styled-form textarea:focus,
.form-control:focus,
input.form-input:focus,
table input:focus,
table select:focus {
    background: #fff;
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px var(--gf-focus);
}

.styled-form input[type="submit"] {
    width: auto;
    align-self: flex-start;
    margin-top: 0.2rem;
}

.form-group {
    display: grid;
    gap: 0.38rem;
}

.form-group small,
.field-help {
    color: var(--gf-muted);
    font-size: 0.76rem;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.account-form input[readonly] {
    color: var(--gf-muted);
    background: #f0f3f2;
    border-color: var(--gf-border);
    cursor: not-allowed;
}

.account-form input[readonly]:focus {
    background: #f0f3f2;
    border-color: var(--gf-border);
    box-shadow: none;
}

.account-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.2rem;
}

.account-form-actions .secondary-button { min-height: 42px; }

@media (max-width: 560px) {
    .account-form-grid { grid-template-columns: 1fr; }
}

.checkbox-label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
}

.checkbox-label input { width: auto !important; min-height: 0 !important; accent-color: var(--gf-primary); }

.data-table-form {
    width: 100%;
    max-width: none;
}

.data-table-form .table-wrap { margin-bottom: 0.2rem; }

.password-reset-form { display: grid; gap: 0.9rem; }

.password-reset-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) minmax(180px, 1fr) minmax(150px, 0.75fr) auto;
    align-items: end;
    gap: 0.7rem;
    padding: 0.9rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.password-reset-controls label {
    display: grid;
    gap: 0.3rem;
    color: var(--gf-muted);
    font-size: 0.7rem;
    font-weight: 680;
}

.password-reset-controls input,
.password-reset-controls select {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.65rem;
    color: var(--gf-ink-strong);
    background: #fbfcfc;
    border: 1px solid var(--gf-border-strong);
    border-radius: 9px;
    font: inherit;
    font-size: 0.84rem;
    outline: none;
}

.password-reset-controls input:focus,
.password-reset-controls select:focus {
    background: #fff;
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px var(--gf-focus);
}

.password-reset-selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.68rem 0.78rem;
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
}

.password-reset-selection-bar > div:first-child { display: flex; gap: 0.6rem; align-items: baseline; }
.password-reset-selection-bar strong { color: var(--gf-ink-strong); font-size: 0.8rem; }
.password-reset-selection-bar span { color: var(--gf-muted); font-size: 0.74rem; }
.password-reset-table-wrap { max-height: min(64vh, 720px); overflow: auto; }
.password-reset-table { min-width: 760px; }
.password-reset-table thead { position: sticky; top: 0; z-index: 2; }

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.table-sort-button span { color: var(--gf-subtle); font-size: 0.78rem; }
.table-sort-button.is-active { color: var(--gf-primary); }
.password-reset-user { display: grid; gap: 0.05rem; }
.password-reset-user strong { color: var(--gf-ink-strong); font-size: 0.86rem; }
.password-reset-user span { color: var(--gf-muted); font-size: 0.76rem; }
.password-reset-user small { color: var(--gf-subtle); font-size: 0.7rem; }
.password-reset-modules { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.password-reset-modules span,
.password-reset-role {
    display: inline-flex;
    padding: 0.25rem 0.45rem;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    font-size: 0.7rem;
    white-space: nowrap;
}
.password-reset-modules small { color: var(--gf-subtle); font-size: 0.75rem; }
.password-reset-select-heading,
.password-reset-checkbox { width: 74px; text-align: center; }
.password-reset-checkbox input { width: 17px; height: 17px; accent-color: var(--gf-primary); }
.password-reset-table-wrap > .student-search-empty { margin: 0.75rem; }

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-action-grid a {
    display: grid;
    gap: 0.18rem;
    padding: 0.9rem;
    color: var(--gf-ink);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
    text-decoration: none;
}

.admin-action-grid a:hover { color: var(--gf-primary); border-color: var(--gf-border-strong); }
.admin-action-grid strong { color: var(--gf-ink-strong); font-size: 0.9rem; }
.admin-action-grid span { color: var(--gf-muted); font-size: 0.75rem; }
.deregister-card { margin-top: 1rem; }
.bulk-deregister-review { display: grid; gap: 1rem; }
.bulk-deregister-review > p { margin: 0; color: var(--gf-muted); }

/* Admin diagnostics dashboard: server-rendered, with no polling or chart library. */
.dashboard-heading { align-items: center; }

.dashboard-periods {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: -0.55rem 0 1rem;
}

.dashboard-periods > span {
    margin-right: 0.2rem;
    color: var(--gf-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-periods a {
    padding: 0.34rem 0.58rem;
    color: var(--gf-muted);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-periods a:hover,
.dashboard-periods a[aria-current="page"] {
    color: var(--gf-primary);
    background: var(--gf-primary-soft);
    border-color: var(--gf-border-strong);
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.dashboard-metrics article {
    display: grid;
    align-content: start;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.9rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.dashboard-metrics span,
.dashboard-metrics small { color: var(--gf-muted); font-size: 0.7rem; }
.dashboard-metrics strong { color: var(--gf-ink-strong); font-size: 1.55rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dashboard-section { margin-bottom: 1rem; }

.dashboard-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.dashboard-section-heading h2 { margin: 0; font-size: 1.12rem; }
.dashboard-section-heading > span { color: var(--gf-muted); font-size: 0.72rem; white-space: nowrap; }
.dashboard-note { margin: -0.2rem 0 0.8rem; color: var(--gf-muted); font-size: 0.76rem; }
.dashboard-table { min-width: 620px; }
.dashboard-daily-table { min-width: 520px; }
.dashboard-table td { font-variant-numeric: tabular-nums; }

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
    gap: 1rem;
}

.dashboard-diagnostics { display: grid; gap: 0.5rem; }
.dashboard-diagnostics > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.62rem 0.7rem; background: var(--gf-surface-soft); border-radius: 8px; }
.dashboard-diagnostics dt { color: var(--gf-muted); font-size: 0.74rem; }
.dashboard-diagnostics dd { color: var(--gf-ink-strong); font-size: 0.86rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.dashboard-role-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.55rem;
}

.dashboard-role-counts > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: var(--gf-surface-soft);
    border-radius: 8px;
}

.dashboard-role-counts dt { color: var(--gf-muted); font-size: 0.76rem; }
.dashboard-role-counts dd { color: var(--gf-ink-strong); font-size: 1rem; font-weight: 750; font-variant-numeric: tabular-nums; }

.deregister-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.deregister-heading h2 { margin: 0; color: var(--gf-ink-strong); font-size: 1.15rem; }
.deregister-heading > span { padding: 0.27rem 0.48rem; color: var(--gf-danger); background: var(--gf-danger-soft); border: 1px solid #efc7c2; border-radius: 999px; font-size: 0.68rem; font-weight: 700; }
.deregister-intro { max-width: 780px; margin: 0 0 1rem; color: var(--gf-muted); font-size: 0.8rem; }
.deregister-user-form { display: grid; gap: 0.85rem; }
.deregister-user-form .student-search-section { margin-bottom: 0 !important; }

.deregister-user-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.78rem 0.85rem;
    background: #fff8f6;
    border: 1px solid #ecd5d0;
    border-radius: 9px;
}

.deregister-user-selection[hidden] { display: none; }
.deregister-user-selection > div { display: grid; gap: 0.08rem; }
.deregister-user-selection strong { color: var(--gf-ink-strong); font-size: 0.9rem; }
.deregister-user-selection span,
.deregister-user-selection small { color: var(--gf-muted); font-size: 0.74rem; }

.deregister-confirmation {
    display: grid;
    max-width: 420px;
    gap: 0.3rem;
    color: var(--gf-muted);
    font-size: 0.72rem;
    font-weight: 680;
}

.deregister-confirmation input {
    min-height: 40px;
    padding: 0.55rem 0.65rem;
    color: var(--gf-ink-strong);
    background: #fbfcfc;
    border: 1px solid var(--gf-border-strong);
    border-radius: 9px;
    font: inherit;
    font-size: 0.86rem;
}

.deregister-confirmation input:focus { border-color: var(--gf-danger); box-shadow: 0 0 0 3px rgba(168,70,61,0.12); outline: none; }
.deregister-user-form > .danger-button { justify-self: start; }

@media (max-width: 980px) {
    .password-reset-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .password-reset-controls { grid-template-columns: 1fr; }
    .password-reset-selection-bar { align-items: stretch; flex-direction: column; }
    .admin-action-grid { grid-template-columns: 1fr; }
    .deregister-user-selection { align-items: flex-start; flex-direction: column; }
}

.row-action-button {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border-strong);
    border-radius: 7px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.row-action-delete:hover { color: var(--gf-danger); background: var(--gf-danger-soft); border-color: #efc7c2; }
.row-action-add:hover { color: #fff; background: var(--gf-primary); border-color: var(--gf-primary); }

.file-picker {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    color: #fff !important;
    background: var(--gf-navy);
    border-radius: 9px;
    cursor: pointer;
    font-weight: 680 !important;
}

.file-name { color: var(--gf-muted); font-size: 0.82rem; }

/* Assessment annotation workflow */
.annotation-page {
    width: min(100%, 1080px);
}

.annotation-heading {
    margin-bottom: 1.15rem;
}

.annotation-heading .page-intro {
    margin-top: 0.45rem;
}

.annotation-preparation {
    padding: clamp(1.15rem, 2.6vw, 1.65rem);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-lg);
    box-shadow: var(--gf-shadow-sm);
}

.annotation-mcq-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
}

.annotation-mcq-option p,
.annotation-mcq-settings > p {
    margin: 0;
    color: var(--gf-muted);
    font-size: 0.8rem;
}

.annotation-mcq-settings {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
}

.annotation-mcq-settings[hidden] { display: none; }
.annotation-mcq-settings legend { padding: 0 0.35rem; font-weight: 700; }
.annotation-mcq-settings > p { margin-top: 0.85rem; }

.annotation-file-drop .annotation-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    overflow: hidden;
}

.annotation-file-drop:focus-within {
    outline: 2px solid var(--gf-primary);
    outline-offset: 3px;
}

.annotation-path {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr) 42px minmax(0, 1fr);
    align-items: center;
    margin-bottom: 1.2rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.annotation-path-step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.62rem;
    align-items: center;
    padding: 0.42rem 0.5rem;
    color: var(--gf-ink);
    border-radius: 9px;
    text-decoration: none;
    transition: background-color 150ms ease, color 150ms ease;
}

.annotation-path-step:hover {
    color: var(--gf-ink-strong);
    background: var(--gf-primary-soft);
}

.annotation-path-step > span {
    grid-row: 1 / 3;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--gf-primary);
    background: var(--gf-primary-soft);
    border-radius: 50%;
    font-size: 0.76rem;
    font-weight: 800;
}

.annotation-path-step-required > span {
    color: #fff;
    background: var(--gf-primary);
}

.annotation-path-step strong {
    color: inherit;
    font-size: 0.82rem;
    line-height: 1.15;
}

.annotation-path-step small {
    color: var(--gf-muted);
    font-size: 0.69rem;
}

.annotation-path-line {
    height: 1px;
    background: var(--gf-border-strong);
}

.annotation-step {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-lg);
    box-shadow: var(--gf-shadow-sm);
    scroll-margin-top: 1rem;
}

.annotation-step-final {
    border-color: #bdd7d1;
    box-shadow: 0 1px 2px rgba(13, 41, 54, 0.05), 0 12px 30px rgba(23, 111, 104, 0.07);
}

.annotation-step-rail {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.35rem 0.75rem;
    background: linear-gradient(180deg, #f4f8f7, #edf4f2);
    border-right: 1px solid var(--gf-border);
}

.annotation-step-final .annotation-step-rail {
    background: linear-gradient(180deg, #e9f5f2, #e1f0ec);
}

.annotation-step-number {
    color: var(--gf-primary);
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.annotation-step-tag {
    padding: 0.22rem 0.42rem;
    color: var(--gf-muted);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    font-size: 0.61rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.annotation-step-tag-required {
    color: var(--gf-primary);
    border-color: #b8d7d0;
}

.annotation-step-body {
    min-width: 0;
    padding: clamp(1.15rem, 2.6vw, 1.65rem);
}

.annotation-step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.2rem;
}

.annotation-step-header h2 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.15rem, 2vw, 1.42rem);
}

.annotation-step-header p {
    max-width: 68ch;
    color: var(--gf-muted);
    font-size: 0.84rem;
}

.annotation-step-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    color: var(--gf-primary);
    background: var(--gf-primary-soft);
    border: 1px solid #cce2dd;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.annotation-step-final .annotation-step-icon {
    color: #fff;
    background: var(--gf-primary);
    border-color: var(--gf-primary);
    font-size: 1.15rem;
}

.annotation-form {
    max-width: none;
    gap: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.annotation-field-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 0.9fr) minmax(260px, 2fr);
    gap: 0.8rem;
}

.annotation-option {
    display: flex !important;
    align-items: flex-start;
    gap: 0.72rem;
    padding: 0.78rem 0.85rem;
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
    cursor: pointer;
}

.annotation-option:hover {
    background: #f1f7f5;
    border-color: #bfd3ce;
}

.annotation-option input {
    width: auto !important;
    min-height: 0 !important;
    margin-top: 0.18rem;
    accent-color: var(--gf-primary);
}

.annotation-option span {
    display: grid;
    gap: 0.12rem;
}

.annotation-option strong {
    color: var(--gf-ink-strong);
    font-size: 0.82rem;
}

.annotation-option small {
    color: var(--gf-muted);
    font-size: 0.73rem;
    font-weight: 450;
}

.annotation-option-compact {
    width: fit-content;
}

.annotation-file-sequence {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    align-items: stretch;
    gap: 0.65rem;
}

.annotation-file-drop {
    position: relative;
    display: grid !important;
    min-height: 164px;
    place-items: center;
    align-content: center;
    gap: 0.28rem;
    padding: 1.15rem;
    color: var(--gf-ink) !important;
    background: #fbfcfc;
    border: 1px dashed #aebfba;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.annotation-file-drop:hover,
.annotation-file-drop.is-dragging {
    background: var(--gf-primary-soft);
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px var(--gf-focus);
    transform: translateY(-1px);
}

.annotation-file-drop.has-file {
    background: #f0f8f5;
    border-style: solid;
    border-color: #86b8aa;
}

.annotation-file-drop.has-error {
    background: var(--gf-danger-soft);
    border-color: #dca49e;
}

.annotation-file-drop-wide {
    min-height: 152px;
}

.annotation-file-order {
    position: absolute;
    top: 0.65rem;
    left: 0.7rem;
    padding: 0.2rem 0.42rem;
    color: var(--gf-muted);
    background: #fff;
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.annotation-file-type {
    display: grid;
    width: 44px;
    height: 48px;
    place-items: center;
    color: var(--gf-primary);
    background: #fff;
    border: 1px solid #c5d7d2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(13, 41, 54, 0.06);
    font-size: 0.62rem;
    font-weight: 800;
}

.annotation-file-drop strong {
    color: var(--gf-ink-strong);
    font-size: 0.84rem;
}

.annotation-file-name {
    display: block;
    width: 100%;
    overflow: hidden;
    color: var(--gf-muted);
    font-size: 0.72rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.annotation-file-drop.has-file .annotation-file-name {
    color: var(--gf-success);
    font-weight: 650;
}

.annotation-merge-arrow {
    display: grid;
    place-items: center;
    color: var(--gf-subtle);
    font-size: 1.25rem;
}

.annotation-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--gf-border);
}

.annotation-step-actions p {
    margin: 0;
    color: var(--gf-muted);
    font-size: 0.75rem;
}

.annotation-step-actions input[type="submit"] {
    flex: 0 0 auto;
    margin: 0;
}

.annotation-step-actions input[type="submit"]:disabled {
    color: #85948f;
    background: #e8eeec;
    border-color: #d7e0dd;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 760px) {
    .annotation-path {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }

    .annotation-path-line { display: none; }
    .annotation-step { grid-template-columns: 62px minmax(0, 1fr); }
    .annotation-step-rail { padding-inline: 0.45rem; }
    .annotation-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .annotation-description-field { grid-column: 1 / -1; }
    .annotation-file-sequence { grid-template-columns: 1fr; }
    .annotation-merge-arrow { height: 24px; transform: rotate(90deg); }
}

@media (max-width: 520px) {
    .annotation-step { display: block; }
    .annotation-step-rail {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.65rem 0.85rem;
        border-right: 0;
        border-bottom: 1px solid var(--gf-border);
    }
    .annotation-step-tag { writing-mode: horizontal-tb; }
    .annotation-step-header { gap: 0.75rem; }
    .annotation-step-icon { width: 40px; height: 40px; flex-basis: 40px; }
    .annotation-field-grid { grid-template-columns: 1fr; }
    .annotation-description-field { grid-column: auto; }
    .annotation-step-actions { align-items: stretch; flex-direction: column; }
    .annotation-step-actions input[type="submit"] { width: 100%; }
}

.auth-alert {
    padding: 0.8rem 0.9rem;
    color: #256248;
    background: #edf8f3;
    border: 1px solid #b9ddcd;
    border-radius: 10px;
    font-size: 0.84rem;
}

.auth-alert-error {
    color: #8d352f;
    background: var(--gf-danger-soft);
    border-color: #efc7c2;
}

/* Tables */
table,
.mcq-table,
#mcqTable {
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: var(--gf-ink);
    background: var(--gf-surface);
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--gf-border);
    border-radius: 10px;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.86rem;
}

th,
.mcq-table th,
#mcqTable th {
    padding: 0.72rem 0.8rem;
    color: #47606c;
    background: #f1f5f3;
    border: 0;
    border-bottom: 1px solid var(--gf-border);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

td,
.mcq-table td,
#mcqTable td {
    padding: 0.72rem 0.8rem;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #e9efed;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tr:nth-child(even),
.mcq-table tbody tr:nth-child(even),
#mcqTable tr:nth-child(even) { background: transparent; }
tr:hover td,
.mcq-table tbody tr:hover td,
#mcqTable tr:hover td { background: #f8fbfa; }

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
}

.empty-state {
    padding: 1rem;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px dashed var(--gf-border-strong);
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
}

.empty-state + .primary-button { margin-top: 0.75rem; }

.class-list-confirm-form {
    display: grid;
    gap: 1rem;
}

.class-list-header-choice label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.class-list-header-choice input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
}

.class-list-header-choice span {
    display: grid;
    gap: 0.2rem;
}

.class-list-header-choice small,
.class-list-review-summary .muted-copy {
    color: var(--gf-muted);
}

.class-list-review,
.class-list-review-summary {
    display: grid;
    gap: 1rem;
}

.class-list-review[hidden] {
    display: none;
}

.class-list-section h2 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.class-list-section > .muted-copy {
    margin-bottom: 0.8rem;
}

.class-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.class-list-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* Module overview */
.module-selection { min-width: 0; }

.choose-marking-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(130px, 0.35fr) auto auto;
    align-items: end;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.choose-marking-filters label {
    display: grid;
    gap: 0.3rem;
    color: var(--gf-muted);
    font-size: 0.7rem;
    font-weight: 680;
}

.choose-marking-filters input,
.choose-marking-filters select {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.65rem;
    color: var(--gf-ink-strong);
    background: #fbfcfc;
    border: 1px solid var(--gf-border-strong);
    border-radius: 9px;
    font: inherit;
    font-size: 0.84rem;
    outline: none;
}

.choose-marking-filters input:focus,
.choose-marking-filters select:focus {
    background: #fff;
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px var(--gf-focus);
}

.choose-marking-count {
    align-self: center;
    min-width: 105px;
    color: var(--gf-muted);
    font-size: 0.76rem;
    font-weight: 650;
    text-align: right;
}

.student-marking-row {
    cursor: pointer;
    transition: background-color 140ms ease, box-shadow 140ms ease;
}

.student-marking-row:hover {
    background: #f5f9f7;
}

.student-marking-row:focus-visible {
    outline: 3px solid var(--gf-focus);
    outline-offset: -3px;
}

.student-marking-pages { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.student-marking-pages span { display: inline-flex; align-items: center; min-height: 24px; padding: 0.2rem 0.45rem; color: var(--gf-muted); background: var(--gf-surface-soft); border: 1px solid var(--gf-border); border-radius: 999px; font-size: 0.68rem; font-weight: 650; white-space: nowrap; }

.student-marking-link {
    color: var(--gf-primary);
    font-weight: 750;
    text-decoration: none;
}

.student-marking-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.18rem 0.45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 680;
    white-space: nowrap;
}

.student-marking-status.is-complete {
    color: #246b4a;
    background: #edf8f2;
    border-color: #cce8d8;
}

.student-marking-status.is-incomplete {
    color: #8b4a2c;
    background: #fff6ed;
    border-color: #f0d8c5;
}

.results-student-table th,
.results-student-table td {
    text-align: center;
}

@media (max-width: 760px) {
    .choose-marking-filters { grid-template-columns: 1fr 1fr; }
    .choose-marking-count { text-align: left; }
}

@media (max-width: 520px) {
    .choose-marking-filters { grid-template-columns: 1fr; }
}

.year-group { margin: 0 0 2rem; }
.year-group:last-child { margin-bottom: 0; }

.year-group h3 {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    color: var(--gf-muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.year-group h3::after {
    height: 1px;
    flex: 1;
    content: "";
    background: var(--gf-border);
}

.module-list,
.assessment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.module-card,
.assessment-card {
    position: relative;
    min-width: 0;
}

.module-link,
.assessment-link {
    display: grid;
    min-height: 94px;
    align-content: center;
    gap: 0.22rem;
    margin: 0;
    padding: 1rem 1.05rem;
    color: var(--gf-ink-strong);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 680;
    transition: color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.module-link:hover,
.assessment-link:hover {
    color: var(--gf-primary-hover);
    background: var(--gf-surface);
    border-color: #a9c6c0;
    box-shadow: 0 10px 25px rgba(13, 41, 54, 0.08);
    transform: translateY(-2px);
}

.module-card-title,
.assessment-card-title { min-width: 0; }

.module-card-meta,
.assessment-card-meta {
    color: var(--gf-muted);
    font-size: 0.75rem;
    font-weight: 550;
}

.module-delete {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--gf-subtle);
    background: #fff;
    border: 1px solid var(--gf-border);
    border-radius: 8px;
    text-decoration: none;
}

.module-delete:hover { color: var(--gf-danger); background: var(--gf-danger-soft); border-color: #efc7c2; }

.module-header { margin-bottom: 1.35rem; }
.module-header h1 { margin: 0 0 0.3rem; }
.module-header p { color: var(--gf-muted); }

.module-info {
    margin: 0 0 1rem !important;
    padding: 1rem !important;
    border-left: 1px solid var(--gf-border) !important;
}

.module-info-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
}

.module-marks-heading { align-items: center; }

.marks-download-actions {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    gap: 0.6rem;
}

.module-marks-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.72rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.module-marks-overview > div {
    min-width: 0;
    padding: 0.58rem 0.68rem;
    background: var(--gf-surface-soft);
    border-radius: 9px;
}

.module-marks-overview span,
.module-mark-metrics span {
    display: block;
    margin-bottom: 0.16rem;
    color: var(--gf-muted);
    font-size: 0.67rem;
    font-weight: 680;
    letter-spacing: 0.01em;
}

.module-marks-overview strong {
    color: var(--gf-ink-strong);
    font-size: 1.12rem;
    font-variant-numeric: tabular-nums;
}

.module-mark-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.module-mark-card {
    min-width: 0;
    padding: 1rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.module-mark-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.module-mark-card h2 {
    margin: 0;
    padding: 0;
    color: var(--gf-ink-strong);
    border: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.module-mark-total {
    flex: 0 0 auto;
    padding: 0.24rem 0.42rem;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px solid #e5ece9;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 680;
    white-space: nowrap;
}

.module-mark-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
    margin: 0.8rem 0 0.7rem;
}

.module-mark-metrics > div {
    min-width: 0;
    padding: 0.45rem 0.52rem;
    background: var(--gf-surface-soft);
    border-radius: 8px;
}

.module-mark-metrics strong {
    color: var(--gf-ink-strong);
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.mini-distribution {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    align-items: end;
    gap: 3px;
    height: 76px;
    padding: 7px 4px 0;
    border-bottom: 1px solid #dfe8e5;
}

.mini-distribution-bin {
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.mini-distribution-bin i {
    width: 100%;
    height: max(3px, var(--bar-height));
    background: linear-gradient(180deg, #58a69c, var(--gf-primary));
    border-radius: 3px 3px 1px 1px;
    opacity: 0.88;
    transition: opacity 140ms ease;
}

.mini-distribution-bin:hover i { opacity: 1; }

.mini-distribution-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 0.28rem;
    color: var(--gf-muted);
    font-size: 0.61rem;
    font-variant-numeric: tabular-nums;
}

.module-mark-empty {
    display: grid;
    min-height: 95px;
    place-items: center;
    margin: 0;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border-radius: 8px;
    font-size: 0.73rem;
    text-align: center;
}

.module-mark-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.72rem;
    color: var(--gf-muted);
    font-size: 0.67rem;
}

.module-mark-card > footer a {
    color: var(--gf-primary);
    font-weight: 700;
    text-decoration: none;
}

.module-mark-card > footer a:hover { text-decoration: underline; }

.module-marks-empty-state { margin-top: 1rem; text-align: center; }
.module-marks-empty-state h2 { margin-bottom: 0.35rem; }
.module-marks-empty-state p:last-child { margin: 0; color: var(--gf-muted); }

.info-metric,
.summary-metric {
    padding: 0.78rem 0.82rem;
    background: var(--gf-surface-soft);
    border: 1px solid #e8eeec;
    border-radius: 9px;
}

.info-metric span,
.summary-metric span {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--gf-muted);
    font-size: 0.7rem;
    font-weight: 680;
}

.info-metric strong,
.summary-metric strong {
    color: var(--gf-ink-strong);
    font-size: 1.12rem;
}

.summary-metric small {
    display: block;
    margin-top: 0.08rem;
    color: var(--gf-muted);
    font-size: 0.68rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.32rem 0.55rem;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 680;
}

.status-pill::before {
    width: 7px;
    height: 7px;
    content: "";
    background: var(--gf-subtle);
    border-radius: 50%;
}

.status-pill-success::before { background: var(--gf-success); }
.status-pill-warning::before { background: var(--gf-warning); }

.student-assessment-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.student-script-viewer .assessment-info-header h2 {
    margin: 0 0 0.2rem;
}

.student-script-viewer .page-intro {
    margin: 0;
}

.distinction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.58rem;
    color: #8a5c08;
    background: #fff7dc;
    border: 1px solid #ead18a;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 720;
}

.distinction-badge span {
    color: #c28a16;
    font-size: 0.82rem;
    line-height: 1;
}

.student-search-section {
    margin: 0 0 1.5rem !important;
    padding: 1rem !important;
}

.student-search-section h4 {
    margin: 0 0 0.75rem;
    color: var(--gf-ink-strong);
    font-size: 0.88rem;
}

.search-container { margin: 0 !important; gap: 0.55rem !important; }
.search-container > div input { width: 100%; }
.search-container input { min-height: 42px; border: 1px solid var(--gf-border-strong) !important; border-radius: 9px !important; }
.search-container button { background: var(--gf-primary) !important; border-radius: 9px !important; }

/* Student search: deliberately quiet, neutral and typographically restrained. */
.student-search-section {
    color: #344148;
    background: #f7f8f8 !important;
    border-color: #e4e8e7 !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.student-search-section h4 {
    color: #3d484d;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.student-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.student-search-section .search-container input {
    color: #344148;
    background: #fdfefe;
    border-color: #dfe4e3 !important;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 400;
    letter-spacing: 0;
}

.student-search-section .search-container input::placeholder { color: #939c9f; }

.student-search-section .search-container input:focus {
    border-color: #b9c2c0 !important;
    box-shadow: 0 0 0 3px rgba(80, 96, 101, 0.08);
}

.student-search-section .search-container button {
    color: #445157;
    background: #ecefef !important;
    border: 1px solid #dce1e0;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
}

.student-search-section .search-container button:hover {
    color: #29363c;
    background: #e3e7e6 !important;
    border-color: #d2d8d7;
    box-shadow: none;
    transform: none;
}

.student-search-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fafbfb;
    border: 1px solid #e1e5e4;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(40, 52, 57, 0.08);
}

.student-search-suggestion,
.student-match-button {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #3c484e;
    background: #fafbfb;
    border: 0;
    border-bottom: 1px solid #e9eceb;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.76rem 0.9rem;
    text-align: left;
    transition: background-color 120ms ease;
}

.student-search-suggestion:last-child { border-bottom: 0; }
.student-search-suggestion:hover,
.student-search-suggestion.is-active { background: #eef1f1; }

.student-search-name {
    color: #354147;
    font-weight: 600;
}

.student-search-number {
    color: #7d898d;
    font-size: 0.86rem;
    font-weight: 400;
    white-space: nowrap;
}

.student-search-empty,
.student-search-message {
    padding: 0.9rem;
    color: #7d878b;
    background: #f5f6f6;
    border: 1px solid #e7eaea;
    border-radius: 9px;
    font-size: 0.88rem;
    text-align: center;
}

#searchResults { margin-top: 0.75rem; }

.student-search-message.is-error {
    color: #6c5f5f;
    background: #f6f3f3;
    border-color: #e8e1e1;
}

.swap-user-form {
    display: grid;
    gap: 0.9rem;
}

.swap-user-form .student-search-section { margin-bottom: 0 !important; }

.swap-user-selection {
    display: grid;
    gap: 0.08rem;
    padding: 0.78rem 0.85rem;
    background: var(--gf-primary-soft);
    border: 1px solid #cfe3df;
    border-radius: 9px;
}

.swap-user-selection[hidden] { display: none; }
.swap-user-selection span { color: var(--gf-muted); font-size: 0.68rem; font-weight: 680; }
.swap-user-selection strong { color: var(--gf-ink-strong); font-size: 0.92rem; }
.swap-user-selection small { color: var(--gf-muted); font-size: 0.76rem; }
.swap-user-form > .primary-button { justify-self: start; }

.student-match-panel,
.student-result-card {
    padding: 1rem;
    color: #3c484e;
    background: #f5f6f6;
    border: 1px solid #e4e7e6;
    border-radius: 11px;
}

.student-match-heading,
.student-result-header h5 {
    margin: 0;
    color: #354147;
    font-family: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.student-match-heading { margin-bottom: 0.75rem; }
.student-match-list,
.student-result-assessments { display: grid; gap: 0.5rem; }

.student-match-button {
    background: #fbfcfc;
    border: 1px solid #e3e7e6;
    border-radius: 8px;
}

.student-match-button:hover {
    background: #f0f2f2;
    border-color: #d9dedd;
    box-shadow: none;
    transform: none;
}

.student-result-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e1e5e4;
}

.student-result-header span,
.student-result-module span { color: #7a8589; font-size: 0.86rem; }

.student-result-module {
    display: flex;
    gap: 0.5rem;
    margin: 0.8rem 0;
    font-size: 0.88rem;
}

.student-result-module strong { color: #59656a; font-weight: 600; }

.student-result-assessment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    color: #3c484e;
    background: #fbfcfc;
    border: 1px solid #e3e7e6;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.student-result-assessment:hover {
    color: #28353b;
    background: #f0f2f2;
    border-color: #d8dddc;
}

.student-result-assessment-main,
.student-result-assessment-score { display: grid; gap: 0.12rem; }
.student-result-assessment-main strong,
.student-result-assessment-score strong { color: #3b474d; font-size: 0.9rem; font-weight: 600; }
.student-result-assessment-main span,
.student-result-assessment-score span { color: #818b8f; font-size: 0.8rem; }
.student-result-assessment-score { flex: 0 0 auto; text-align: right; }
.student-result-assessment.is-complete .student-result-assessment-score span { color: #667b72; }
.student-result-assessment.is-partial .student-result-assessment-score span { color: #7d7665; }
.student-result-assessment.is-not-started .student-result-assessment-score span { color: #7c8082; }

@media (max-width: 620px) {
    .student-search-section .search-container { align-items: stretch; }
    .student-result-header,
    .student-result-assessment { align-items: flex-start; flex-direction: column; }
    .student-result-assessment-score { text-align: left; }
}

/* Assessment page */
.assessment-toolbar {
    display: flex;
    position: relative;
    z-index: 20;
    justify-content: flex-end;
    margin: 0 0 0.85rem;
}

.assessment-actions { position: relative; }

.assessment-actions summary {
    display: flex;
    min-width: 44px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.55rem 0.66rem;
    color: var(--gf-muted);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
    box-shadow: var(--gf-shadow-sm);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.assessment-actions summary::-webkit-details-marker { display: none; }
.assessment-actions summary:hover { border-color: #a9bbb6; box-shadow: 0 7px 20px rgba(13,41,54,0.08); transform: translateY(-1px); }
.actions-menu-lines { width: 18px; display: grid; gap: 3px; }
.actions-menu-lines span { height: 2px; background: #7d9098; border-radius: 999px; }
.actions-chevron { font-size: 0.72rem; transition: transform 180ms ease; }
.assessment-actions[open] .actions-chevron { transform: rotate(180deg); }

.assessment-actions-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 230px;
    padding: 0.42rem;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--gf-border);
    border-radius: 12px;
    box-shadow: var(--gf-shadow-md);
    animation: assessment-menu-in 170ms cubic-bezier(.2,.8,.2,1);
    transform-origin: top right;
    backdrop-filter: blur(10px);
}

.assessment-actions-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.7rem;
    color: var(--gf-ink);
    border-radius: 8px;
    font-size: 0.84rem;
    text-decoration: none;
}

.assessment-actions-menu a:hover { color: var(--gf-primary-hover); background: var(--gf-primary-soft); }
.assessment-actions-menu .menu-icon { width: 1.35rem; color: var(--gf-muted); text-align: center; }
.assessment-actions-menu .menu-separator { height: 1px; margin: 0.3rem 0.4rem; background: var(--gf-border); }
.assessment-actions-menu a.danger-action { color: var(--gf-danger); }
.assessment-actions-menu a.danger-action:hover { background: var(--gf-danger-soft); }

.assessment-info-card {
    margin: 0;
    padding: clamp(1rem, 2.5vw, 1.35rem);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-lg);
    box-shadow: var(--gf-shadow-sm);
}

.assessment-info-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.assessment-info-heading { min-width: 0; }
.assessment-info-name { margin: 0; color: var(--gf-ink-strong); font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 720; }
.assessment-info-context { margin: 0.25rem 0 0; color: var(--gf-muted); font-size: 0.8rem; }

.assessment-visibility-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 0.42rem;
    padding: 0.38rem 0.6rem;
    color: var(--gf-muted);
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border-strong);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 650;
    text-decoration: none;
}

.assessment-visibility-button:hover { color: var(--gf-ink); background: #fff; border-color: #9fb1ac; }
.assessment-visibility-dot { width: 7px; height: 7px; flex: 0 0 auto; background: var(--gf-subtle); border-radius: 50%; }
.assessment-visibility-button.is-visible .assessment-visibility-dot { background: var(--gf-success); box-shadow: 0 0 0 3px rgba(44,122,93,0.12); }
.assessment-visibility-action { padding-left: 0.18rem; color: var(--gf-subtle); border-left: 1px solid var(--gf-border-strong); }

.assessment-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.65rem; }
.assessment-info-metric { padding: 0.75rem 0.8rem; background: var(--gf-surface-soft); border: 1px solid #e8eeec; border-radius: 9px; }
.assessment-info-metric span { display: block; margin-bottom: 0.15rem; color: var(--gf-muted); font-size: 0.68rem; font-weight: 680; }
.assessment-info-metric strong { color: var(--gf-ink-strong); font-size: 1.08rem; }

.assessment-upload-section,
.assessment-marking-section,
.assessment-mcq-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gf-border);
}

.assessment-section-title { margin: 0 0 0.75rem; color: var(--gf-ink); font-size: 0.86rem; font-weight: 720; }
.assessment-marking-content > h3 { margin: 0.8rem 0 0.45rem; color: var(--gf-muted); font-size: 0.74rem; }
.assessment-marking-content > h3:first-child { margin-top: 0; }
.assessment-marking-content .progress-table { overflow-x: auto; }
.assessment-marking-content table { min-width: 650px; }
.assessment-mcq-subtitle { margin: 0 0 0.55rem; color: var(--gf-muted); font-size: 0.74rem; }
.assessment-mcq-content .existing-mcq-list { margin-bottom: 1rem; overflow-x: auto; }
.assessment-mcq-content .existing-mcq-list table { min-width: 560px; border: 0; }
.assessment-mcq-form { display: none; margin-top: 1rem; padding: 1rem; background: var(--gf-surface-soft); border: 1px solid var(--gf-border); border-radius: 10px; }
.assessment-mcq-form h4 { margin-bottom: 0.8rem; }
.assessment-mcq-config { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 0.85rem; }
.assessment-mcq-config > div { display: grid; gap: 0.35rem; }
.assessment-mcq-config label { color: var(--gf-muted); font-size: 0.72rem; font-weight: 680; }
.assessment-mcq-config input { width: 100%; min-height: 40px; padding: 0.55rem 0.65rem; border: 1px solid var(--gf-border-strong); border-radius: 8px; }
.assessment-mcq-table-container { display: none; margin-top: 1.15rem; }
.assessment-mcq-table-container h4 { margin-bottom: 0.3rem; }
.assessment-mcq-hint { margin: 0 0 0.75rem; color: var(--gf-muted); font-size: 0.8rem; }
.mcq-row-actions { display: flex; gap: 0.35rem; }

@keyframes assessment-menu-in {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Edit assessment */
.edit-assessment-shell { width: 100%; max-width: 680px; margin: 0 auto; }
.edit-assessment-back { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1.15rem; color: var(--gf-muted); font-size: 0.84rem; text-decoration: none; }
.edit-assessment-header { margin: 0 0 1.2rem; padding: 0; color: inherit; background: transparent; box-shadow: none; text-align: left; }
.edit-assessment-header h1 { margin: 0 0 0.3rem; color: var(--gf-ink-strong); font-size: 1.75rem; }
.edit-assessment-header p { margin: 0; color: var(--gf-muted); }
.edit-assessment-card { padding: clamp(1.15rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--gf-border); border-radius: var(--gf-radius); box-shadow: var(--gf-shadow-sm); }
.edit-assessment-form { display: grid; gap: 1rem; }
.edit-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.edit-field { display: grid; gap: 0.38rem; }
.edit-field label { color: var(--gf-ink); font-size: 0.8rem; font-weight: 680; }
.edit-field input { width: 100%; min-height: 42px; padding: 0.6rem 0.72rem; color: var(--gf-ink-strong); background: #fbfcfc; border: 1px solid var(--gf-border-strong); border-radius: 9px; outline: 0; }
.edit-field input:focus { background: #fff; border-color: var(--gf-primary); box-shadow: 0 0 0 3px var(--gf-focus); }
.edit-field small { color: var(--gf-muted); font-size: 0.75rem; }
.edit-note { display: flex; align-items: flex-start; gap: 0.55rem; padding: 0.75rem 0.8rem; color: var(--gf-muted); background: var(--gf-surface-soft); border-radius: 9px; font-size: 0.78rem; }
.edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; }
.edit-cancel { padding: 0.55rem 0.7rem; color: var(--gf-muted); font-size: 0.84rem; font-weight: 650; text-decoration: none; }
.edit-error { margin-bottom: 0.9rem; padding: 0.75rem 0.85rem; color: #8d352f; background: var(--gf-danger-soft); border: 1px solid #efc7c2; border-radius: 9px; font-size: 0.82rem; }

/* Upload and progress */
.upload-progress-card { margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.upload-progress-header { margin-bottom: 0.7rem; }
.upload-progress-header h3 { color: var(--gf-ink); font-size: 0.84rem; }
.upload-progress-header p { color: var(--gf-muted); font-size: 0.76rem; }
.upload-status-pill { padding: 0.32rem 0.58rem; font-size: 0.7rem; }
.upload-progress-track { height: 9px; background: #e5ece9; }
.upload-progress-percent { color: var(--gf-muted); font-size: 0.72rem; }
.upload-details-toggle { color: var(--gf-muted); border-color: var(--gf-border-strong); font-size: 0.7rem; }
.upload-stage-grid { gap: 0.55rem; }
.upload-stage { background: var(--gf-surface-soft); border-color: #e8eeec; }
.upload-stage h4 { color: var(--gf-ink); font-size: 0.8rem; }
.upload-metric { color: var(--gf-muted); border-color: #e4ebe8; font-size: 0.75rem; }
.upload-metric strong { color: var(--gf-ink-strong); font-size: 0.84rem; }

.marking-progress-bar { position: relative; min-width: 110px; height: 9px; overflow: hidden; background: #e5ece9; border-radius: 999px; }
.marking-progress-fill { width: var(--progress-value); height: 100%; background: var(--progress-color); border-radius: inherit; }
.marking-progress-value { color: var(--progress-color); font-weight: 720; }

/* Marking and identification workspaces */
.marking-toolbar {
    top: 0.7rem;
    gap: 0.45rem;
    padding: 0.48rem;
    background: rgba(255,255,255,0.96);
    border-color: var(--gf-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(13,41,54,0.12);
}

.marking-toolbar-actions { gap: 0.32rem; }
.marking-toolbar-view { color: var(--gf-muted); font-size: 0.76rem; }

.marking-btn {
    min-height: 34px;
    padding: 0.42rem 0.62rem;
    color: var(--gf-ink) !important;
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border-strong);
    border-radius: 7px;
    box-shadow: none;
    font-size: 0.74rem;
    font-weight: 680;
}

.marking-btn:hover { background: #edf3f1; border-color: #9eb2ac; box-shadow: none; transform: translateY(-1px); }
.marking-btn.selected { color: #fff !important; background: var(--gf-primary) !important; border-color: var(--gf-primary) !important; }
.marking-btn.btn-next { color: #fff !important; background: var(--gf-primary); border-color: var(--gf-primary); }
.unidentify-page-button { color: var(--gf-muted); border-color: var(--gf-border-strong); }

.identify-toolbar { border-color: var(--gf-border); box-shadow: var(--gf-shadow-sm); }
.identify-btn { border-radius: 7px; }
.identify-btn-primary { background: var(--gf-primary); border-color: var(--gf-primary); }
.identify-btn-primary:hover { background: var(--gf-primary-hover); border-color: var(--gf-primary-hover); }

.action-btn {
    min-height: 32px;
    padding: 0.42rem 0.68rem;
    color: var(--gf-ink) !important;
    background: var(--gf-surface-soft);
    border: 1px solid var(--gf-border-strong);
    border-radius: 7px;
    box-shadow: none;
    font-size: 0.76rem;
    font-weight: 680;
}

.action-btn:hover { color: var(--gf-primary-hover) !important; background: var(--gf-primary-soft); box-shadow: none; transform: translateY(-1px); }

.pdf-workspace {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.4rem;
}

.pdf-workspace.has-side-panel {
    width: max-content;
    max-width: none;
    grid-template-columns: max-content 210px;
}
.pdf-workspace #canvasContainer { min-width: 0; }

.pdf-marking-page .content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-right: clamp(0.75rem, 1.5vw, 1.5rem);
    padding-left: clamp(0.75rem, 1.5vw, 1.5rem);
}

.pdf-side-panel {
    box-sizing: border-box;
    position: sticky;
    top: 4.8rem;
    width: 210px;
    min-width: 0;
    padding: 0.65rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
    box-shadow: var(--gf-shadow-sm);
}

.pdf-side-panel h3 { margin: 0 0 0.45rem; font-size: 0.9rem; }
.pdf-side-panel .mcq-table { table-layout: fixed; margin-bottom: 0.55rem; font-size: 0.74rem; }
.pdf-side-panel .mcq-table th:nth-child(1),
.pdf-side-panel .mcq-table td:nth-child(1) { width: 36%; }
.pdf-side-panel .mcq-table th:nth-child(2),
.pdf-side-panel .mcq-table td:nth-child(2) { width: 40%; text-align: center; }
.pdf-side-panel .mcq-table th:nth-child(3),
.pdf-side-panel .mcq-table td:nth-child(3) { width: 24%; }
.pdf-side-panel .mcq-table th,
.pdf-side-panel .mcq-table td { padding: 0.32rem 0.38rem; line-height: 1.2; }
.pdf-side-panel .mcq-table th { font-size: 0.64rem; }
.pdf-side-panel.is-read-only .mcq-table { font-size: 0.82rem; }
.pdf-side-panel.is-read-only .mcq-table th { font-size: 0.72rem; }
.mcq-selection-input {
    box-sizing: border-box;
    width: 2.35rem;
    height: 26px;
    min-height: 26px;
    padding: 0.15rem 0.25rem;
    color: var(--gf-ink-strong);
    background: #fff;
    border: 1px solid var(--gf-border-strong);
    border-radius: 6px;
    font: inherit;
    text-align: center;
    text-transform: uppercase;
}
.mcq-selection-input:focus { border-color: var(--gf-primary); outline: 3px solid var(--gf-primary-soft); }
.mcq-summary-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; margin-top: 0.45rem; }
.mcq-summary-status { color: var(--gf-muted); font-size: 0.72rem; }
.mcq-summary-status.is-saved { color: var(--gf-success); }
.mcq-summary-status.is-error { color: var(--gf-danger); }
.nowrap { white-space: nowrap; }

.ai-view-feedback {
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.85rem 0 0;
    padding: 0.9rem;
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: 10px;
    box-shadow: var(--gf-shadow-sm);
}

.ai-view-feedback-header,
.ai-view-feedback-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.ai-view-feedback-header { margin-bottom: 0.7rem; }
.ai-view-feedback-header h2 { margin: 0; font-size: 1rem; }
.ai-view-feedback-list { display: grid; gap: 0.55rem; }
.ai-view-feedback-item { padding: 0.7rem 0.75rem; background: var(--gf-surface-soft); border: 1px solid #e4ebe8; border-radius: 8px; }
.ai-view-feedback-item[data-region-number] { border-left: 4px solid var(--ai-region-color); }
.ai-view-feedback-meta { margin-bottom: 0.35rem; color: var(--gf-ink-strong); font-size: 0.76rem; }
.ai-view-feedback-meta span { color: var(--gf-primary); font-weight: 750; font-variant-numeric: tabular-nums; }
.ai-view-feedback-item p { margin: 0; color: var(--gf-ink); font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; }
.ai-feedback-text { width: 100%; min-height: 84px; resize: vertical; padding: 0.62rem 0.68rem; color: var(--gf-ink); background: #fff; border: 1px solid var(--gf-border-strong); border-radius: 7px; font: inherit; font-size: 0.8rem; line-height: 1.5; }
.ai-feedback-preview { margin-top: 0.5rem; padding: 0.65rem 0.7rem; background: #fff; border: 1px solid var(--gf-border); border-radius: 7px; }
.ai-feedback-preview > span { display: block; margin-bottom: 0.45rem; color: var(--gf-muted); font-size: 0.67rem; font-weight: 700; letter-spacing: 0.035em; text-transform: uppercase; }
.ai-formatted-feedback { color: var(--gf-ink); font-size: 0.8rem; line-height: 1.55; overflow-wrap: anywhere; }
.ai-formatted-feedback > :first-child { margin-top: 0; }
.ai-formatted-feedback > :last-child { margin-bottom: 0; }
.ai-formatted-feedback p { margin: 0.42rem 0; white-space: normal; }
.ai-formatted-feedback h4 { margin: 0.72rem 0 0.32rem; color: var(--gf-ink-strong); font-size: 0.8rem; font-weight: 750; }
.ai-formatted-feedback ul { margin: 0.3rem 0 0.55rem; padding-left: 1.25rem; }
.ai-formatted-feedback li { margin: 0.24rem 0; padding-left: 0.12rem; }
.ai-formatted-feedback strong { color: var(--gf-ink-strong); font-weight: 750; }
.ai-formatted-feedback code { padding: 0.08rem 0.25rem; background: #e9efed; border-radius: 4px; font-size: 0.76rem; }
.ai-inline-math { display: inline-block; padding: 0 0.12rem; color: var(--gf-ink-strong); font-family: Georgia, 'Times New Roman', serif; font-size: 1.02em; font-style: italic; white-space: nowrap; }
.ai-inline-math sub, .ai-inline-math sup { font-size: 0.72em; }
.ai-feedback-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.65rem; margin-top: 0.5rem; }
.ai-feedback-save-status { color: var(--gf-muted); font-size: 0.72rem; }
.ai-feedback-save-status.is-saved { color: var(--gf-primary); }
.ai-feedback-save-status.is-error { color: #8d352f; }
.ai-visible-evidence {
    margin: 0.58rem 0 0 !important;
    padding-top: 0.5rem;
    color: var(--gf-muted) !important;
    border-top: 1px solid var(--gf-border);
    font-size: 0.74rem !important;
}
.ai-visible-evidence strong { color: var(--gf-ink-strong); }

.ai-region-tone-1 { --ai-region-color: #2563eb; --ai-region-fill: rgba(37, 99, 235, 0.10); }
.ai-region-tone-2 { --ai-region-color: #0f766e; --ai-region-fill: rgba(15, 118, 110, 0.10); }
.ai-region-tone-3 { --ai-region-color: #b45309; --ai-region-fill: rgba(180, 83, 9, 0.10); }
.ai-region-tone-4 { --ai-region-color: #7c3aed; --ai-region-fill: rgba(124, 58, 237, 0.10); }
.ai-region-tone-5 { --ai-region-color: #be123c; --ai-region-fill: rgba(190, 18, 60, 0.10); }

.ai-region-overlay-layer {
    position: absolute;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.ai-region-overlay-box {
    box-sizing: border-box;
    position: absolute;
    min-width: 2px;
    min-height: 2px;
    background: var(--ai-region-fill);
    border: 2px solid var(--ai-region-color);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.ai-region-overlay-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.16rem 0.34rem;
    color: #fff;
    background: var(--ai-region-color);
    border-radius: 0 0 3px 0;
    font-size: 0.66rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

/* Public landing and authentication */
.landing-page,
.auth-page {
    color: #eaf3f2;
    background:
        radial-gradient(circle at 12% 8%, rgba(89, 180, 168, 0.18), transparent 26rem),
        radial-gradient(circle at 90% 86%, rgba(83, 134, 159, 0.16), transparent 30rem),
        var(--gf-navy-deep);
}

.simple-login-page { min-height: 100vh; }

.simple-login-shell {
    display: grid;
    position: relative;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 1rem;
    overflow: hidden;
}

.simple-login-shell::before,
.simple-login-shell::after {
    position: absolute;
    width: 28rem;
    height: 28rem;
    border: 1px solid rgba(115, 211, 200, 0.1);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.simple-login-shell::before { top: -17rem; left: -12rem; }
.simple-login-shell::after { right: -15rem; bottom: -19rem; }

.simple-login-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
}

.simple-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .68rem;
    margin-bottom: .5rem;
    color: #fff;
    font-family: "Avenir Next", Avenir, Inter, "Segoe UI", sans-serif;
    font-size: 1.48rem;
    font-weight: 680;
    letter-spacing: -.03em;
    text-decoration: none;
}

.simple-login-brand:hover { color: #fff; }
.simple-login-brand img { width: 52px; height: 52px; object-fit: contain; }
.simple-login-institution {
    margin: 0 0 1.35rem;
    color: #cce1df;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
}
.simple-login-card { padding: 1.8rem; border-radius: 18px; }
.simple-login-card .login-card-header { text-align: left; }
.simple-login-card .login-card-header h1 { margin: 0 0 .32rem; color: var(--gf-ink-strong); font-size: 1.55rem; letter-spacing: -.025em; }
.simple-login-kicker { margin: 0 0 .38rem; color: var(--gf-primary) !important; font-size: .63rem !important; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.simple-login-footer { margin: 1rem 0 0; color: #8da9ae; font-size: .68rem; text-align: center; }

.landing-shell,
.auth-shell {
    width: min(100% - 2rem, 1220px);
    min-height: 100vh;
    margin: 0 auto;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.72rem;
    color: #fff;
    font-family: "Avenir Next", Avenir, Inter, "Segoe UI", sans-serif;
    font-size: 1.42rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.landing-brand:hover { color: #fff; }
.landing-brand img { width: 56px; height: 56px; object-fit: contain; }

.landing-nav-link {
    padding: 0.48rem 0.72rem;
    color: #d7e7e7;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 650;
    text-decoration: none;
}

.landing-nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }

.landing-main {
    display: grid;
    min-height: calc(100vh - 124px);
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.65fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    padding: 1.25rem 0 3rem;
}

.landing-eyebrow {
    margin: 0 0 0.55rem;
    color: #83c9bf;
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.landing-copy h1 {
    max-width: 690px;
    margin: 0 0 0.75rem;
    color: #fff;
    font-size: clamp(2.25rem, 4.4vw, 3.85rem);
    font-weight: 690;
    letter-spacing: -0.048em;
    line-height: 1.02;
}

.landing-lead {
    max-width: 610px;
    margin: 0 0 1.25rem;
    color: #c5d8da;
    font-size: clamp(0.92rem, 1.35vw, 1.05rem);
    line-height: 1.58;
}

.workflow-explainer {
    position: relative;
    max-width: 780px;
    padding: 1rem;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
        rgba(8, 31, 45, 0.58);
    border: 1px solid rgba(154, 211, 209, 0.16);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

.workflow-explainer::before {
    position: absolute;
    width: 15rem;
    height: 15rem;
    top: -9rem;
    right: -5rem;
    background: radial-gradient(circle, rgba(22, 181, 202, 0.13), transparent 68%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.workflow-heading {
    display: flex;
    position: relative;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.workflow-kicker {
    margin: 0 0 0.12rem;
    color: #75d5d1;
    font-size: 0.61rem;
    font-weight: 760;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.workflow-heading h2 {
    margin: 0;
    padding: 0;
    color: #f3faf9;
    border: 0;
    font-size: 1rem;
    font-weight: 680;
    letter-spacing: -0.015em;
}

.workflow-duration {
    color: #90acb2;
    font-size: 0.66rem;
    white-space: nowrap;
}

.workflow-duration span { color: #61d0d0; }

.workflow-track {
    display: grid;
    position: relative;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 0 0 1.45rem;
    list-style: none;
}

.workflow-track::before {
    position: absolute;
    right: 9%;
    bottom: 0.45rem;
    left: 9%;
    height: 1px;
    background: linear-gradient(90deg, rgba(83, 202, 197, 0.25), rgba(36, 168, 218, 0.38));
    content: "";
}

.workflow-track::after {
    position: absolute;
    z-index: 3;
    bottom: calc(0.45rem - 6px);
    left: 10%;
    width: 9px;
    height: 9px;
    background: #63e0dc;
    border: 2px solid #d7fffd;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(77, 219, 215, 0.12), 0 0 16px rgba(77, 219, 215, 0.75);
    content: "";
    transform: translateX(-50%);
    animation: workflow-packet 15s ease-in-out infinite;
}

.workflow-step {
    --workflow-delay: 0s;
    display: flex;
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 168px;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.72rem;
    color: #9eb8bd;
    background: rgba(5, 29, 42, 0.82);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 11px;
    animation: workflow-focus 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-step:nth-child(2) { --workflow-delay: -12s; }
.workflow-step:nth-child(3) { --workflow-delay: -9s; }
.workflow-step:nth-child(4) { --workflow-delay: -6s; }
.workflow-step:nth-child(5) { --workflow-delay: -3s; }

.workflow-icon {
    display: grid;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    align-self: center;
    place-items: center;
    margin-bottom: 0.55rem;
    color: #8db8be;
    background: #0d3547;
    border: 1px solid rgba(140, 210, 210, 0.2);
    border-radius: 10px;
    box-shadow: 0 0 0 5px rgba(7, 35, 49, 0.88);
    animation: workflow-icon-focus 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-icon svg {
    width: 34px;
    height: 34px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.workflow-icon .workflow-paper,
.workflow-icon .workflow-page-front { fill: rgba(141, 184, 190, 0.08); }
.workflow-icon .workflow-page-back { fill: rgba(141, 184, 190, 0.035); }
.workflow-icon .workflow-page-mid { fill: rgba(141, 184, 190, 0.06); }

.workflow-number {
    position: absolute;
    top: 0.78rem;
    right: 0.7rem;
    color: #668a92;
    font-size: 0.58rem;
    font-weight: 780;
    letter-spacing: 0.08em;
}

.workflow-step strong {
    display: block;
    margin-bottom: 0.18rem;
    color: #eef8f7;
    font-size: 0.78rem;
    font-weight: 720;
}

.workflow-step > span:last-child {
    color: #91abb0;
    font-size: 0.65rem;
    line-height: 1.4;
}

.workflow-ink {
    stroke-dasharray: 28;
    animation: workflow-draw 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-scan {
    color: #67e2dc;
    filter: drop-shadow(0 0 3px rgba(103, 226, 220, 0.8));
    animation: workflow-scan 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-page-front {
    animation: workflow-sort 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-result {
    stroke-dasharray: 21;
    animation: workflow-check 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

.workflow-admin-flow {
    stroke-dasharray: 30;
    animation: workflow-admin-flow 15s ease-in-out infinite;
    animation-delay: var(--workflow-delay);
}

@keyframes workflow-packet {
    0%, 14% { left: 10%; opacity: 1; }
    20%, 34% { left: 30%; opacity: 1; }
    40%, 54% { left: 50%; opacity: 1; }
    60%, 74% { left: 70%; opacity: 1; }
    80%, 94% { left: 90%; opacity: 1; }
    98% { left: 90%; opacity: 0; }
    99% { left: 10%; opacity: 0; }
    100% { left: 10%; opacity: 1; }
}

@keyframes workflow-focus {
    0%, 14% {
        background: rgba(13, 59, 73, 0.96);
        border-color: rgba(100, 224, 216, 0.48);
        box-shadow: 0 8px 25px rgba(0,0,0,0.18);
        transform: translateY(-2px);
    }
    19%, 100% {
        background: rgba(5, 29, 42, 0.82);
        border-color: rgba(255,255,255,0.08);
        box-shadow: none;
        transform: translateY(0);
    }
}

@keyframes workflow-icon-focus {
    0%, 14% {
        color: #6ce1dc;
        background: #10495a;
        border-color: rgba(108, 225, 220, 0.55);
    }
    19%, 100% {
        color: #8db8be;
        background: #0d3547;
        border-color: rgba(140, 210, 210, 0.2);
    }
}

@keyframes workflow-draw {
    0% { stroke-dashoffset: 28; }
    10%, 14% { stroke-dashoffset: 0; }
    19%, 100% { stroke-dashoffset: 28; }
}

@keyframes workflow-scan {
    0% { opacity: 0.35; transform: translateY(-8px); }
    11%, 14% { opacity: 1; transform: translateY(8px); }
    19%, 100% { opacity: 0.35; transform: translateY(-8px); }
}

@keyframes workflow-sort {
    0% { transform: translate(-4px, -2px); }
    10%, 14% { transform: translate(0, 0); }
    19%, 100% { transform: translate(-4px, -2px); }
}

@keyframes workflow-check {
    0% { opacity: 0.25; stroke-dashoffset: 21; }
    10%, 14% { opacity: 1; stroke-dashoffset: 0; }
    19%, 100% { opacity: 0.25; stroke-dashoffset: 21; }
}

@keyframes workflow-admin-flow {
    0% { opacity: 0.3; stroke-dashoffset: 30; }
    10%, 14% { opacity: 1; stroke-dashoffset: 0; }
    19%, 100% { opacity: 0.3; stroke-dashoffset: 30; }
}

.login-card {
    padding: clamp(1.35rem, 3vw, 1.75rem);
    color: var(--gf-ink);
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.22);
}

.login-card-header { margin-bottom: 1.15rem; }
.login-card-header h2 { margin: 0 0 0.28rem; color: var(--gf-ink-strong); font-size: 1.35rem; }
.login-card-header p { color: var(--gf-muted); font-size: 0.8rem; }
.login-card .styled-form { max-width: none; padding: 0; background: transparent; border: 0; box-shadow: none; }
.login-card .styled-form input[type="submit"] { width: 100%; margin-top: 0.3rem; }
.login-help { color: var(--gf-muted); font-size: 0.76rem; text-align: center; }
.login-error { margin-bottom: 0.9rem; padding: 0.7rem 0.78rem; color: #8d352f; background: var(--gf-danger-soft); border: 1px solid #efc7c2; border-radius: 9px; font-size: 0.78rem; }

.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0 1.5rem;
    color: #8da9ae;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.72rem;
}

.landing-footer a { color: #cce1df; }

.auth-shell {
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.auth-card { width: min(100%, 460px); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 1rem; color: #fff; font-weight: 720; text-decoration: none; }
.auth-brand img { width: 44px; height: 44px; object-fit: contain; }
.auth-card .login-card { box-shadow: 0 24px 70px rgba(0,0,0,0.2); }
.auth-card .login-card-header { text-align: center; }
.auth-back { display: block; margin-top: 0.9rem; color: var(--gf-primary); font-size: 0.78rem; text-align: center; }

@media (max-width: 900px) {
    .landing-main { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
    .landing-copy { padding-top: 1rem; }
    .login-card { width: min(100%, 540px); }
}

@media (max-width: 760px) {
    .workflow-track { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 0; }
    .workflow-track::before,
    .workflow-track::after { display: none; }
    .workflow-step { min-height: 142px; }
    .workflow-step:last-child { grid-column: 1 / -1; }
    .layout { flex-direction: column; }
    .sidebar { position: relative; width: 100%; height: auto; min-height: 0; padding: 0.75rem; overflow: visible; }
    .menu { min-height: 0; }
    .menu-brand { margin-bottom: 0.5rem; }
    .menu-brand img, .menu img.menu-brand-mark { width: 44px !important; height: 44px !important; flex-basis: 44px; }
    .menu-brand-copy strong { font-size: 1.18rem; }
    .menu-user { margin-bottom: 0.55rem; }
    .menu-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .menu a.menu-link { justify-content: flex-start; }
    .menu-link-back { margin-top: 0; border-top: 1px solid rgba(255,255,255,0.1) !important; }
    .menu-link-logout { margin-top: 0; border-top: 1px solid rgba(255,255,255,0.1) !important; }
    .content { padding: 1.15rem; }
    .assessment-info-grid { grid-template-columns: 1fr; }
    .assessment-info-header { flex-direction: column; }
    .assessment-mcq-config { grid-template-columns: 1fr; }
    .edit-field-row { grid-template-columns: 1fr; }
    .search-container { flex-direction: column; }
    .search-container button { width: 100%; }
    .pdf-workspace.has-side-panel { width: 100%; grid-template-columns: minmax(0, 1fr); }
    .pdf-side-panel { position: static; width: 100%; }
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-columns { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .landing-shell, .auth-shell { width: min(100% - 1.25rem, 1180px); }
    .landing-brand { gap: 0.62rem; font-size: 1.28rem; }
    .landing-brand img { width: 50px; height: 50px; }
    .landing-main { gap: 2rem; padding-top: 0.85rem; }
    .landing-copy h1 { font-size: clamp(2.05rem, 10vw, 2.9rem); }
    .workflow-heading { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
    .workflow-explainer { padding: 0.8rem; }
    .landing-footer { align-items: flex-start; flex-direction: column; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .module-list, .assessment-list { grid-template-columns: 1fr; }
    .module-marks-overview { grid-template-columns: 1fr; }
    .marks-download-actions { width: 100%; }
    .marks-download-actions > a { flex: 1; text-align: center; }
    .button-row > * { width: 100%; }
}

@media (max-width: 440px) {
    .workflow-track { grid-template-columns: 1fr; }
    .workflow-step { min-height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .workflow-step,
    .workflow-icon,
    .workflow-ink,
    .workflow-scan,
    .workflow-page-front,
    .workflow-result,
    .workflow-admin-flow { animation: none !important; }
    .workflow-track::after { display: none; }
}

/* Queued PDF uploader */
.upload-queue {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: clamp(1.05rem, 3vw, 1.45rem);
    color: var(--gf-ink);
    background: var(--gf-surface);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    box-shadow: var(--gf-shadow-sm);
}

.upload-queue[hidden],
.upload-queue [hidden] { display: none !important; }

.upload-queue-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.upload-queue-heading h2 {
    margin: 0.08rem 0 0;
    color: var(--gf-ink-strong);
    font-size: 1.08rem;
}

.upload-queue-summary {
    margin: 0;
    color: var(--gf-muted);
    font-size: 0.8rem;
    text-align: right;
}

.upload-queue-overall-label {
    color: var(--gf-ink);
    font-size: 0.76rem;
    font-weight: 700;
}

.upload-queue progress {
    display: block;
    width: 100%;
    height: 9px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: #e5ece9;
    border: 0;
    border-radius: 999px;
}

.upload-queue progress::-webkit-progress-bar {
    background: #e5ece9;
    border-radius: 999px;
}

.upload-queue progress::-webkit-progress-value {
    background: var(--gf-primary);
    border-radius: 999px;
}

.upload-queue progress::-moz-progress-bar {
    background: var(--gf-primary);
    border-radius: 999px;
}

.upload-file-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.upload-file-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    align-items: center;
    padding: 0.72rem 0.78rem;
    background: var(--gf-surface-soft);
    border: 1px solid #e3ebe8;
    border-radius: 10px;
}

.upload-file-details {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 0.5rem;
}

.upload-file-name {
    min-width: 0;
    overflow: hidden;
    color: var(--gf-ink-strong);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-size,
.upload-file-status {
    color: var(--gf-muted);
    font-size: 0.72rem;
}

.upload-file-progress { grid-column: 1 / -1; }
.upload-file-status { grid-column: 1 / -1; }
.upload-file-action { min-height: 32px; padding: 0.38rem 0.6rem; font-size: 0.72rem; }

.upload-file-item[data-state="accepted"] { background: #f0f8f5; border-color: #cfe4da; }
.upload-file-item[data-state="accepted"] .upload-file-status { color: var(--gf-primary); font-weight: 700; }
.upload-file-item[data-state="duplicate"] { background: #f6f8f8; }
.upload-file-item[data-state="failed"],
.upload-file-item[data-state="cancelled"] { background: var(--gf-danger-soft); border-color: #efc7c2; }
.upload-file-item[data-state="failed"] .upload-file-status,
.upload-file-item[data-state="cancelled"] .upload-file-status { color: var(--gf-danger); font-weight: 700; }

.upload-queue-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

@media (max-width: 620px) {
    .upload-queue-heading { align-items: flex-start; flex-direction: column; }
    .upload-queue-summary { text-align: left; }
    .upload-file-item { grid-template-columns: minmax(0, 1fr); }
    .upload-file-action { justify-self: start; }
    .upload-file-details { align-items: flex-start; flex-direction: column; gap: 0.12rem; }
    .upload-queue-actions > * { width: 100%; }
}

/* Recoverable module and assessment deletion */
.trash-page { display: grid; align-content: start; gap: 1rem; }
.trash-warning { margin: 0; }
.trash-list { display: grid; gap: 0.85rem; }
.trash-card { display: grid; gap: 0.9rem; }
.trash-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.trash-card-heading h2 { margin: 0.12rem 0 0; color: var(--gf-ink-strong); font-size: 1.05rem; }
.trash-context { margin: 0.2rem 0 0; color: var(--gf-muted); font-size: 0.78rem; }
.trash-state { flex: 0 0 auto; padding: 0.3rem 0.55rem; color: var(--gf-primary); background: var(--gf-primary-soft); border-radius: 999px; font-size: 0.7rem; font-weight: 750; text-transform: capitalize; }
.trash-state-purge_failed { color: var(--gf-danger); background: var(--gf-danger-soft); }
.trash-state-moving,
.trash-state-restoring,
.trash-state-purging { color: var(--gf-muted); background: var(--gf-surface-soft); }
.trash-metadata { display: flex; flex-wrap: wrap; gap: 0.65rem 1.5rem; margin: 0; }
.trash-metadata div { display: grid; gap: 0.12rem; }
.trash-metadata dt { color: var(--gf-muted); font-size: 0.68rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.04em; }
.trash-metadata dd { margin: 0; color: var(--gf-ink); font-size: 0.78rem; }
.trash-error { margin: 0; }
.trash-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.6rem; margin: 0; }
.trash-actions form { margin: 0; }
.trash-purge-confirmation { max-width: 34rem; padding: 0.46rem 0.65rem; border: 1px solid var(--gf-border); border-radius: 8px; }
.trash-purge-confirmation summary { color: var(--gf-danger); cursor: pointer; font-size: 0.76rem; font-weight: 750; }
.trash-purge-confirmation p { margin: 0.65rem 0; color: var(--gf-muted); font-size: 0.76rem; line-height: 1.5; }
.trash-progress { margin: 0; color: var(--gf-muted); font-size: 0.78rem; }

@media (max-width: 620px) {
    .trash-card-heading { flex-direction: column; }
    .trash-actions, .trash-actions > *, .trash-actions button { width: 100%; }
    .trash-purge-confirmation { max-width: none; }
}
