:root {
    --bg: #f6f9fd;
    --surface: #ffffff;
    --surface-soft: #f7fbff;
    --line: #d7e2ef;
    --text: #55565a;
    --muted: #64748a;
    --primary: #123f6b;
    --primary-2: #1f8fb5;
    --primary-soft: #e8f5fb;
    --accent: #f47a20;
    --accent-soft: #fff1e6;
    --success: #9ed34a;
    --success-bg: #eef8df;
    --success-text: #486d16;
    --warning: #f7c62f;
    --warning-soft: #fff7d6;
    --error-bg: #fdecee;
    --error-text: #842029;
    --shadow: 0 10px 30px rgba(18, 63, 107, 0.08);
}

* { box-sizing: border-box; }

html,
body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.header {
    background: linear-gradient(180deg, var(--primary) 0%, #0f3557 100%);
    border-bottom: 3px solid rgba(31, 143, 181, 0.28);
    padding: 0.7rem 1rem;
    margin: 0;
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    font-weight: 800;
    color: #ffffff;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
    align-self: center;
}

.brand-logo {
    width: auto;
    height: 72px;
    max-width: 84px;
    object-fit: contain;
    display: block;
    border-radius: 16px;
    filter: drop-shadow(0 4px 10px rgba(7, 24, 43, 0.18));
}

.brand-block h1 {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
}

.brand-block p {
    margin: 0.1rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(244, 122, 32, 0.32);
    background: rgba(255, 255, 255, 0.08);
    color: #f1f6ff;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    font-weight: 700;
}

nav a,
.btn-link {
    text-decoration: none;
    color: #f1f6ff;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.42rem 0.68rem;
    font-weight: 600;
}

nav a:hover,
.btn-link:hover {
    border-color: rgba(244, 122, 32, 0.42);
    background: rgba(244, 122, 32, 0.12);
}

.inline-form { display: inline; }

.btn-link {
    background: transparent;
    cursor: pointer;
}

.header nav .inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.header nav .btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.42rem 0.68rem;
    line-height: 1.2;
    border: 1px solid transparent;
    color: #f1f6ff;
    font: inherit;
    font-weight: 600;
    appearance: none;
}

.btn-icon-only {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
    border-radius: 10px;
}

.btn-with-icon {
    display: inline-flex !important;
    align-items: center;
    gap: 0.42rem;
    justify-content: center;
}

.btn-svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
    flex-shrink: 0;
}

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

.container {
    width: 100%;
    margin: 0;
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
    flex: 1 0 auto;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.card.small { max-width: 620px; }

.auth-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.auth-brand-panel,
.auth-login-card {
    min-height: 460px;
}

.auth-brand-panel {
    display: grid;
    gap: 1.2rem;
    align-content: space-between;
    background:
        radial-gradient(circle at top right, rgba(244, 122, 32, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(31, 143, 181, 0.18), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f6fafe 100%);
}

.auth-brand-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-logo {
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(18, 63, 107, 0.08);
    overflow: hidden;
}

.auth-logo-school {
    width: 112px;
    height: 112px;
    padding: 0.8rem;
}

.auth-logo-expo {
    width: 200px;
    height: 112px;
    padding: 0.8rem 1rem;
}

.auth-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-logo span {
    color: var(--primary);
    font-weight: 800;
    text-align: center;
    line-height: 1.05;
}

.auth-brand-copy {
    display: grid;
    gap: 0.5rem;
}

.auth-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.auth-brand-copy h2,
.auth-login-head h3 {
    margin: 0;
    color: var(--primary);
}

.auth-brand-copy p,
.auth-login-head p {
    margin: 0;
    color: var(--muted);
}

.auth-brand-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.auth-login-card {
    display: grid;
    gap: 1rem;
    align-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.auth-login-head {
    display: grid;
    gap: 0.35rem;
}

.auth-form {
    gap: 0.85rem;
}

.auth-submit-btn {
    min-width: 160px;
}

.maintenance-public {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1.4rem;
}

.maintenance-public h2 {
    margin-bottom: 0.5rem;
}

.maintenance-public-image {
    display: block;
    width: min(100%, 520px);
    max-height: 320px;
    margin: 0.8rem auto 1rem;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid #dbe6f5;
    box-shadow: 0 10px 26px rgba(16, 36, 64, 0.18);
}

.maintenance-page {
    gap: 1rem;
}

.maintenance-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fbfdff 0%, var(--primary-soft) 100%);
}

.maintenance-kicker {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-2);
    font-weight: 700;
}

.maintenance-banner h3 {
    margin: 0.15rem 0 0.35rem;
}

.maintenance-banner p {
    margin: 0;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-head p {
    margin: 0;
}

.page-head-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
}

.maintenance-form {
    gap: 0.9rem;
}

.maintenance-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.3fr 1fr;
    gap: 0.8rem;
}

.maintenance-panel {
    border: 1px solid #d8e3f1;
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.9rem;
    display: grid;
    align-content: start;
    gap: 0.6rem;
}

.maintenance-panel h4 {
    margin: 0;
    color: #17416d;
}

.switch-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.6rem;
    border: 1px solid #ccdbee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.switch-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-ui {
    position: relative;
    width: 52px;
    height: 30px;
    border-radius: 999px;
    background: #b6c7dd;
    border: 1px solid #9fb5d0;
    transition: background 0.2s ease;
}

.switch-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: left 0.2s ease;
}

.switch-card input:checked + .switch-ui {
    background: #2f7f5e;
    border-color: #2a6e53;
}

.switch-card input:checked + .switch-ui::after {
    left: 25px;
}

.switch-card small {
    display: block;
    margin-top: 0.25rem;
    color: #5a6f89;
}

