/* Base reset and page structure */
:root {
    --background: #ffffff;
    --foreground: #0f172a;
    --muted-foreground: #475569;
    --border: #e2e8f0;
    --input: #d1d5db;
    --primary: #374151;
    --primary-hover: #1f2937;
    --ring: rgba(107, 114, 128, 0.35);
    --shadow: 0 0 0 rgba(0, 0, 0, 0);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

table {
    border-collapse: collapse;
    width: 100%;
}

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

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.page-shell .container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-group {
    display: flex;
    align-items: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.header-logo-img {
    width: 55px;
    height: 55px;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

.header-banner-img {
    width: 350px;
    height: 55px;
    display: none;
}

/* Main */
.site-main {
    flex: 1 1 auto;
    padding: 0;
}

.page-intro {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.page-intro h2 {
    margin: 0 0 0.55rem;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.page-intro p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #334155;
}

.result-search-form {
    max-width: 28rem;
    margin: 0 auto 2rem;
}

.search-field-wrap {
    position: relative;
}

.search-field-wrap input {
    width: 100%;
    height: 42px;
    padding: 0.5rem 4rem 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-size: 1rem;
}

.search-field-wrap input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.search-field-wrap input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--ring);
}

.search-button {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border: 0;
    border-radius: 0 0.375rem 0.375rem 0;
    background: #374151;
    color: #fff;
    transition: background-color 0.15s ease;
}

.search-button:hover {
    background: #1f2937;
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* Result area */
.result-container {
    max-width: none;
    margin: 0 auto 2rem;
}

.result-panel {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.05rem 1.1rem 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.result-summary-panel,
.result-exam-panel,
.result-note-panel {
    margin-bottom: 1rem;
}

.result-summary-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

.result-summary-actions-top {
    margin-bottom: 20px;
}

.result-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.result-section-title {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: #0f172a;
}

.result-header {
    margin-bottom: 1rem;
}

.result-header h3 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 700;
}

.result-header p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--muted-foreground);
}

.result-meta {
    margin: 0 0 1rem;
    padding: 0;
}

.result-meta-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.35rem;
    padding: 0.35rem 0;
}

.student-meta .result-meta-row {
    grid-template-columns: 145px minmax(0, 1fr) 140px minmax(0, 1fr);
    gap: 0.5rem 1rem;
    justify-items: start;
    align-items: start;
}

.student-meta .result-meta-row dt {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.3;
}

.student-meta .result-meta-row dd {
    font-weight: 400;
    color: #1e293b;
    font-size: 0.875rem;
    text-align: right;
    justify-self: end;
    line-height: 1.3;
}

.result-meta-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.result-meta dt {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
    text-align: left;
    line-height: 1.3;
}

.result-meta dd {
    margin: 0;
    color: #1e293b;
    font-weight: 400;
    font-size: 0.875rem;
    text-align: right;
    line-height: 1.3;
}

.result-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.result-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border: 0;
}

.result-table th,
.result-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
}

.result-table thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #e2e8f0;
}

.result-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.result-table tbody tr:last-child {
    border-bottom: 0;
}

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

.result-table-empty {
    text-align: center;
    color: var(--muted-foreground);
}

.result-actions {
    display: flex;
    justify-content: flex-end;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 0.45rem;
    background: #364152;
    color: #fff;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.download-button-small {
    height: 34px;
    padding: 0 0.85rem;
    border-radius: 0.45rem;
    font-size: 0.875rem;
    background: #334155;
}

.download-button:hover {
    background: #1f2937;
}

.download-button-small:hover {
    background: #17212b;
}

.download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 0.35rem;
}

.result-note-panel p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #334155;
}

.result-year-table td {
    font-size: 0.875rem;
    color: #334155;
}

.result-year-table td:first-child,
.result-year-table td:nth-child(2),
.result-year-table td:nth-child(4) {
    white-space: nowrap;
}

.result-year-table th,
.result-year-table td {
    white-space: nowrap;
}

.result-year-table th:nth-child(1),
.result-year-table td:nth-child(1) {
    width: 20%;
}

.result-year-table th:nth-child(2),
.result-year-table td:nth-child(2) {
    width: 20%;
}

.result-year-table th:nth-child(3),
.result-year-table td:nth-child(3) {
    width: 40%;
}

.result-year-table th:nth-child(4),
.result-year-table td:nth-child(4) {
    width: 20%;
}

.result-notice {
    max-width: 565px;
    margin: 0 auto 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
}

.is-removed {
    opacity: 0.45;
    text-decoration: line-through;
}

/* Footer */
.site-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.footer-row p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--muted-foreground);
}

.footer-credit p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

.footer-credit a {
    color: var(--muted-foreground);
}

.footer-credit a:hover {
    color: #2563eb;
}