.maintenance-field {
    gap: 0.4rem;
    font-size: 0.95rem;
}

.maintenance-preview {
    border: 1px solid #cad8eb;
    border-radius: 12px;
    background: #fff;
    min-height: 210px;
    overflow: hidden;
}

.maintenance-preview img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.maintenance-placeholder {
    min-height: 210px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #607896;
    background: repeating-linear-gradient(
        45deg,
        #f4f8ff,
        #f4f8ff 12px,
        #ecf3fd 12px,
        #ecf3fd 24px
    );
}

.maintenance-actions {
    justify-content: flex-end;
    border-top: 1px solid #d9e3f1;
    padding-top: 0.8rem;
}

.card-soft {
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: #f7fbff;
    padding: 0.8rem;
}

.admin-toolbar {
    display: grid;
    gap: 0.55rem;
}

.filter-grid {
    display: grid;
    gap: 0.6rem;
    align-items: end;
}

.filter-grid-4 {
    grid-template-columns: 2fr 1fr 1fr auto;
}

.filter-count {
    margin: 0;
    color: #4b6788;
    font-size: 0.9rem;
    font-weight: 700;
}

.projects-filter-bar {
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6fd 100%);
    padding: 0.8rem;
    display: grid;
    gap: 0.5rem;
}

.projects-filter-row {
    display: grid;
    grid-template-columns: minmax(280px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
    gap: 0.6rem;
    align-items: end;
}

.projects-filter-field {
    display: grid;
    gap: 0.28rem;
    font-weight: 600;
    color: #214a78;
}

.projects-filter-field span {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #58789b;
}

.projects-filter-field input,
.projects-filter-field select {
    background: #fff;
}

.projects-filter-clear {
    height: 40px;
    padding: 0 0.95rem;
}

.projects-filter-count {
    text-align: right;
    font-size: 0.84rem;
    color: #5b7696;
}

.projects-filter-state-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.projects-filter-state-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #58789b;
    font-weight: 800;
}

.projects-filter-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.42rem 0.7rem;
    border: 1px solid #cfe0f1;
    border-radius: 999px;
    background: #fff;
    color: #214a78;
    font-weight: 700;
}

.projects-filter-radio input[type="radio"] {
    width: auto;
    margin: 0;
}

.academic-hub {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.academic-card {
    border: 1px solid #d7e3f2;
    border-radius: 12px;
    background: linear-gradient(180deg, #f9fcff 0%, #f1f6fd 100%);
    padding: 0.9rem;
    display: grid;
    gap: 0.45rem;
}

.academic-card h4 {
    margin: 0;
}

.academic-card-action {
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.academic-card-action:hover,
.academic-card-action:focus-visible {
    border-color: #9ebce0;
    box-shadow: 0 10px 24px rgba(31, 79, 130, 0.1);
    transform: translateY(-1px);
    outline: none;
}

.card-link-text {
    display: inline-block;
    color: #1f4f82;
    font-weight: 700;
}

.card-link-text.muted {
    color: #5d7694;
    font-weight: 600;
}

.academic-card p {
    margin: 0;
    color: #4d6786;
}

h2, h3, h4 {
    margin: 0 0 0.8rem;
    color: var(--primary);
}

p { color: var(--muted); }

.form-grid {
    display: grid;
    gap: 0.8rem;
}

label {
    display: grid;
    gap: 0.32rem;
    font-weight: 600;
}

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

input, select, textarea {
    width: 100%;
    padding: 0.58rem 0.64rem;
    border: 1px solid #c6d2e2;
    border-radius: 6px;
    background: #ffffff;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 0.4rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-2);
    box-shadow: 0 0 0 3px rgba(31, 143, 181, 0.18);
}

button {
    width: fit-content;
    padding: 0.52rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--primary-2);
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

button:hover { filter: brightness(1.05); }

.secondary-btn {
    border-color: #7ab12e;
    background: linear-gradient(180deg, #a8d950 0%, #7cad33 100%);
    color: #18380b;
}

.danger-btn {
    border-color: #a43343;
    background: linear-gradient(180deg, #c24858 0%, #9e3444 100%);
}

.outline-btn {
    border-color: rgba(31, 143, 181, 0.35);
    background: var(--primary-soft);
    color: var(--primary);
}

.ghost-btn {
    border-color: var(--line);
    background: #ffffff;
    color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    background: #ffffff;
}

th, td {
    padding: 0.62rem;
    border-bottom: 1px solid #e1e7f0;
    text-align: left;
}

th {
    background: var(--primary-soft);
    color: #23476f;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.alert {
    border-radius: 8px;
    padding: 0.62rem 0.75rem;
    border: 1px solid;
}

.alert.success {
    background: var(--success-bg);
    border-color: #b8dfc4;
    color: var(--success-text);
}

.alert.error {
    background: var(--error-bg);
    border-color: #efb7be;
    color: var(--error-text);
}

.home-intro {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
}

.category-section,
.project-grid,
.members-list,
.admin-main,
.admin-section {
    display: grid;
    gap: 0.8rem;
}

.admin-main {
    align-content: start;
    grid-auto-rows: max-content;
}

.category-title-wrap,
.members-header,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.category-count {
    border: 1px solid #bfd0e7;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: #eff5fd;
    color: #355d89;
    font-size: 0.82rem;
    font-weight: 700;
}

.project-card,
.inline-card,
.members-editor {
    border: 1px solid #d8e2ef;
    border-radius: 9px;
    background: var(--surface-soft);
    padding: 0.75rem;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.6rem;
}

.member-card {
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    background: #fff;
    padding: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.member-photo {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #c9d6e7;
}

.member-photo-placeholder {
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #35557c;
    background: #e7eef8;
}

.member-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.55rem;
}

.inline-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.inline-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.inline-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.inline-grid-1 { grid-template-columns: 1fr; align-items: end; }
.inline-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; }
.inline-grid-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; }

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

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.judge-eval-link {
    line-height: 1.2;
    min-height: 30px;
    padding: 0.32rem 0.72rem;
}

.judge-assignments-table td {
    vertical-align: top;
}

.maintenance-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.maintenance-tools {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.table-wrap table {
    border: 0;
}

.table-wrap thead th {
    text-align: center;
}

.tag {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(31, 143, 181, 0.2);
    font-size: 0.78rem;
    font-weight: 700;
}

.tag.ok {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(158, 211, 74, 0.5);
}

.tag.off {
    background: #fbecef;
    color: #8a2d3d;
    border: 1px solid #efbfca;
}

.logistics-status-tag {
    min-width: 112px;
    padding: 0.16rem 0.45rem;
    text-align: center;
    white-space: nowrap;
}

.member-count-badge {
    min-width: 2rem;
    text-align: center;
}

.member-count-0 {
    background: #fbecef;
    color: #8a2d3d;
    border: 1px solid #efbfca;
}

.member-count-1 {
    background: #fff5e8;
    color: #9a5b12;
    border: 1px solid #f0cf9d;
}

.member-count-2 {
    background: #eef5fd;
    color: #1f4f82;
    border: 1px solid #c9d9ed;
}

.member-count-3 {
    background: #e7f5ea;
    color: #21683a;
    border: 1px solid #b6ddc2;
}

.category-badge {
    background: #eef3fb;
    color: #26496f;
    border: 1px solid #c8d8ea;
}

.assignment-team-badge {
    background: #f4f7fb;
    color: #37587f;
    border: 1px solid #d4deeb;
}

.english-score-badge {
    background: #eef5fd;
    color: #1f4f82;
    border: 1px solid #c9d9ed;
}

.progress-badge {
    background: #f7f9fc;
    color: #425f82;
    border: 1px solid #d4deeb;
}

.table-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.7rem;
    border: 1px solid #c9d9ed;
    border-radius: 999px;
    background: #f5f9ff;
    color: #1f4f82;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.table-link-btn:hover {
    background: #eaf2fd;
    color: #173e6a;
    text-decoration: none;
}

.table-link-btn.secondary {
    background: linear-gradient(180deg, #3c8c7a 0%, #2d7768 100%);
    border-color: #2c7264;
    color: #ffffff;
}

.table-link-btn.secondary:hover {
    background: linear-gradient(180deg, #4a9887 0%, #317f6f 100%);
    color: #ffffff;
}

.table-link-btn.ghost {
    background: #ffffff;
    border-color: #cbd7e7;
}

.report-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.project-report-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.table-cell-center {
    text-align: center;
}

dialog.maintenance-dialog {
    border: 1px solid #c8d7ea;
    border-radius: 12px;
    width: min(760px, calc(100vw - 2rem));
    padding: 0;
    box-shadow: 0 22px 56px rgba(17, 42, 70, 0.24);
}

dialog.maintenance-dialog::backdrop {
    background: rgba(20, 34, 52, 0.5);
}

.dialog-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    background: #fff;
}

.dialog-card-wide {
    padding: 1.1rem 1.25rem 1.2rem;
}

.eval-types-dialog {
    width: min(1120px, calc(100vw - 2rem)) !important;
}

.eval-types-table-wrap {
    max-height: min(72vh, 760px);
    overflow: auto;
}

.eval-types-table {
    table-layout: fixed;
    width: 100%;
}

.eval-types-table th:nth-child(1),
.eval-types-table td:nth-child(1) {
    width: 72px;
}

.eval-types-table th:nth-child(2),
.eval-types-table td:nth-child(2) {
    width: auto;
}

.eval-types-table th:nth-child(3),
.eval-types-table td:nth-child(3),
.eval-types-table th:nth-child(4),
.eval-types-table td:nth-child(4),
.eval-types-table th:nth-child(5),
.eval-types-table td:nth-child(5),
.eval-types-table th:nth-child(6),
.eval-types-table td:nth-child(6) {
    width: 96px;
}

.eval-types-table th:nth-child(7),
.eval-types-table td:nth-child(7) {
    width: 164px;
}

.eval-types-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.eval-type-name-cell {
    line-height: 1.35;
}

.eval-type-name-cell strong,
.eval-type-name-cell small {
    display: block;
}

.eval-type-name-cell small {
    margin-top: 0.18rem;
    color: #5d7696;
}

.rubric-criteria-dialog {
    width: min(1180px, calc(100vw - 2rem)) !important;
}

.rubric-criteria-card {
    gap: 0.9rem;
}

.rubric-criteria-head {
    align-items: start;
}

.rubric-criteria-title {
    display: grid;
    gap: 0.22rem;
}

.rubric-criteria-title h4,
.rubric-criteria-title p {
    margin: 0;
}

.rubric-criteria-title p {
    color: #5d7696;
    max-width: 760px;
}

.rubric-criteria-table-wrap {
    max-height: min(70vh, 760px);
    overflow: auto;
}

.rubric-criteria-table {
    width: 100%;
    table-layout: fixed;
}

.rubric-criteria-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.rubric-criteria-table th:nth-child(1),
.rubric-criteria-table td:nth-child(1) {
    width: 60px;
}

.rubric-criteria-table th:nth-child(2),
.rubric-criteria-table td:nth-child(2) {
    width: 180px;
}

.rubric-criteria-table th:nth-child(3),
.rubric-criteria-table td:nth-child(3) {
    width: auto;
}

.rubric-criteria-table th:nth-child(4),
.rubric-criteria-table td:nth-child(4),
.rubric-criteria-table th:nth-child(5),
.rubric-criteria-table td:nth-child(5),
.rubric-criteria-table th:nth-child(6),
.rubric-criteria-table td:nth-child(6) {
    width: 76px;
}

.rubric-criteria-table th:nth-child(7),
.rubric-criteria-table td:nth-child(7) {
    width: 96px;
}

.rubric-criteria-table th:nth-child(8),
.rubric-criteria-table td:nth-child(8) {
    width: 120px;
}

.rubric-section-badge {
    display: inline-flex;
    justify-content: center;
    min-width: 0;
    width: 100%;
    white-space: normal;
    text-align: center;
}

.rubric-name-cell {
    color: #173e6a;
    line-height: 1.38;
}

.rubric-criteria-table .actions-cell {
    justify-content: center;
}

.rubric-criteria-table .actions-cell .inline-form {
    margin: 0;
}

.rubric-criteria-table .outline-btn,
.rubric-criteria-table .danger-btn {
    min-width: 0;
}

.icon-btn {
    min-width: 0;
    padding: 0.55rem 0.8rem;
    white-space: nowrap;
}

.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.dialog-head h4 {
    margin: 0;
}

.dialog-close {
    line-height: 1;
    font-size: 1.1rem;
    min-width: 2rem;
    padding: 0.35rem 0.55rem;
}

.compact-form {
    display: grid;
    gap: 0.65rem;
}

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

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

.compact-form .actions-row {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.institution-form {
    gap: 1rem;
}

.institution-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.institution-panel {
    border: 1px solid #dbe6f3;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fe 100%);
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
}

.institution-panel-head {
    display: grid;
    gap: 0.2rem;
}

.institution-panel-head h4 {
    margin: 0;
    color: #0f4c8a;
    font-size: 1.15rem;
}

.institution-panel-head p {
    margin: 0;
    color: #5d7696;
}

.institution-logo-panel {
    align-content: start;
}

.institution-logo-stack {
    display: grid;
    gap: 1rem;
}

.institution-logo-preview {
    border: 1px dashed #c8d7eb;
    border-radius: 16px;
    min-height: 260px;
    background: #ffffff;
    padding: 1rem;
    display: grid;
    place-items: center;
}

.institution-logo-image {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.institution-logo-empty {
    display: grid;
    gap: 0.35rem;
    text-align: center;
    color: #5d7696;
}

.institution-logo-empty strong {
    color: #214a78;
}

.institution-upload-field {
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
    color: #214a78;
}

.section-block {
    border: 1px solid #dbe4ef;
    background: #f8fbff;
    border-radius: 10px;
    padding: 0.85rem;
}

.project-members-list {
    display: grid;
    gap: 0.6rem;
}

.project-member-item {
    border: 1px solid #dce5f1;
    border-radius: 8px;
    background: #fff;
    padding: 0.65rem;
}

.evaluation-page {
    display: grid;
    gap: 1rem;
}

.evaluation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #d8e3f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.evaluation-meta p {
    margin: 0;
    color: #35557c;
    font-weight: 600;
}

.evaluation-form {
    gap: 1rem;
}

.evaluation-section {
    display: grid;
    gap: 0.7rem;
}

.evaluation-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.evaluation-section-head h3,
.evaluation-section-head p {
    margin: 0;
}

.evaluation-section-head h3 {
    color: #1f4f82;
}

.evaluation-section-head p {
    color: #5a7392;
    font-weight: 700;
}

.evaluation-table-wrap {
    border-radius: 14px;
}

.evaluation-table {
    min-width: 980px;
}

.evaluation-table th,
.evaluation-table td {
    vertical-align: top;
}

.evaluation-criterion {
    min-width: 280px;
    font-weight: 700;
    color: #264d78;
}

.evaluation-score-cell {
    min-width: 120px;
}

.evaluation-score-option {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    min-width: 96px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #365779;
}

.evaluation-score-option input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
}

.evaluation-observation-cell {
    min-width: 220px;
}

.evaluation-observation-cell textarea,
.evaluation-notes textarea {
    width: 100%;
    resize: vertical;
}

.evaluation-notes {
    display: grid;
    gap: 0.35rem;
}

.evaluation-actions {
    justify-content: flex-end;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1rem;
}

.admin-sidebar {
    position: sticky;
    top: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
    padding: 0.8rem;
}

.admin-sidebar-top h2 {
    margin: 0;
    color: var(--primary);
}

.admin-sidebar-top p {
    margin: 0.2rem 0 0.8rem;
    color: var(--muted);
}

.admin-menu {
    display: grid;
    gap: 0.28rem;
}

.admin-menu-group {
    margin: 0.45rem 0 0.1rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-2);
}

.admin-menu a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    padding: 0.48rem 0.6rem;
    border-radius: 6px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.admin-menu-icon {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
    opacity: 0.88;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: #e4eefb;
    border-color: #bfd1e8;
}

.admin-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0.8rem;
}

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

.admin-stats article {
    border: 1px solid #d5e0ef;
    background: #fff;
    border-radius: 8px;
    padding: 0.65rem;
}

.admin-stats strong {
    display: block;
    color: #1f4f82;
    font-size: 1.2rem;
}

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

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

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

.admin-overview-block {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
    padding: 0.9rem;
    display: grid;
    gap: 0.8rem;
}

.admin-overview-block h4 {
    margin: 0;
    color: var(--primary);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-links a {
    text-decoration: none;
    border: 1px solid #c7d7eb;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: #f3f8ff;
    color: #2d5682;
    font-weight: 700;
}

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

.permissions-summary-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.9rem 1rem;
    display: grid;
    gap: 0.2rem;
}

.permissions-summary-card strong {
    color: var(--primary);
    font-size: 1.3rem;
}

.permissions-summary-card span {
    color: var(--muted);
    font-weight: 700;
}

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

.permissions-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.permissions-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.8rem;
}

.permissions-card-head h4,
.permissions-card-head p {
    margin: 0;
}

.permissions-card-head h4 {
    color: var(--primary);
}

.permissions-card-head p {
    margin-top: 0.22rem;
    color: var(--muted);
}

.permissions-module-grid {
    display: grid;
    gap: 0.55rem;
}

.permissions-toggle {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.72rem 0.8rem;
    border: 1px solid #d8e3f1;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.permissions-toggle:hover {
    border-color: #b8cde6;
    background: #fbfdff;
}

.permissions-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permissions-toggle-ui {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d8e3ef;
    position: relative;
    transition: background 0.16s ease;
}

.permissions-toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 42, 70, 0.16);
    transition: transform 0.16s ease;
}