/* Responsive behavior that matches the original layout. */
@media (min-width: 768px) {
    .header-banner-img {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-meta-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .student-meta .result-meta-row {
        grid-template-columns: 1fr;
    }

    .result-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-intro h2 {
        font-size: 1.75rem;
    }

    .search-field-wrap input {
        height: 42px;
    }

    .search-button {
        padding: 0 0.875rem;
    }

    .page-shell .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Admin interface */
.admin-body {
    margin: 0;
    background: #f1f5f9;
    color: #0f172a;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.admin-sidebar {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-brand-logo {
    width: 48px;
    height: 48px;
}

.admin-brand strong {
    display: block;
    font-size: 0.95rem;
}

.admin-brand span {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 0.5rem;
    color: #cbd5e1;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(148, 163, 184, 0.16);
    color: #fff;
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.5rem;
}

.admin-topbar p {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.admin-content {
    padding: 1.5rem;
}

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

.page-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.page-header p {
    margin: 0.35rem 0 0;
    color: #64748b;
}

.panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.panel-subtitle {
    margin: 1rem 0 0.75rem;
    font-weight: 700;
    color: #0f172a;
}

.stats-grid,
.dashboard-grid,
.summary-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.dashboard-link,
.summary-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.stat-card span,
.summary-card span {
    display: block;
    color: #64748b;
    font-size: 0.875rem;
}

.stat-card strong,
.summary-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.7rem;
}

.dashboard-link {
    color: #0f172a;
    font-weight: 600;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.875rem;
    color: #334155;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.button-primary,
.button-secondary,
.button-link,
.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 42px;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
}

.button-primary {
    background: #111827;
    color: #fff;
}

.button-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.button-link {
    min-height: auto;
    padding: 0;
    background: transparent;
    color: #111827;
}

.button-link.danger {
    color: #b91c1c;
}

.search-inline {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-inline input {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    background: #f8fafc;
    font-size: 0.875rem;
    color: #334155;
}

.actions {
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.empty-state {
    color: #64748b;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-muted {
    background: #e2e8f0;
    color: #334155;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.login-body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.login-card {
    width: min(100%, 440px);
    padding: 1.5rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.login-brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.login-brand img {
    width: 52px;
    height: 52px;
}

.login-brand h1 {
    margin: 0;
    font-size: 1.05rem;
}

.login-brand p,
.login-lead {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.login-card h2 {
    margin: 0.5rem 0 0.25rem;
}

.login-card form {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.login-card input {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.login-note {
    display: grid;
    gap: 0.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #475569;
}

.subject-picklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.template-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.template-radio-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.template-radio-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.template-radio-card input {
    align-self: flex-start;
}

.template-radio-card:has(input:checked) {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.template-radio-title {
    font-weight: 700;
    color: #0f172a;
}

.template-radio-type,
.template-radio-label {
    font-size: 0.875rem;
    color: #64748b;
}

.template-radio-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #334155;
    font-size: 0.875rem;
    display: grid;
    gap: 0.2rem;
}

.subject-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
}

.marks-table input[type="number"] {
    width: 100%;
    min-width: 90px;
}

.marks-table input[type="text"] {
    width: 100%;
    min-width: 120px;
}

.marks-table select {
    width: 100%;
    min-width: 90px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fff;
    font-size: 0.875rem;
}

.drag-handle {
    cursor: grab;
    text-align: center;
    vertical-align: middle;
    color: #64748b;
    font-size: 1.1rem;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

tr.is-dragging {
    opacity: 0.4;
    background-color: #f1f5f9;
}

.publish-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.result-form-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 1rem 0;
}

/* Login page */
.login-page {
    margin: 0;
    min-height: 100vh;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.login-page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 425px;
    margin-top: 1.25rem;
    border-radius: 0.5rem;
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.login-card-header p {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.login-card form {
    display: block;
}

.login-card .grid {
    display: grid;
}

.login-card .gap-4 {
    gap: 1rem;
}

.login-card .gap-2 {
    gap: 0.5rem;
}

.login-card .flex {
    display: flex;
}

.login-card .items-center {
    align-items: center;
}

.login-card .ml-auto {
    margin-left: auto;
}

.login-card .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.login-card .font-medium {
    font-weight: 500;
}

.login-card .leading-none {
    line-height: 1;
}

.login-input {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--input));
    border-radius: 0.375rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    line-height: 1.25rem;
    outline: none;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.login-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.login-input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.25rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.login-button-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-button-primary:hover {
    background: hsl(var(--primary) / 0.9);
}

.login-button-secondary {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    border-color: hsl(var(--input));
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.login-button-secondary:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.login-signup {
    color: hsl(var(--foreground));
}

.login-signup a {
    color: inherit;
}

.login-notifications {
    width: 100%;
    pointer-events: none;
}

.login-toast-stack {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    max-height: 100vh;
    padding: 1rem;
}

@media (max-width: 1024px) {

    .admin-shell,
    .stats-grid,
    .dashboard-grid,
    .summary-grid,
    .subject-picklist {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .stats-grid,
    .dashboard-grid,
    .summary-grid,
    .subject-picklist,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-inline {
        flex-direction: column;
    }

    .login-toast-stack {
        top: auto;
        bottom: 0;
        right: 0;
    }
}