.permissions-toggle-copy {
    display: grid;
    gap: 0.14rem;
}

.permissions-toggle-copy strong,
.permissions-toggle-copy small {
    display: block;
}

.permissions-toggle-copy strong {
    color: var(--primary);
}

.permissions-toggle-copy small {
    color: var(--muted);
}

.permissions-toggle.is-enabled {
    border-color: rgba(158, 211, 74, 0.55);
    background: linear-gradient(180deg, #fbfff4 0%, #f3fae4 100%);
}

.permissions-toggle.is-enabled .permissions-toggle-ui {
    background: #9ed34a;
}

.permissions-toggle.is-enabled .permissions-toggle-ui::after {
    transform: translateX(20px);
}

.permissions-toggle.is-disabled {
    cursor: default;
}

.permissions-toggle.is-disabled:hover {
    border-color: #d8e3f1;
    background: #ffffff;
}

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

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

.winner-card {
    border: 1px solid #d8e3f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #f9fbff 0%, #f2f7fd 100%);
    padding: 0.9rem;
}

.winner-card h4,
.winner-project {
    margin: 0 0 0.45rem;
}

.winner-project {
    font-weight: 800;
    color: #1f4f82;
}

.winner-card p {
    margin: 0.25rem 0;
}

.winner-runner-up {
    margin-top: 0.6rem !important;
    padding-top: 0.55rem;
    border-top: 1px solid #d8e3ef;
}

.table-subtext {
    color: #5d7694;
    font-size: 0.86rem;
}

.project-tracking-list {
    display: grid;
    gap: 0.8rem;
}

.project-tracking-card {
    border: 1px solid #d6e2f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.project-tracking-summary {
    list-style: none;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem 1rem;
    cursor: pointer;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
}

.project-tracking-summary::-webkit-details-marker {
    display: none;
}

.project-tracking-main {
    display: grid;
    gap: 0.22rem;
}

.project-tracking-main strong {
    color: #1f4f82;
    font-size: 1.08rem;
}

.project-tracking-main span {
    color: #5d7694;
    font-weight: 700;
}

.project-tracking-metrics {
    display: grid;
    grid-template-columns:
        minmax(150px, 1.2fr)
        minmax(88px, 0.65fr)
        minmax(95px, 0.8fr)
        minmax(125px, 0.95fr)
        minmax(175px, 1.15fr)
        minmax(95px, 0.7fr)
        minmax(125px, 0.9fr);
    gap: 0.55rem;
}

.tracking-metric {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d6e2f0;
    border-radius: 12px;
    background: #fff;
}

.tracking-metric small {
    color: #5e7794;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    white-space: nowrap;
}

.tracking-metric strong {
    color: #1f4f82;
    font-size: 1rem;
}

.tracking-metric span {
    color: #577492;
    font-size: 0.84rem;
    font-weight: 700;
}


.tracking-metric-final {
    background: #eef5ff;
    border-color: #c5d9f2;
}

.project-tracking-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    padding: 0 1rem 1rem;
}

.tracking-block {
    display: grid;
    gap: 0.6rem;
    border: 1px solid #d9e3ef;
    border-radius: 12px;
    background: #f9fbff;
    padding: 0.85rem;
}

.tracking-block h4 {
    margin: 0;
}

.project-rubric-status,
.project-evaluation-records {
    display: grid;
    gap: 0.45rem;
}

.evaluation-record-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid #d8e4f0;
    border-radius: 10px;
    background: #fff8f8;
}

.evaluation-record-item strong,
.evaluation-record-item span,
.evaluation-record-item em {
    display: block;
}

.evaluation-record-item strong {
    color: #1f4f82;
    margin-bottom: 0.15rem;
}

.evaluation-record-item span {
    color: #5d7693;
    font-size: 0.88rem;
}

.evaluation-record-item em {
    color: #8b3040;
    font-style: normal;
    font-weight: 700;
    margin-top: 0.2rem;
}

.rubric-progress-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem 0.55rem;
    border: 1px solid #d8e4f0;
    border-radius: 10px;
    background: #f9fbff;
}

.rubric-progress-item span {
    color: #31587f;
    font-weight: 700;
}

.rubric-progress-item strong {
    color: #1f4f82;
}

.rubric-progress-item em {
    color: #5e7794;
    font-style: normal;
    font-weight: 700;
}

.muted-empty {
    color: #617996;
    margin: 0;
}

.assignment-picker {
    display: grid;
    gap: 0.65rem;
    border: 1px solid #d8e3f1;
    border-radius: 12px;
    background: #f8fbff;
    padding: 0.8rem;
}

.assignment-picker-head h5,
.assignment-picker-head p {
    margin: 0;
}

.assignment-selected-summary {
    margin: 0;
    color: #557392;
    font-weight: 700;
}

.assignment-picker-head h5 {
    color: #1f4f82;
}

.assignment-project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    max-height: 360px;
    overflow: auto;
    padding-right: 0.25rem;
}

.assignment-project-option {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.7rem 0.75rem;
    border: 1px solid #d4dfed;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.assignment-project-option input[type="checkbox"] {
    margin: 0.15rem 0 0;
}

.assignment-project-option strong,
.assignment-project-option small {
    display: block;
}

.assignment-project-option strong {
    color: #1f4f82;
}

.assignment-project-option small {
    margin-top: 0.2rem;
    color: #5c7593;
}

.assignment-project-option.is-assigned {
    border-color: #e5c0c6;
    background: #fff3f5;
    opacity: 0.9;
}

.assignment-project-badge {
    justify-self: start;
    margin-top: 0.35rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    border: 1px solid #efbfca;
    background: #fdecee;
    color: #8a2d3d;
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 800;
}

.assignment-dialog-target {
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid #d6e2f0;
    border-radius: 10px;
    background: #f8fbff;
    color: #557392;
    font-weight: 700;
}

.assignment-manage-dialog {
    width: min(980px, calc(100vw - 2rem)) !important;
}

.assignment-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}

.assignment-summary-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #eef5fd;
    color: #1f4f82;
    font-size: 0.85rem;
    font-weight: 700;
}

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

.assignment-manage-grid-single {
    grid-template-columns: 1fr;
}

.assignment-manage-block {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: #f8fbff;
}

.assignment-manage-block-compact {
    gap: 0.55rem;
}

.assignment-manage-block h5,
.assignment-manage-item p {
    margin: 0;
}

.assignment-manage-list {
    display: grid;
    gap: 0.7rem;
}

.assignment-manage-item {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(280px, 1fr) auto auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background: #fff;
}

.assignment-manage-item-head {
    display: grid;
    gap: 0.08rem;
}

.assignment-manage-item-head strong {
    color: #173e6a;
    line-height: 1.2;
}

.assignment-manage-item-head p {
    color: #5b7696;
    line-height: 1.2;
}

.assignment-manage-form {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.assignment-manage-form select {
    min-width: 0;
    width: 100%;
}

.assignment-inline-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: end;
}

.assignment-inline-add label,
.assignment-inline-create label {
    display: grid;
    gap: 0.3rem;
}

.assignment-inline-add button {
    min-width: 190px;
    padding-inline: 1rem;
}

.assignment-inline-create {
    display: grid;
    grid-template-columns: minmax(160px, 1.15fr) minmax(160px, 1fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr) auto;
    gap: 0.6rem;
    align-items: end;
}

.assignment-inline-create-compact {
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(180px, 0.9fr) auto;
}

.assignment-inline-create .secondary-btn {
    min-width: 190px;
    padding-inline: 1rem;
    justify-self: start;
}

.assignment-inline-delete {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.assignment-manage-item .secondary-btn,
.assignment-manage-item .danger-btn {
    white-space: nowrap;
    min-width: 116px;
}

.requirements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
}

.requirement-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 600;
}

.requirement-item input[type="checkbox"] {
    margin: 0;
}

.upload-retained-note {
    margin: 0.2rem 0 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid #c8d9ee;
    border-radius: 10px;
    background: #f5f9ff;
    color: #35587f;
    font-size: 0.92rem;
}

.register-form {
    gap: 0.6rem;
}

.register-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1rem;
    align-items: start;
    margin-bottom: 0.85rem;
}

.register-header-copy {
    display: grid;
    gap: 0.45rem;
}

.register-header-copy h2,
.register-header-copy p {
    margin: 0;
}

.register-header-brand {
    display: grid;
    place-items: center;
    min-height: 170px;
}

.register-header-logo {
    width: min(100%, 170px);
    max-height: 170px;
    object-fit: contain;
    display: block;
}

.register-header-fallback {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4a320 0%, #e36b1f 35%, #64a93e 100%);
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1.1;
    box-shadow: var(--shadow);
}

.register-campaign-badge {
    margin: 0 0 0.85rem;
    width: fit-content;
    max-width: 100%;
}

.register-form .stage-block {
    padding: 0.7rem;
}

.register-form .stage-block h3 {
    margin: 0 0 0.45rem;
}

.register-form .form-grid {
    gap: 0.55rem;
}

.focus-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: end;
}

.site-footer {
    border-top: 2px solid #c3d3e9;
    background: #f0f5fc;
    margin-top: auto;
}

.site-footer-inner {
    width: 100%;
    padding: 0.8rem 1rem 1rem;
}

.site-footer p {
    margin: 0.2rem 0;
    color: #3f5878;
    font-size: 0.9rem;
}

.home-intro-block {
    display: grid;
    gap: 1rem;
    border: 1px solid #d4deeb;
}

.home-intro-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 300px);
    gap: 1rem;
    align-items: start;
}

.home-intro-kicker {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2e5d8d;
    margin-bottom: 0.2rem;
}

.home-intro-copy h2 {
    margin: 0;
}

.home-intro-copy h3 {
    margin: 0.9rem 0 0.45rem;
    color: #2f6a33;
}

.home-expo-brand {
    border: 1px solid #d7e2f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
    padding: 1rem;
    min-height: 260px;
    display: grid;
    place-items: center;
}

.home-expo-logo {
    width: min(100%, 220px);
    max-height: 220px;
    object-fit: contain;
    display: block;
}

.home-expo-fallback {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4a320 0%, #e36b1f 35%, #64a93e 100%);
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1.1;
    box-shadow: var(--shadow);
}

.home-objectives-wrap {
    display: grid;
    gap: 0.65rem;
}

.home-objectives-wrap h3 {
    margin: 0;
    color: #2f6a33;
}

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

.home-objectives-grid article {
    border: 1px solid #d7e2f0;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.65rem;
}

.home-objectives-grid h4 {
    margin: 0 0 0.2rem;
    color: #1f4f82;
}

.home-objectives-grid p {
    margin: 0;
    font-size: 0.92rem;
}

.home-logos-panel {
    border-radius: 12px;
    border: 1px solid #3a7d28;
    background: #357f21;
    padding: 1rem;
    color: #fff;
}

.home-logos-panel h3 {
    color: #fff;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.logos-carousel {
    display: grid;
    gap: 0.7rem;
}

.logos-track {
    position: relative;
    min-height: 320px;
}

.logo-slide {
    margin: 0;
    display: none;
    gap: 0.4rem;
    justify-items: center;
}

.logo-slide.active {
    display: grid;
}

.logo-slide img {
    width: 100%;
    max-width: 470px;
    height: 300px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #d6e5cf;
    padding: 0.55rem;
}

.logo-slide figcaption {
    font-weight: 700;
}

.logos-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #d4e8ca;
    background: #c2d6b7;
    padding: 0;
}

.logo-dot.active {
    background: #ffffff;
}

.campaign-badge {
    display: inline-block;
    border: 1px solid #a8c6e6;
    background: #eef5ff;
    color: #244e7d;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.92rem;
}

.stage-block {
    border-width: 2px;
}

.stage-block h3 {
    margin-bottom: 0.55rem;
}

.stage-1 { border-color: #3d7ebf; background: #f2f8ff; }
.stage-2 { border-color: #5c9b4d; background: #f4fbf1; }
.stage-3 { border-color: #8a6bc6; background: #f7f2ff; }
.stage-4 { border-color: #cf7f2f; background: #fff6ef; }
.stage-5 { border-color: #2c8f8f; background: #effafa; }
.stage-6 { border-color: #af3f58; background: #fff1f4; }

.showcase-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 0.9rem;
}

.project-sidebar {
    background: #ffffff;
    border: 1px solid #ced9e8;
    border-radius: 10px;
    padding: 0.8rem;
    max-height: calc(100vh - 140px);
    overflow: auto;
    position: sticky;
    top: 0.9rem;
}

.project-sidebar-head h2 {
    margin: 0;
}

.project-sidebar-head p {
    margin: 0.2rem 0 0.8rem;
}

.project-sidebar-list h3 {
    margin: 0.8rem 0 0.35rem;
    font-size: 0.95rem;
    color: #1f4f82;
}

.project-link {
    width: 100%;
    text-align: left;
    border: 1px solid #d5deeb;
    background: #f7faff;
    color: #1f3f66;
    margin-bottom: 0.35rem;
}

.project-link.active {
    border-color: #9ab7db;
    background: #e8f1fd;
}

.institutional-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.institutional-banner h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #2f6a33;
    text-transform: uppercase;
}

.banner-kicker {
    display: inline-block;
    font-weight: 800;
    font-size: 1.2rem;
    color: #f4a320;
    text-transform: uppercase;
}

.banner-badge {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4a320 0%, #e36b1f 35%, #64a93e 100%);
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
    text-align: center;
    line-height: 1.1;
    box-shadow: var(--shadow);
}

.banner-badge-image {
    background: #ffffff;
    border: 1px solid #d6e2f0;
    overflow: hidden;
    padding: 0.85rem;
}

.banner-badge-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.project-detail {
    display: none;
}

.project-detail.active {
    display: grid;
    gap: 0.8rem;
}

.project-main {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    align-items: center;
}

.project-visual {
    display: grid;
    place-items: center;
}

.project-main-image,
.project-main-placeholder {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid #c8d6ea;
    object-fit: cover;
    background: #f4f8ff;
}

.project-main-logo {
    object-fit: contain;
    background: #ffffff;
    padding: 0.6rem;
}

.project-main-placeholder {
    display: grid;
    place-items: center;
    font-size: 3rem;
    font-weight: 800;
    color: #4a678a;
}

.project-main-meta {
    color: #31587f;
}

.project-main-description {
    font-size: 1.05rem;
    color: #162231;
}

.project-main-actions {
    margin-top: 0.7rem;
}

.project-action {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #d28a22;
    background: #f5a116;
    color: #1f2a37;
    padding: 0.48rem 0.9rem;
    border-radius: 6px;
    font-weight: 700;
}

.project-action.disabled {
    border-color: #b6c2d3;
    background: #dbe4f0;
    color: #5e718b;
    cursor: not-allowed;
}

.integrants-strip {
    border-radius: 10px;
    border: 1px solid #2d6926;
    background: #266f1e;
    color: #fff;
    padding: 0.85rem;
}

.integrants-strip h3 {
    color: #fff;
    margin: 0 0 0.7rem;
}

.integrants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.integrant-card {
    text-align: center;
    padding: 0.4rem;
}

.integrant-card h4 {
    color: #fff;
    margin: 0.5rem 0 0.35rem;
}

.integrant-card p {
    color: #eff9ea;
    margin: 0.22rem 0;
}

.integrant-photo {
    width: 100%;
    max-width: 360px;
    height: auto;
    object-fit: cover;
    background: transparent;
    border: 3px solid #eaf6df;
    outline: 2px solid #9ec47e;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(7, 36, 9, 0.28);
}

.integrant-placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #f6fff3;
    background: #355f35;
}

@media (max-width: 1100px) {
    .home-intro-block {
        grid-template-columns: 1fr;
    }

    .home-objectives-grid {
        grid-template-columns: 1fr;
    }

    .showcase-layout {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
        max-height: none;
    }

    .project-main {
        grid-template-columns: 1fr;
    }

    .maintenance-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    .projects-filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .academic-hub {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .winner-grid,
    .evaluation-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .institution-grid {
        grid-template-columns: 1fr;
    }

    .project-tracking-summary {
        grid-template-columns: 1fr;
    }

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

    .project-tracking-detail {
        grid-template-columns: 1fr;
    }

    .assignment-project-list {
        grid-template-columns: 1fr;
    }

    .assignment-manage-grid,
    .assignment-manage-form {
        grid-template-columns: 1fr;
        display: grid;
    }

    .rubric-criteria-head {
        align-items: stretch;
    }

    .rubric-criteria-head .maintenance-tools {
        width: 100%;
        justify-content: flex-end;
    }

    .assignment-inline-add,
    .assignment-inline-create,
    .assignment-manage-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .assignment-manage-form select {
        min-width: 0;
        width: 100%;
    }

    .inline-grid-6,
    .inline-grid-7 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .header-inner,
    .admin-hero,
    .admin-shell,
    .member-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .header-inner {
        display: grid;
        gap: 0.7rem;
        align-items: stretch;
    }

    .header {
        padding: 0.65rem 0.75rem;
    }

    .brand-block {
        width: 100%;
        gap: 0.6rem;
    }

    .brand-logo {
        height: 52px;
        max-width: 64px;
        border-radius: 12px;
    }

    .brand-mark {
        min-width: 54px;
    }

    .brand-block h1 {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .brand-block p {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .header nav {
        width: 100%;
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        margin-top: 0.15rem;
    }

    .header nav.is-open {
        display: grid;
    }

    .header nav a,
    .header nav .btn-link {
        width: 100%;
        min-height: 36px;
        text-align: center;
        padding: 0.45rem 0.5rem;
        border: 1px solid rgba(244, 122, 32, 0.22);
        background: rgba(255, 255, 255, 0.06);
        border-radius: 8px;
        font-size: 0.94rem;
    }

    .header nav .inline-form {
        display: block;
        width: 100%;
    }

    .admin-sidebar {
        position: static;
    }

    .permissions-summary,
    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .inline-grid-3,
    .inline-grid-1,
    .inline-grid-2,
    .inline-grid-4,
    .inline-grid-6,
    .inline-grid-7 {
        grid-template-columns: 1fr;
    }

    .final-stages-grid {
        grid-template-columns: 1fr;
    }

    .compact-form .grid-2,
    .compact-form .grid-3 {
        grid-template-columns: 1fr;
    }

    .register-header {
        grid-template-columns: 1fr;
    }

    .register-header-brand {
        min-height: 120px;
        justify-items: start;
    }

    .maintenance-grid {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel,
    .auth-login-card {
        min-height: auto;
    }

    .filter-grid-4 {
        grid-template-columns: 1fr;
    }

    .projects-filter-row {
        grid-template-columns: 1fr;
    }

    .academic-hub {
        grid-template-columns: 1fr;
    }

    .admin-overview-grid,
    .admin-stats-3,
    .admin-stats-4 {
        grid-template-columns: 1fr;
    }

    .winner-grid,
    .evaluation-stats {
        grid-template-columns: 1fr;
    }

    .home-intro-hero,
    .home-objectives-grid {
        grid-template-columns: 1fr;
    }

    .home-expo-brand {
        min-height: 200px;
    }

    .project-tracking-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .projects-filter-count {
        text-align: left;
    }

    .evaluation-meta {
        display: grid;
    }

    .evaluation-table {
        min-width: 100%;
    }

    .evaluation-table thead {
        display: none;
    }

    .evaluation-table,
    .evaluation-table tbody,
    .evaluation-row,
    .evaluation-table td {
        display: block;
        width: 100%;
    }

    .evaluation-row {
        border-bottom: 1px solid #d9e3ef;
        padding: 0.85rem 0.85rem 0.55rem;
        background: #fff;
    }

    .evaluation-table tbody .evaluation-row:last-child {
        border-bottom: 0;
    }

    .evaluation-table td {
        border: 0;
        padding: 0.3rem 0;
    }

    .evaluation-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: #607995;
        font-size: 0.78rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .evaluation-criterion {
        min-width: 0;
        padding-top: 0;
    }

    .evaluation-score-cell {
        min-width: 0;
    }

    .evaluation-score-option {
        grid-template-columns: auto 1fr;
        justify-items: start;
        align-items: center;
        min-width: 0;
        border: 1px solid #d8e3ef;
        border-radius: 10px;
        padding: 0.55rem 0.7rem;
        background: #f8fbff;
    }

    .evaluation-observation-cell {
        min-width: 0;
    }

    .evaluation-actions {
        justify-content: stretch;
    }

    .evaluation-actions button {
        width: 100%;
    }

    .project-tracking-metrics {
        grid-template-columns: 1fr;
    }

    .tracking-metric {
        min-width: 0;
    }

    .tracking-metric small {
        white-space: normal;
    }

    .judge-assignments-table thead {
        display: none;
    }

    .judge-assignments-table,
    .judge-assignments-table tbody,
    .judge-assignments-table tr,
    .judge-assignments-table td {
        display: block;
        width: 100%;
    }

    .judge-assignments-table tr {
        border: 1px solid #d9e3ef;
        border-radius: 10px;
        padding: 0.7rem 0.75rem;
        margin-bottom: 0.65rem;
        background: #ffffff;
    }

    .judge-assignments-table td {
        border: 0;
        padding: 0.22rem 0;
        white-space: normal;
        word-break: break-word;
    }

    .judge-assignments-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.12rem;
        color: #607995;
        font-size: 0.76rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 480px) {
    .header nav {
        grid-template-columns: 1fr;
    }

    .brand-block p {
        display: none;
    }
}
