:root {
    --bg: #f4f6f7;
    --surface: #ffffff;
    --surface-soft: #f7f9fa;
    --line: #d5dde1;
    --text: #263238;
    --muted: #607078;
    --primary: #263238;
    --primary-2: #607d8b;
    --primary-soft: #e8edef;
    --accent: #78909c;
    --accent-soft: #edf1f3;
    --success: #9ed34a;
    --success-bg: #eef8df;
    --success-text: #486d16;
    --warning: #f7c62f;
    --warning-soft: #fff7d6;
    --error-bg: #fdecee;
    --error-text: #842029;
    --shadow: 0 10px 30px rgba(38, 50, 56, 0.10);
}

* { box-sizing: border-box; }

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

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

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;
}

img,
svg,
video {
    max-width: 100%;
}

.header {
    background: linear-gradient(180deg, var(--primary) 0%, #182126 100%);
    border-bottom: 3px solid rgba(144, 164, 174, 0.35);
    padding: 0.7rem 1rem;
    margin: 0;
    width: 100%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.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;
}

.site-nav {
    margin-left: auto;
}

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

.nav-profile {
    position: relative;
}

.nav-profile summary {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    min-height: 42px;
    padding: 0.25rem 0.4rem 0.25rem 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    list-style: none;
}

.nav-profile summary::-webkit-details-marker {
    display: none;
}

.nav-profile summary::after {
    content: "▾";
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    padding-right: 0.15rem;
}

.nav-profile[open] summary {
    border-color: rgba(244, 122, 32, 0.38);
    background: rgba(244, 122, 32, 0.13);
}

.nav-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary);
    font-weight: 900;
}

.nav-profile-copy {
    display: grid;
    min-width: 0;
    line-height: 1.1;
}

.nav-profile-copy strong,
.nav-profile-copy small {
    max-width: 155px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-profile-copy strong {
    font-size: 0.86rem;
}

.nav-profile-copy small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
}

.nav-profile-card {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 3200;
    display: grid;
    gap: 0.7rem;
    width: min(320px, calc(100vw - 2rem));
    padding: 0.85rem;
    border: 1px solid #c9daec;
    border-radius: 16px;
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 18px 36px rgba(7, 28, 48, 0.22);
}

.nav-profile-head {
    display: grid;
    gap: 0.18rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e1ebf5;
}

.nav-profile-head strong {
    font-size: 1rem;
}

.nav-profile-head span,
.nav-profile-head small {
    color: #5d728c;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.nav-profile-actions {
    display: grid;
    gap: 0.4rem;
}

.nav-profile-actions a,
.nav-profile-actions .btn-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d4e2f0;
    border-radius: 10px;
    background: #f6faff;
    color: var(--primary);
    font-weight: 800;
    text-align: left;
    text-decoration: none;
}

.nav-profile-actions a:hover,
.nav-profile-actions .btn-link:hover {
    border-color: #9fbddc;
    background: #eaf4ff;
    color: var(--primary);
}

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

.nav-profile-actions .inline-form .btn-link {
    border-color: #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

/* Nav dropdown (e.g. Proyectos) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown > summary::after {
    content: "▾";
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
}

.nav-dropdown[open] > summary {
    background: rgba(244, 122, 32, 0.18);
}

.nav-dropdown-card {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 3200;
    display: grid;
    gap: 0.35rem;
    min-width: 200px;
    padding: 0.6rem;
    border: 1px solid #c9daec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(7, 28, 48, 0.18);
}

.nav-dropdown-card a {
    display: block;
    padding: 0.5rem 0.7rem;
    border: 1px solid #d4e2f0;
    border-radius: 8px;
    background: #f6faff;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-card a:hover {
    border-color: #9fbddc;
    background: #eaf4ff;
}

.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;
}

.password-page {
    width: min(680px, 100%);
    min-height: calc(100vh - 220px);
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.password-card {
    width: min(520px, 100%);
    padding: 1.35rem;
    border-radius: 12px;
    border-color: #c9d9ec;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.98)),
        var(--surface);
    box-shadow: 0 18px 44px rgba(18, 63, 107, 0.14);
}

.password-card-head {
    display: grid;
    gap: 0.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.password-card-head p {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.password-card-head h2 {
    margin: 0;
    color: var(--primary);
}

.password-form {
    gap: 0.9rem;
}

.password-form label {
    display: grid;
    gap: 0.35rem;
    color: #30445f;
    font-weight: 700;
}

.password-form input {
    min-height: 44px;
    border-radius: 8px;
    background: #ffffff;
}

.password-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 0.25rem;
    border-radius: 8px;
}

.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;
}
.impersonation-banner { position: relative; z-index: 2000; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid #d6a62c; background: #fff3c4; color: #5f4808; }
.impersonation-banner > div { display: grid; gap: .1rem; }
.impersonation-banner span { font-size: .82rem; }
.impersonation-banner button { min-height: 36px; padding: .45rem .75rem; border-color: #755b12; background: #755b12; white-space: nowrap; }
@media (max-width: 650px) { .impersonation-banner { align-items: stretch; flex-direction: column; } .impersonation-banner button { width: 100%; } }

.tutors-banner {
    align-items: center;
}

a.tutors-export-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: auto !important;
    min-width: 0;
    min-height: 40px;
    padding: 0.55rem 0.8rem;
    border-radius: 9px;
    white-space: nowrap;
}

a.tutors-export-btn svg {
    display: block;
    flex: 0 0 18px;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    max-width: 18px;
}

@media (max-width: 640px) {
    a.tutors-export-btn {
        width: 100% !important;
    }
}

.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;
}

.cleanup-section {
    border-color: #f0c7cd;
    background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
}

.cleanup-banner {
    border-color: #efc4cc;
    background: linear-gradient(135deg, #fff2f4 0%, #ffffff 72%);
}

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

.cleanup-warning-panel {
    border-color: #efc4cc;
    background: #fff7f8;
}

.cleanup-safe-panel {
    border-color: #cfe5be;
    background: #f8fff4;
}

.cleanup-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.28rem;
    color: #35506d;
}

.cleanup-list strong {
    color: #9e3444;
}

.ok-list strong,
.cleanup-safe-panel li::marker {
    color: #518314;
}

.cleanup-note {
    margin: 0;
    padding: 0.65rem;
    border-radius: 10px;
    background: #fff;
    color: #7c3744;
    border: 1px dashed #e8aab5;
    font-weight: 700;
}

.cleanup-form {
    border: 1px solid #efc4cc;
    border-radius: 12px;
    padding: 0.9rem;
    background: #ffffff;
}

.backup-table-wrap code {
    white-space: nowrap;
}

.backup-restore-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
    min-width: 320px;
}

.backup-confirm-field {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    text-align: left;
}

.backup-confirm-field span {
    color: #5d708b;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.backup-confirm-field input {
    min-height: 38px;
}

.restore-trace-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #d6e7f8;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 68%);
}

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

.section-heading h4 {
    margin: 0.1rem 0 0;
    color: var(--primary);
}

.eyebrow {
    margin: 0;
    color: var(--primary-2);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.helper-text {
    margin: 0.5rem 0 0;
    color: #5d708b;
}

.restore-job-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.9rem;
}

.restore-job-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem;
    border: 1px solid #d9e7f5;
    border-left: 6px solid var(--primary-2);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(18, 63, 107, 0.07);
}

.restore-job-success {
    border-left-color: #6ea51c;
}

.restore-job-failed {
    border-left-color: #c43d55;
}

.restore-job-running {
    border-left-color: var(--warning);
}

.restore-job-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.restore-job-header strong,
.restore-job-header span {
    display: block;
}

.restore-job-header strong {
    color: var(--primary);
}

.restore-job-header span {
    color: #5d708b;
    font-size: 0.88rem;
}

.restore-job-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
}

.restore-job-meta div {
    padding: 0.55rem;
    border-radius: 10px;
    background: #f3f8fe;
}

.restore-job-meta dt {
    color: #5d708b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.restore-job-meta dd {
    margin: 0.16rem 0 0;
    color: var(--primary);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.restore-job-message {
    margin: 0;
    color: #334e68;
    font-weight: 700;
}

.restore-log-tail {
    max-height: 220px;
    overflow: auto;
    margin: 0;
    padding: 0.75rem;
    border-radius: 12px;
    background: #071827;
    color: #d8f3ff;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.empty-state {
    margin: 0;
    padding: 0.9rem;
    border: 1px dashed #b9cce1;
    border-radius: 12px;
    color: #5d708b;
    background: #ffffff;
}

.database-page {
    gap: 1rem;
}

.database-hero {
    border-color: #b8d9f4;
    background:
        radial-gradient(circle at top right, rgba(31, 143, 181, 0.18), transparent 34%),
        linear-gradient(135deg, #f5fbff 0%, #ffffff 72%);
}

.database-status-grid {
    margin-top: 1rem;
}

.database-action-strip {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.database-action-strip .gitops-btn,
.database-action-strip .secondary-btn {
    text-decoration: none;
}

.database-backup-list {
    display: grid;
    gap: 0.85rem;
}

.database-backup-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    padding: 0.72rem;
    border: 1px solid #d5e6f5;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(232, 246, 255, 0.8) 0%, rgba(255, 255, 255, 0.96) 42%),
        #ffffff;
    box-shadow: 0 10px 24px rgba(18, 63, 107, 0.06);
}

.database-backup-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
}

.database-backup-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #123f6b 0%, #1f8fb5 100%);
    color: #ffffff;
}

.database-backup-icon svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.database-backup-copy {
    min-width: 0;
}

.database-backup-title {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.database-backup-title code {
    display: block;
    max-width: 100%;
    padding: 0.34rem 0.48rem;
    border: 1px solid #d7e3ef;
    border-radius: 10px;
    background: #ffffff;
    color: #123f6b;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
}

.database-backup-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin: 0.4rem 0 0;
}

.database-backup-meta div {
    min-width: 120px;
    padding: 0.3rem 0.48rem;
    border-radius: 10px;
    background: #f3f8fe;
}

.database-backup-meta dt {
    color: #5d708b;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.database-backup-meta dd {
    margin: 0.12rem 0 0;
    color: var(--primary);
    font-weight: 800;
}

.database-backup-actions {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 0.45rem;
    align-items: center;
}

.db-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-width: 132px;
    min-height: 40px;
    padding: 0.5rem 0.78rem;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(18, 63, 107, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

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

.db-action-btn:hover,
.db-action-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 14px 24px rgba(18, 63, 107, 0.16);
}

.db-action-download {
    background: linear-gradient(135deg, #123f6b 0%, #1f8fb5 100%);
    border-color: #8fcfe4;
}

.db-action-restore {
    background: linear-gradient(135deg, #f0b541 0%, #d4861f 100%);
    border-color: #f8d48a;
    color: #162033;
}

.db-action-delete {
    background: linear-gradient(135deg, #9f2941 0%, #c4455b 100%);
    border-color: #e59aaa;
}

.database-backup-actions .secondary-btn {
    min-height: 38px;
    padding: 0.44rem 0.65rem;
    display: inline-grid;
    place-items: center;
    text-align: center;
    text-decoration: none;
}

.database-backup-actions .danger-btn {
    min-height: 38px;
    padding: 0.44rem 0.65rem;
    white-space: nowrap;
}

.database-confirm-form {
    margin: 0;
}

.database-backup-actions .inline-form,
.database-backup-actions .db-action-btn {
    width: 100%;
}

.database-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.database-control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.85rem;
    margin: 1rem 0;
}

.database-control-card {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    min-height: 160px;
    padding: 0.95rem;
    border: 1px solid #d2e3f3;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f2f8ff 100%);
    box-shadow: 0 12px 26px rgba(18, 63, 107, 0.07);
}

.database-control-card strong {
    color: var(--primary);
    font-size: 1.02rem;
}

.database-control-card span {
    color: #5d708b;
    font-weight: 700;
    line-height: 1.35;
}

.database-control-card .gitops-btn {
    width: 100%;
    margin-top: auto;
    text-align: center;
    text-decoration: none;
}

.database-control-card .inline-form {
    width: 100%;
    margin-top: auto;
}

.database-check-grid .mini-stat small {
    color: #5d708b;
    font-weight: 700;
}

.restore-safe-alert {
    border-left: 5px solid var(--warning);
    background: #fffaf0;
}

@media (max-width: 1100px) {
    .database-backup-card {
        grid-template-columns: 1fr;
    }

    .database-backup-actions {
        grid-template-columns: 1fr;
    }

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

.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-report-actions {
    align-items: center;
    background: linear-gradient(135deg, #edf7ff 0%, #f7fbff 100%);
    border: 1px solid #c9deef;
    border-radius: 12px;
    display: flex;
    gap: .8rem;
    justify-content: space-between;
    margin: .8rem 0;
    padding: .7rem .8rem;
}

.projects-tutors-link {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #d7e5f1;
    border-radius: 12px;
    display: flex;
    gap: .8rem;
    justify-content: space-between;
    margin: .8rem 0;
    padding: .7rem .8rem;
}

.projects-tutors-link strong,
.projects-tutors-link small {
    display: block;
}

.projects-tutors-link strong { color: var(--primary); }
.projects-tutors-link small { color: #667f95; margin-top: .1rem; }

.projects-report-copy {
    align-items: center;
    display: flex;
    gap: .65rem;
    min-width: 0;
}

.projects-report-copy strong,
.projects-report-copy small {
    display: block;
}

.projects-report-copy strong {
    color: var(--primary);
    font-size: .95rem;
}

.projects-report-copy small {
    color: #5d7590;
    font-size: .78rem;
    margin-top: .12rem;
}

.projects-report-icon {
    align-items: center;
    background: #dceefa;
    border-radius: 10px;
    color: #126a96;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.projects-report-icon svg,
.projects-report-download svg {
    display: block;
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.projects-report-download {
    flex: 0 0 auto;
    gap: .4rem;
    min-height: 38px !important;
    padding: .45rem .7rem !important;
}

.reports-page {
    display: grid;
    gap: 1.25rem;
}

.reports-banner {
    align-items: center;
}

.reports-directory {
    display: grid;
    gap: 1.4rem;
}

.reports-group {
    display: grid;
    gap: 0.85rem;
}

.reports-group header {
    align-items: center;
    border-bottom: 1px solid #cfe0ee;
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.55rem;
}

.reports-group h4 {
    color: #073b68;
    font-size: 1.15rem;
    margin: 0;
}

.reports-group header span {
    background: #eaf3fb;
    border: 1px solid #c7dff1;
    border-radius: 999px;
    color: #174d74;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
}

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

.reports-card {
    background: #fff;
    border: 1px solid #d3e3f0;
    border-radius: 10px;
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
}

.reports-card-head {
    display: grid;
    gap: 0.45rem;
}

.reports-card h5 {
    color: #073b68;
    font-size: 1.08rem;
    margin: 0;
}

.reports-card p,
.reports-card small {
    color: #58708b;
    line-height: 1.45;
    margin: 0;
}

.reports-card small {
    background: #f3f8fc;
    border-radius: 8px;
    padding: 0.65rem;
}

.reports-format {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    justify-self: start;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.55rem;
    text-transform: uppercase;
}

.reports-format.excel {
    background: #eaf8ea;
    color: #1f6f2b;
}

.reports-format.pdf {
    background: #fdecef;
    color: #a5283f;
}

.reports-download {
    justify-content: center;
    margin-top: 0.25rem;
    width: 100%;
}

.reports-download svg {
    height: 18px;
    width: 18px;
}

.projects-logistics-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.projects-logistics-metrics article {
    display: grid;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border: 1px solid #dbe6f3;
    border-radius: 14px;
    background: #f8fbff;
}

.projects-logistics-metrics article.is-complete {
    border-color: #b9dfc2;
    background: #f2fbf4;
}

.projects-logistics-metrics article.has-pending {
    border-color: #f1c9c9;
    background: #fff7f7;
}

.projects-logistics-metrics span,
.projects-logistics-metrics small {
    color: #5d7590;
    font-weight: 700;
}

.projects-logistics-metrics strong {
    color: var(--primary);
    font-size: 1.75rem;
    line-height: 1;
}

.project-document-readiness {
    grid-column: 1 / -1;
    align-self: stretch;
    min-width: min(100%, 220px);
    padding: 0.55rem 0.7rem;
    border: 1px solid #d7e5f2;
    border-radius: 10px;
    background: #f8fbfe;
    color: #315a7d;
    font-size: 0.85rem;
    font-weight: 700;
}

.project-document-readiness.is-complete {
    border-color: #b9dfc2;
    background: #f2fbf4;
    color: #23733b;
}

.project-document-readiness.has-pending {
    border-color: #efcaca;
    background: #fff8f8;
    color: #9b3030;
}

.project-document-readiness summary {
    cursor: pointer;
    font-weight: 800;
}

.project-document-readiness ul {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    color: #5e3f3f;
    font-weight: 600;
}

.projects-filter-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) minmax(190px, 1.2fr) minmax(155px, 1fr) minmax(165px, 1fr) auto;
    gap: 0.6rem;
    align-items: end;
}

.tracking-filter-row {
    grid-template-columns: minmax(320px, 1fr) auto;
}

.tracking-filter-bar {
    margin-bottom: 0.35rem;
}

.tracking-pager {
    margin-top: 0.9rem;
}

.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;
    min-width: 116px;
    justify-self: end;
    white-space: nowrap;
    line-height: 1;
}

.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); }

.action-btn,
a.secondary-btn,
a.outline-btn,
a.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 40px;
    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: 800;
    line-height: 1.1;
    text-decoration: none;
}

.action-btn:hover,
a.secondary-btn:hover,
a.outline-btn:hover,
a.ghost-btn:hover {
    filter: brightness(1.04);
    text-decoration: none;
}

.page-head-actions .action-btn,
.judge-pool-actions .action-btn {
    min-width: 150px;
    border-radius: 14px;
}

.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);
}

.logout-dialog {
    border: 0;
    border-radius: 8px;
    width: min(360px, calc(100vw - 2rem));
    padding: 0;
    box-shadow: 0 22px 56px rgba(17, 42, 70, 0.28);
}

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

.logout-dialog-card {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    text-align: center;
    background: #ffffff;
}

.logout-dialog-card p {
    margin: 0;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.logout-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

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;
}

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

.judge-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #c9dcec;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background:
        radial-gradient(circle at 82% 18%, rgba(158, 211, 74, 0.2), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #eef9fd 100%);
    box-shadow: 0 14px 34px rgba(13, 63, 107, 0.08);
}

.judge-dashboard-hero h2 {
    margin: 0.1rem 0 0;
    color: var(--primary);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.judge-dashboard-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: #5a7190;
}

.judge-dashboard-profile {
    display: grid;
    justify-items: center;
    gap: 0.18rem;
    min-width: 170px;
    padding: 0.8rem;
    border: 1px solid #b9ddc0;
    border-radius: 18px;
    background: #effbea;
    color: #1f6a34;
}

.judge-dashboard-profile span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary);
    font-size: 1.45rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(13, 63, 107, 0.12);
}

.judge-dashboard-profile strong {
    color: #12612a;
}

.judge-dashboard-profile small {
    color: #5f7d44;
    font-weight: 700;
    text-align: center;
}

.judge-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.judge-metrics-grid article {
    display: grid;
    gap: 0.12rem;
    min-height: 86px;
    align-content: center;
    border: 1px solid #d0e0ef;
    border-radius: 16px;
    padding: 0.85rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 63, 107, 0.06);
}

.judge-metrics-grid strong {
    color: var(--primary);
    font-size: 1.85rem;
    line-height: 1;
}

.judge-metrics-grid span {
    color: #5d728c;
    font-weight: 800;
}

.judge-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 0.9rem;
}

.judge-project-card {
    display: grid;
    gap: 0.9rem;
    border: 1px solid #cbddee;
    border-radius: 18px;
    padding: 1rem;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(13, 63, 107, 0.08);
}

.judge-project-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: start;
}

.judge-project-category {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 0.22rem 0.62rem;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.judge-project-card h3 {
    margin: 0.45rem 0 0;
    color: var(--primary);
    font-size: 1.45rem;
    line-height: 1.08;
}

.judge-project-card p {
    margin: 0.25rem 0 0;
    color: #607995;
}

.judge-project-status {
    display: grid;
    justify-items: center;
    min-width: 108px;
    border-radius: 16px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

.judge-project-status.complete {
    border-color: #b9ddc0;
    background: #effbea;
    color: #1f6a34;
}

.judge-project-status strong {
    font-size: 1.35rem;
    line-height: 1;
}

.judge-project-status span {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.judge-project-tools {
    display: grid;
    gap: 0.45rem;
}

.judge-tool-link,
.judge-tool-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 13px;
    padding: 0.62rem 0.8rem;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.judge-tool-link.document {
    border: 1px solid #2c7264;
    background: linear-gradient(135deg, #2f9c84 0%, #1f6f7c 100%);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(24, 106, 119, 0.18);
}

.judge-tool-link.document:hover {
    transform: translateY(-1px);
    color: #ffffff;
}

.judge-tool-missing {
    border: 1px dashed #d9a5ae;
    background: #fff8f9;
    color: #8c2030;
}

.judge-evaluation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.judge-eval-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    padding: 0.44rem 0.8rem;
    border: 1px solid #cbd9ea;
    background: #f6faff;
    color: var(--primary);
    font-weight: 900;
    line-height: 1.15;
    text-decoration: none;
}

.judge-eval-chip.action {
    border-color: #d79026;
    background: linear-gradient(180deg, #ffb333 0%, #f0a11b 100%);
    color: #15395e;
}

.judge-eval-chip.action:hover {
    transform: translateY(-1px);
    color: #15395e;
}

.judge-eval-chip.done {
    border-color: #b9ddc0;
    background: #effbea;
    color: #1f6a34;
}

.judge-eval-chip.missing {
    border-color: #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

.judge-empty-state {
    border: 1px dashed #b8cde4;
    border-radius: 18px;
    padding: 1.2rem;
    background: #ffffff;
    text-align: center;
}

.judge-empty-state h3 {
    margin: 0;
    color: var(--primary);
}

.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;
}

.projects-maintenance-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

.projects-maintenance-table td {
    vertical-align: middle;
}

.projects-maintenance-table th:nth-child(1),
.projects-maintenance-table td:nth-child(1) {
    width: 35%;
}

.projects-maintenance-table th:nth-child(2),
.projects-maintenance-table td:nth-child(2) {
    width: 13%;
}

.projects-maintenance-table th:nth-child(3),
.projects-maintenance-table td:nth-child(3) {
    width: 9%;
}

.projects-maintenance-table th:nth-child(4),
.projects-maintenance-table td:nth-child(4) {
    width: 13%;
}

.projects-maintenance-table th:nth-child(5),
.projects-maintenance-table td:nth-child(5) {
    width: 12%;
}

.projects-maintenance-table th:nth-child(6),
.projects-maintenance-table td:nth-child(6) {
    width: 96px;
}

.projects-maintenance-table th:nth-child(7),
.projects-maintenance-table td:nth-child(7) {
    width: 116px;
}

.project-title-cell {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #314f73;
    word-break: break-word;
}

.projects-card-list {
    display: grid;
    gap: 0.8rem;
}

.project-maintenance-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 252, 0.92));
    box-shadow: 0 14px 28px rgba(15, 65, 103, 0.08);
}

.project-maintenance-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.project-maintenance-title {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.project-maintenance-title h3 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(1.18rem, 2vw, 1.55rem);
    line-height: 1.15;
}

.project-maintenance-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.project-maintenance-statebar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.project-maintenance-actions {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr) auto;
    gap: 0.65rem;
    align-items: stretch;
}

.project-action-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid rgba(126, 171, 207, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.project-action-label {
    flex: 0 0 100%;
    color: #607798;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-action-btn,
.project-action-group button,
.project-action-group a,
.project-action-group .inline-form {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
}

.project-action-btn,
.project-action-group button,
.project-action-group a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 850;
    font-size: 0.9rem;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.project-action-btn:hover,
.project-action-group button:hover,
.project-action-group a:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 65, 103, 0.12);
}

.project-action-group .inline-form {
    display: inline-flex;
    margin: 0;
}

.action-edit {
    background: #eef8ff;
    border-color: #b6d9f1;
    color: var(--primary);
}

.action-logistics {
    background: linear-gradient(135deg, #94d142, #73ad28);
    color: #0b361b;
}

.action-members {
    background: #e9f4e5;
    border-color: #bddf9c;
    color: #19572a;
}

.action-doc {
    background: linear-gradient(135deg, #2ea08d, #1f7d83);
    color: #fff;
}

.action-packet {
    background: linear-gradient(135deg, #ffbd4a, #f59a0c);
    color: #082f57;
}

.action-disabled {
    background: #eef2f6;
    color: #6b7a90;
    border-color: #d4deeb;
    cursor: default;
}

.action-delete {
    background: linear-gradient(135deg, #c14a5a, #9d2f42);
    color: #fff;
}

.project-empty-card {
    padding: 1.2rem;
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

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

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

    .project-maintenance-statebar {
        justify-content: flex-start;
    }

    .project-action-group-danger {
        border-color: rgba(193, 74, 90, 0.22);
        background: rgba(251, 236, 239, 0.55);
    }
}

@media (max-width: 640px) {
    .projects-logistics-metrics {
        grid-template-columns: 1fr;
    }

    .projects-report-actions {
        gap: .65rem;
    }

    .projects-tutors-link {
        align-items: stretch;
        flex-direction: column;
    }

    .projects-report-copy small {
        display: none;
    }

    .projects-report-download {
        white-space: nowrap;
    }

    .project-maintenance-card {
        padding: 0.8rem;
        border-radius: 14px;
    }

    .project-action-group {
        display: grid;
        grid-template-columns: 1fr;
        padding: 0.55rem;
    }

    .project-action-btn,
    .project-action-group button,
    .project-action-group a {
        width: 100%;
    }
}

.projects-maintenance-table .actions-cell {
    display: grid;
    grid-template-columns: repeat(2, 42px);
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    min-width: 96px;
}

.projects-maintenance-table .actions-cell > *,
.projects-maintenance-table .actions-cell .inline-form {
    margin: 0;
    min-width: 0;
    max-width: 42px;
}

.projects-maintenance-table .actions-cell .btn-icon-only {
    width: 42px;
    height: 42px;
    min-width: 42px;
}

.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;
}

.tag.warning {
    background: var(--warning-soft);
    color: #8a5f00;
    border: 1px solid rgba(247, 198, 47, 0.55);
}

.tag.muted {
    background: #eef4fb;
    color: #5d708b;
    border: 1px solid #d6e2ef;
}

.tag.neutral {
    background: #eef4fb;
    color: #315a7d;
    border: 1px solid #d6e2ef;
}

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

.logistics-auto-status {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
    min-height: 62px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d5e2ef;
    border-radius: 10px;
    background: #f8fbfe;
}

.logistics-auto-status > span {
    color: #173b63;
    font-weight: 800;
}

.logistics-auto-status > small {
    grid-column: 1 / -1;
    color: #647b94;
}

.logistics-check-section {
    display: grid;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid #dbe8f5;
    border-radius: 14px;
    background: #fbfdff;
}

.logistics-check-section-physical {
    background: #fffdf8;
    border-color: #eadfc0;
}

.logistics-check-head {
    display: grid;
    gap: 0.12rem;
}

.logistics-check-head span {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.logistics-check-head small {
    color: #5e7691;
    font-weight: 600;
}

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

.logistics-check-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.32rem;
    min-height: 116px;
    padding: 0.85rem 0.85rem 0.85rem 3.1rem;
    border: 1px solid #cbdced;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(30, 66, 105, 0.06);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.logistics-check-card:hover {
    border-color: var(--primary-2);
    box-shadow: 0 14px 30px rgba(31, 143, 181, 0.12);
    transform: translateY(-1px);
}

.logistics-check-card input {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    width: 1.45rem;
    height: 1.45rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.logistics-check-card:has(input:checked) {
    border-color: #66a82f;
    background: linear-gradient(135deg, #f4ffe9 0%, #ffffff 82%);
    box-shadow: 0 14px 30px rgba(102, 168, 47, 0.13);
}

.check-card-title {
    color: #153a63;
    font-weight: 900;
    line-height: 1.25;
}

.check-card-help {
    color: #667f99;
    font-size: 0.9rem;
    line-height: 1.35;
}

/* consent per-member list inside logistics card */
.logistics-consent-card {
    grid-column: 1 / -1;
    cursor: default;
}
.logistics-consent-card:hover {
    transform: none;
    border-color: #d0dde8;
    box-shadow: none;
}
.logistics-consent-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.logistics-consent-member {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid #e0eaf4;
    background: #f8fafc;
    cursor: pointer;
    transition: background 120ms;
}
.logistics-consent-member:has(input:checked) {
    background: #f0ffe8;
    border-color: #a8d870;
}
.logistics-consent-member input {
    position: static;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}
.logistics-consent-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1a3a5a;
}
.logistics-consent-section {
    font-size: 0.78rem;
    color: #667f99;
    margin-left: auto;
}
.logistics-consent-member-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.logistics-consent-member-row .logistics-consent-member {
    flex: 1;
    min-width: 160px;
}
.logistics-consent-cedulas {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}
.logistics-consent-cedula {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.77rem;
    font-weight: 600;
    color: #607998;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0;
    background: none;
    border: none;
}
.logistics-consent-cedula:has(input:checked) {
    color: #1d7a22;
}
.logistics-consent-cedula input {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 0.95rem;
    height: 0.95rem;
    accent-color: #2d6a4f;
    flex-shrink: 0;
    display: inline-block;
}
.logistics-consent-master-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    width: 100%;
}
.logistics-consent-master-label .check-card-title {
    margin: 0;
}
.logistics-consent-master {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #1d7a22;
    flex-shrink: 0;
    cursor: pointer;
}

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

@media (max-width: 620px) {
    .logistics-check-grid {
        grid-template-columns: 1fr;
    }

    .logistics-check-card {
        min-height: auto;
    }
}

.logistics-review-card,
.logistics-requirements-summary {
    border: 1px solid #d7e6f5;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef7ff 100%);
    padding: 0.85rem;
}

.logistics-review-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.logistics-review-card h5 {
    margin: 0 0 0.2rem;
    color: var(--primary);
    font-size: 1rem;
}

.logistics-review-card p {
    margin: 0;
    color: #526d8a;
}

.logistics-upload-form {
    margin-top: 0.85rem;
}

.logistics-upload-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.9fr) auto;
    gap: 0.85rem;
    align-items: end;
    border: 1px solid #d7e6f5;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    padding: 0.9rem;
}

.logistics-upload-card h5 {
    margin: 0 0 0.2rem;
    color: var(--primary);
    font-size: 1rem;
}

.logistics-upload-card p,
.logistics-upload-card small {
    margin: 0;
    color: #526d8a;
}

.logistics-upload-card input[type="file"] {
    min-height: 42px;
    padding: 0.42rem;
}

@media (max-width: 760px) {
    .tutor-mode-picker {
        grid-template-columns: 1fr;
    }
    .logistics-upload-card {
        grid-template-columns: 1fr;
    }
}

.logistics-requirements-summary {
    display: grid;
    gap: 0.32rem;
    color: #314f73;
}

.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;
}

.logistics-control-link {
    background: linear-gradient(135deg, #0b6fae 0%, #2f9c84 100%);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(19, 105, 150, 0.16);
    color: #ffffff;
}

.logistics-control-link:hover {
    background: linear-gradient(135deg, #075f98 0%, #277f6f 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.pending-logistics-list {
    display: grid;
    gap: 0.68rem;
}

.pending-logistics-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(520px, 1.8fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.82rem 0.9rem;
    border: 1px solid #d7e6f5;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 12px 26px rgba(18, 63, 107, 0.055);
}

.pending-logistics-main {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.pending-logistics-main h5 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(1.02rem, 1.35vw, 1.22rem);
    line-height: 1.2;
}

.pending-logistics-main p {
    margin: 0;
    color: #5d7693;
    font-weight: 700;
}

.pending-logistics-checks {
    display: grid;
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    gap: 0.45rem;
    align-items: stretch;
}

.logistics-mini-check {
    display: grid;
    gap: 0.18rem;
    min-height: 56px;
    padding: 0.45rem 0.55rem;
    border: 1px solid #d9e6f4;
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
}

.logistics-mini-check strong {
    color: #607798;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.logistics-mini-check em {
    align-self: center;
    color: #1f4f82;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.05;
}

.logistics-mini-check.is-ok {
    border-color: #bfe1a1;
    background: #f4ffe9;
}

.logistics-mini-check.is-ok em {
    color: #3f7307;
}

.logistics-mini-check.is-missing {
    border-color: #efbfca;
    background: #fff2f5;
}

.logistics-mini-check.is-missing em {
    color: #9a2437;
}

.logistics-mini-check.is-warning {
    border-color: #f0cf86;
    background: #fff8e8;
}

.logistics-mini-check.is-warning em {
    color: #9a5b12;
}

.pending-logistics-action {
    min-width: 118px;
    min-height: 42px;
    border-radius: 14px;
}

.pending-logistics-member-list,
.pending-logistics-missing-items {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    background: #fff8f0;
    border: 1px solid #f0d8b0;
}

.pending-logistics-missing-items {
    background: #fff2f5;
    border-color: #efbfca;
}

.logistics-member-list-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7a5a20;
    flex-shrink: 0;
}

.pending-logistics-missing-items .logistics-member-list-label {
    color: #7a2030;
}

.logistics-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.22rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    background: #fff0d0;
    border: 1px solid #e5c06a;
    color: #7a5010;
}

.logistics-member-chip em {
    font-style: normal;
    font-size: 0.7rem;
    opacity: 0.75;
    font-weight: 600;
}

.logistics-member-chip.missing-item {
    background: #ffe8ee;
    border-color: #e8a0b0;
    color: #821530;
}

@media (max-width: 1250px) {
    .pending-logistics-card {
        grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.2fr);
    }

    .pending-logistics-action {
        justify-self: start;
    }
}

@media (max-width: 820px) {
    .pending-logistics-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .pending-logistics-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pending-logistics-checks .logistics-mini-check:last-child {
        grid-column: 1 / -1;
    }

    .pending-logistics-action {
        width: 100%;
        justify-content: center;
    }
}

.project-row-focus {
    position: relative;
    outline: 3px solid rgba(47, 156, 132, 0.35);
    outline-offset: -3px;
    box-shadow: inset 5px 0 0 #2f9c84, 0 12px 30px rgba(47, 156, 132, 0.16);
    animation: projectFocusPulse 1.25s ease-in-out 3;
}

@keyframes projectFocusPulse {
    0%, 100% {
        background: #ffffff;
    }
    50% {
        background: #ecfff9;
    }
}

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

.report-project-page {
    overflow: hidden;
}

.report-project-hero {
    align-items: flex-start;
}

.report-project-hero h3,
.report-project-hero p {
    max-width: 860px;
}

.report-project-hero p:last-child {
    overflow-wrap: anywhere;
}

.report-project-stats article strong {
    overflow-wrap: anywhere;
}

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

.report-evaluation-card {
    border: 1px solid #d6e2f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.report-evaluation-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fc 100%);
    border-bottom: 1px solid #d6e2f0;
}

.report-evaluation-head h4,
.report-evaluation-head p {
    margin: 0;
}

.report-evaluation-head h4 {
    color: var(--primary);
    font-size: 1rem;
}

.report-evaluation-head span {
    display: block;
    color: #5d7694;
    font-size: 0.82rem;
}

.report-score-pill {
    align-self: flex-start;
    min-width: 86px;
    border: 1px solid #b8d8f0;
    border-radius: 10px;
    background: #fff;
    padding: 0.45rem 0.65rem;
    text-align: center;
}

.report-score-pill strong {
    display: block;
    color: #1d7a22;
    font-size: 1.05rem;
    line-height: 1;
}

.report-score-pill span {
    margin-top: 0.2rem;
    color: #5d7694;
    font-size: 0.72rem;
}

.report-evaluation-body {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.report-note {
    border-left: 4px solid #b8d8f0;
    background: #f7fbff;
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
}

.report-note strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.report-note p {
    margin: 0;
    color: #294b70;
    line-height: 1.45;
}

.report-criteria-wrap {
    overflow-x: auto;
    border: 1px solid #d6e2f0;
    border-radius: 10px;
}

.report-criteria-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.report-criteria-table th {
    background: #103f78;
    color: #fff;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 0.55rem 0.65rem;
}

.report-criteria-table td {
    padding: 0.58rem 0.65rem;
    border-top: 1px solid #e3edf7;
    color: #294b70;
    vertical-align: top;
}

.report-criteria-table tbody tr:nth-child(even) td {
    background: #f7fbff;
}

.report-criteria-table th:nth-child(1),
.report-criteria-table td:nth-child(1) {
    width: 16%;
}

.report-criteria-table th:nth-child(3),
.report-criteria-table td:nth-child(3) {
    width: 90px;
    text-align: center;
    font-weight: 800;
    color: #1d7a22;
}

.report-criteria-table th:nth-child(4),
.report-criteria-table td:nth-child(4) {
    width: 24%;
}

.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);
}

.judge-edit-section-label {
    margin: 0.4rem 0 0.1rem;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a9ab8;
    border-bottom: 1px solid #e4edf6;
    padding-bottom: 0.3rem;
}

.judge-edit-english-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #d0dff0;
    border-radius: 8px;
    background: #f4f9ff;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a4a7a;
    width: fit-content;
}
.judge-edit-english-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #1a7f4b;
    cursor: pointer;
    flex-shrink: 0;
}

.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;
}

.users-admin-hero {
    border-left: 5px solid #0f4c81;
    background:
        radial-gradient(circle at top right, rgba(31, 143, 181, 0.12), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.users-admin-head h3 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

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

.users-summary-grid article {
    border: 1px solid #d7e6f5;
    border-radius: 16px;
    background: #ffffff;
    padding: 0.9rem;
    box-shadow: 0 10px 24px rgba(15, 76, 129, 0.06);
}

.users-summary-grid strong {
    display: block;
    color: #0f4c81;
    font-size: 1.8rem;
    line-height: 1;
}

.users-summary-grid span {
    color: #58708a;
    font-weight: 800;
}

.users-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: stretch;
}

.users-action-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #d7e6f5;
    border-radius: 18px;
    background: #ffffff;
    padding: 1rem;
    min-width: 0;
}

.users-action-card.primary {
    background: linear-gradient(135deg, #f6fbff 0%, #ffffff 100%);
}

.users-action-card:not(.primary) {
    grid-template-columns: minmax(0, 1fr);
}

.users-action-card h4,
.users-action-card p {
    margin: 0;
}

.users-public-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    grid-column: 1 / -1;
    min-width: 0;
}

.users-public-link input {
    width: 100%;
    min-width: 0;
}

.judge-public-status-form {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
}

.judge-public-status-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.65rem;
    align-items: center;
    border: 1px solid #dbe8f5;
    border-radius: 12px;
    background: #f7fbff;
    padding: 0.7rem;
}

.judge-public-status-label {
    display: block;
    color: #607998;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.judge-public-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #123f6b;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

.judge-public-switch input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #1d7a22;
}

.judge-public-status-row .outline-btn {
    padding: 0.62rem 0.9rem;
}

.users-table-section {
    display: grid;
    gap: 1rem;
}

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

.judge-pool-card span {
    color: #5d7897;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.judge-pool-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d7e5f5;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    font-size: 0.95rem;
    color: #3a5a7a;
}

.judge-pool-summary-strip strong {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 900;
}

.strip-sep {
    color: #b0c8df;
    font-weight: 400;
    user-select: none;
}

.judge-scope-matrix-wrap {
    overflow-x: auto;
}

.judge-scope-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.judge-scope-matrix th,
.judge-scope-matrix td {
    padding: 0.55rem 0.85rem;
    text-align: center;
    border-bottom: 1px solid #e4eef8;
}

.judge-scope-matrix th:first-child,
.judge-scope-matrix td:first-child {
    text-align: left;
}

.judge-scope-matrix thead th {
    color: #5d7897;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #f5faff;
}

.judge-scope-matrix tbody tr:hover td {
    background: #f0f7ff;
}

.judge-scope-matrix tfoot td {
    border-top: 2px solid #c8ddf0;
    border-bottom: none;
    background: #f5faff;
    color: var(--primary);
}

.judge-scope-matrix-note {
    margin: 0.55rem 0 0;
    font-size: 0.82rem;
    color: #7a96b0;
}

/* ── Students stats dashboard ─────────────────────────────────── */
.students-stats-page { gap: 1.1rem; }

.ss-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
}

.ss-kpi-card {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d4e5f5;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #f2f8ff 100%);
}

.ss-kpi-primary { border-color: #1a6fba; background: linear-gradient(135deg, #1a6fba 0%, #1458a0 100%); }
.ss-kpi-primary .ss-kpi-label,
.ss-kpi-primary .ss-kpi-value { color: #fff; }

.ss-kpi-accent { border-color: #f5a623; background: linear-gradient(135deg, #fff8ee 0%, #fff3d6 100%); }
.ss-kpi-green  { border-color: #2ecc71; background: linear-gradient(135deg, #f0fff6 0%, #d6f5e3 100%); }

.ss-kpi-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #607998;
}

.ss-kpi-value {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.ss-kpi-sub {
    font-size: 0.78rem;
    color: #7a96b0;
    font-weight: 600;
}

.ss-chart-row {
    display: grid;
    gap: 0.75rem;
}

.ss-chart-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ss-chart-card {
    border: 1px solid #d4e5f5;
    border-radius: 14px;
    background: #fff;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ss-chart-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a4a7a;
}

.ss-chart-wrap {
    position: relative;
    height: 240px;
}

.ss-chart-donut {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    padding: 0.5rem 0;
}

.ss-chart-donut canvas {
    max-width: 280px;
    width: 100% !important;
    height: auto !important;
}

.pie-legend {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pie-legend li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #3a5a7a;
    line-height: 1.4;
}
.pie-legend-dot {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-top: 2px;
}

@media (max-width: 860px) {
    .ss-chart-row-2 { grid-template-columns: 1fr; }
    .ss-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dependencies page ─────────────────────────────────────────── */
.dep-output-panel {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 1px solid #d7e5f5;
}

.dep-output-ok  { background: #f0fff4; border-color: #86d9a0; }
.dep-output-error { background: #fff5f5; border-color: #f5a0a0; }

.dep-output-label {
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0 0 0.4rem;
    color: #2d6a4f;
}

.dep-output-error .dep-output-label { color: #9b2222; }

.dep-output-pre {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 320px;
    overflow-y: auto;
    color: #1a2e1a;
}

.dep-output-error .dep-output-pre { color: #6b1a1a; }

.dep-install-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.dep-install-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex: 1 1 320px;
}

.dep-install-label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #3a5a7a;
    flex: 1;
}

.dep-install-input {
    width: 100%;
}

.dep-section-title {
    margin: 0.2rem 0 0.1rem;
    font-size: 0.95rem;
    color: #1a4a7a;
}

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

.dep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dep-table th,
.dep-table td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #e8f0f9;
    text-align: left;
}

.dep-table th {
    background: #f0f7ff;
    color: #5d7897;
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dep-table tbody tr:hover td { background: #f5faff; }

.dep-version {
    font-family: monospace;
    font-size: 0.85rem;
    color: #4a6a8a;
}

.dep-install-one-btn {
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.dep-all-panel {
    border: 1px solid #d7e5f5;
    border-radius: 12px;
    overflow: hidden;
}

.dep-all-panel summary {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1a4a7a;
    background: #f5faff;
    list-style: none;
}

.dep-all-panel summary::-webkit-details-marker { display: none; }
.dep-all-panel[open] summary { border-bottom: 1px solid #d7e5f5; }

.advisor-stats-panel {
    border: 1px solid #d7e5f5;
    border-radius: 14px;
    background: #f8fbff;
    overflow: hidden;
}

.advisor-stats-panel summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    user-select: none;
    list-style: none;
}

.advisor-stats-panel summary::-webkit-details-marker { display: none; }

.advisor-stats-panel[open] summary {
    border-bottom: 1px solid #d7e5f5;
}

.advisor-stats-wrap {
    overflow-x: auto;
}

.advisor-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.advisor-stats-table th,
.advisor-stats-table td {
    padding: 0.45rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #e8f0f9;
}

.advisor-stats-table th {
    color: #5d7897;
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #f0f7ff;
}

.advisor-stats-table td:nth-child(4),
.advisor-stats-table td:nth-child(5),
.advisor-stats-table td:nth-child(6),
.advisor-stats-table th:nth-child(4),
.advisor-stats-table th:nth-child(5),
.advisor-stats-table th:nth-child(6) {
    text-align: center;
}

.advisor-stats-table tbody tr:hover td {
    background: #f0f7ff;
}

.advisor-stats-table .muted-cell {
    color: #7a96b0;
    font-size: 0.83rem;
}

.advisor-edit-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.project-advisor-line {
    margin: 0.15rem 0 0;
    font-size: 0.83rem;
    color: #5d7897;
}

.judge-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: end;
    border: 1px solid #d7e5f5;
    border-radius: 18px;
    background: #f8fbff;
    padding: 0.9rem;
}

.judge-filter-panel label {
    display: grid;
    gap: 0.35rem;
    color: #5d7897;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.judge-pool-list {
    display: grid;
    gap: 0.8rem;
}

.judge-pool-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.35fr) minmax(150px, 0.45fr) minmax(190px, 0.55fr);
    gap: 0.85rem;
    align-items: stretch;
}

.judge-pool-card[hidden] {
    display: none;
}

.judge-pool-identity,
.judge-pool-profile,
.judge-pool-load {
    border: 1px solid #d7e5f5;
    border-radius: 16px;
    background: #ffffff;
    padding: 0.9rem;
}

.judge-pool-attendance {
    border: 1px solid #d7e5f5;
    border-radius: 16px;
    background: #f8fbff;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    justify-content: center;
    min-width: 0;
}
.judge-pool-attendance > span:first-child {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a9ab8;
}
.judge-pool-attendance small {
    font-size: 0.72rem;
    color: #9ab5cc;
}

.judge-pool-attendance .tag {
    align-self: flex-start;
}

.judge-pool-attendance p {
    color: #d32f2f;
    font-size: 0.72rem;
    line-height: 1.25;
    margin: 0.15rem 0 0;
    overflow-wrap: anywhere;
}

.judge-pool-attendance form {
    margin-top: 0.25rem !important;
}

.judge-pool-attendance .ghost-btn {
    font-size: 0.74rem !important;
    padding: 0.42rem 0.65rem;
}

.judge-pool-identity h4,
.judge-pool-identity p,
.judge-pool-profile p,
.judge-pool-load p {
    margin: 0;
}

.judge-pool-identity h4 {
    color: var(--primary);
    font-size: 1.25rem;
}

.judge-pool-identity {
    display: grid;
    gap: 0.28rem;
}

.judge-pool-profile {
    display: grid;
    gap: 0.75rem;
}

.judge-pool-profile strong {
    color: #153a63;
}

.judge-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem;
}

.judge-chip-row .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 0;
    max-width: 100%;
    padding: 0.22rem 0.55rem;
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
}

.judge-pool-load {
    display: grid;
    align-content: center;
    text-align: center;
    justify-items: center;
}

.judge-pool-load strong {
    color: var(--primary);
    font-size: 2.1rem;
    line-height: 1;
}

.judge-eval-progress {
    width: min(130px, 100%);
    display: grid;
    gap: 0.16rem;
    margin: 0.15rem 0 0.1rem;
}

.judge-eval-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.judge-eval-progress small,
.judge-eval-progress b {
    font-size: 0.72rem;
    line-height: 1;
}

.judge-eval-progress small {
    color: #6f8cab;
}

.judge-eval-progress b {
    color: var(--primary);
}

.judge-eval-progress-track {
    height: 6px;
    border-radius: 999px;
    background: #e3edf7;
    overflow: hidden;
}

.judge-eval-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #1d7a22;
}

.judge-eval-scope-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.28rem;
    max-width: 160px;
    margin: 0.15rem 0 0.2rem;
}

.judge-eval-scope {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid #d7e6f5;
    border-radius: 999px;
    background: #f7fbff;
    color: #123f6b;
    padding: 0.18rem 0.42rem;
    line-height: 1;
}

.judge-eval-scope.complete {
    border-color: #bfe2c1;
    background: #effaf0;
    color: #1d7a22;
}

.judge-eval-scope b,
.judge-eval-scope small {
    font-size: 0.66rem;
    line-height: 1;
}

.judge-eval-scope small {
    color: inherit;
    font-weight: 800;
}

.judge-balance-form {
    margin: 0;
    width: 100%;
}

.judge-load-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 88px;
    margin-top: 0.35rem;
}

.judge-load-action-btn {
    width: 42px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.judge-load-action-btn .btn-svg {
    width: 1.05rem;
    height: 1.05rem;
}

.judge-warning {
    color: #9b263a;
    font-weight: 800;
}

.judge-assignment-strip,
.judge-warning-list {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.judge-assignment-strip span {
    border: 1px solid #cddced;
    border-radius: 999px;
    background: #f2f7fd;
    color: #224c77;
    padding: 0.32rem 0.65rem;
    font-size: 0.78rem;
    letter-spacing: normal;
    text-transform: none;
}

.judge-warning-list {
    border: 1px solid #f0bec8;
    border-radius: 14px;
    background: #fff3f5;
    padding: 0.65rem;
}

.judge-warning-list p {
    margin: 0;
    color: #8f1f35;
    font-weight: 800;
}

.users-search-wrap input {
    min-width: min(360px, 100%);
}

.users-role-legend {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.users-role-legend span {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d7e6f5;
    border-radius: 999px;
    background: #f6fbff;
    color: #315a7d;
    padding: 0.24rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 800;
}

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

.user-identity-cell,
.user-profile-cell,
.user-status-stack {
    display: grid;
    gap: 0.25rem;
}

.user-identity-cell strong {
    color: #0d3f6b;
}

.user-identity-cell span,
.user-identity-cell small,
.user-profile-cell span,
.user-profile-cell small {
    color: #58708a;
}

.users-actions-cell {
    white-space: nowrap;
}

.toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.toggle-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.judge-register-shell {
    display: grid;
    gap: 1rem;
    max-width: 1120px;
    margin: 0 auto;
}

.judge-registration-page {
    background:
        radial-gradient(circle at top left, rgba(31, 143, 181, 0.16), transparent 34rem),
        linear-gradient(180deg, #f6fbff 0%, #eef6fb 100%);
}

.judge-register-head {
    display: grid;
    gap: 0.35rem;
    padding: 1.1rem 0 0.2rem;
}

.judge-register-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border: 1px solid #c9dced;
    border-radius: 18px;
    padding: 1.2rem;
    background: linear-gradient(135deg, #123f6b 0%, #1f8fb5 100%);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(18, 63, 107, 0.16);
}

.judge-hero-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.judge-hero-logo-card {
    display: grid;
    place-items: center;
    width: clamp(180px, 24vw, 310px);
    min-height: 116px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 16px 36px rgba(4, 28, 51, 0.18);
    padding: 0.8rem 1rem;
}

.judge-hero-logo-card img {
    display: block;
    width: 100%;
    max-height: 104px;
    object-fit: contain;
}

.judge-register-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: #0f2f52;
}

.judge-register-hero h2 {
    color: #ffffff;
}

.judge-register-head p {
    margin: 0;
    max-width: 780px;
    color: #536b85;
}

.judge-register-hero p {
    color: rgba(255, 255, 255, 0.86);
}

.judge-register-form {
    display: grid;
    gap: 1rem;
}

.judge-register-intro {
    display: grid;
    gap: 0.75rem;
    border: 1px solid #d7e3ef;
    border-left: 5px solid #1f7a54;
    border-radius: 8px;
    background: #ffffff;
    padding: 1.1rem;
    color: #30465f;
    line-height: 1.58;
}

.judge-register-intro p,
.judge-register-intro ul {
    margin: 0;
}

.judge-register-intro ul {
    padding-left: 1.25rem;
}

.judge-register-intro li {
    margin: 0.2rem 0;
}

.judge-invitation-card {
    border-radius: 20px;
    border-left: 0;
    border-top: 5px solid #1f7a54;
    padding: 1.25rem;
    box-shadow: 0 16px 34px rgba(18, 63, 107, 0.08);
}

.judge-intro-eyebrow {
    width: fit-content;
    border-radius: 999px;
    background: #eaf8ef;
    color: #17613c;
    padding: 0.28rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.judge-invitation-card h3 {
    margin: 0;
    color: #0d3f6b;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

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

.judge-event-card {
    display: grid;
    gap: 0.28rem;
    min-height: 128px;
    border: 1px solid #cfe0f1;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    padding: 0.95rem;
}

.judge-event-card.highlight {
    border-color: #f5b36a;
    background: linear-gradient(145deg, #fff7ed 0%, #ffffff 100%);
}

.judge-event-card span {
    color: #58708a;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.judge-event-card strong {
    color: #0d3f6b;
    font-size: 1.25rem;
}

.judge-event-card small {
    color: #536b85;
    line-height: 1.35;
}

.judge-register-note {
    border-radius: 8px;
    background: #f1f7fd;
    border: 1px solid #cfe0f1;
    padding: 0.75rem;
    color: #163f66;
    font-weight: 700;
}

.judge-intro-confirm {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-radius: 16px;
    background: #f7fbff;
    border: 1px dashed #b9d2ea;
    padding: 0.85rem;
}

.judge-read-confirm {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 0.6rem;
    min-width: min(100%, 560px);
    color: #123a63;
    font-weight: 850;
}

.judge-read-confirm input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #1f7a54;
    flex: 0 0 auto;
}

.judge-intro-button {
    border-color: #1f7a54;
    background: linear-gradient(180deg, #2f9d68 0%, #1f7a54 100%);
    color: #ffffff;
    font-weight: 900;
}

.judge-intro-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
}

.judge-form-collapsed {
    display: none;
}

.judge-register-band {
    display: grid;
    gap: 0.8rem;
    border: 1px solid #d7e3ef;
    border-radius: 18px;
    background: #ffffff;
    padding: 1.05rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(18, 63, 107, 0.07);
}

.judge-register-card-accent {
    border-top: 4px solid var(--judge-accent, #1f8fb5);
}

.judge-register-card-accent.personal {
    --judge-accent: #1f8fb5;
}

.judge-register-card-accent.profile {
    --judge-accent: #75a928;
}

.judge-register-card-accent.evaluation {
    --judge-accent: #f47a20;
}

.judge-register-card-accent.confirm {
    --judge-accent: #123f6b;
}

.judge-step {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--judge-accent, #1f8fb5) 16%, #ffffff);
    color: var(--judge-accent, #1f8fb5);
    font-weight: 900;
    border: 1px solid color-mix(in srgb, var(--judge-accent, #1f8fb5) 34%, #ffffff);
}

.judge-register-band h3 {
    margin: 0;
    color: #123a63;
}

.judge-register-band .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: start;
}

dialog.member-edit-dialog {
    width: min(980px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    border: 0;
    border-radius: 18px;
}

.member-edit-dialog .dialog-card {
    gap: 1rem;
    padding: 0;
    overflow: hidden;
}

.member-edit-head {
    padding: 1.05rem 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, #0f3f6d, #16688d);
}

.member-edit-head span,
.member-edit-head h4,
.member-edit-head p {
    margin: 0;
}

.member-edit-head span {
    color: #a9d9ec;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.member-edit-head h4 {
    margin-top: 0.15rem;
    font-size: 1.35rem;
}

.member-edit-head p {
    margin-top: 0.1rem;
    color: #dceef7;
    font-size: 0.84rem;
}

.member-edit-head .dialog-close {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

.member-edit-form {
    max-height: calc(100vh - 145px);
    padding: 0 1.25rem 1.2rem;
    overflow-y: auto;
}

.member-edit-form > .grid-2,
.member-edit-form > .grid-3 {
    padding: 0.85rem;
    border: 1px solid #dbe7f1;
    border-radius: 12px;
    background: #f8fbfe;
}

.member-edit-form label {
    gap: 0.3rem;
    color: #24496f;
    font-size: 0.78rem;
    font-weight: 800;
}

.member-edit-form input,
.member-edit-form select {
    min-height: 43px;
    background: #fff;
    font-size: 0.93rem;
}

.member-photo-editor {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid #b9d8e8;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef8fc, #f9fcfe);
}

.member-photo-preview img {
    display: block;
    width: 112px;
    height: 124px;
    border: 2px solid #fff;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 7px 18px rgba(17, 63, 101, 0.17);
}

.member-photo-controls {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.member-photo-controls strong,
.member-photo-controls small {
    display: block;
}

.member-photo-controls strong {
    color: var(--primary);
}

.member-photo-controls small {
    margin-top: 0.15rem;
    color: var(--muted);
}

.member-photo-controls input[type="file"] {
    width: 100%;
    padding: 0.35rem;
    border: 1px dashed #9fc6dc;
}

.member-photo-controls input[type="file"]::file-selector-button {
    margin-right: 0.65rem;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #176e96;
    font-weight: 800;
    cursor: pointer;
}

.member-photo-delete {
    justify-self: start;
    min-height: 38px;
}

.member-edit-actions {
    position: sticky;
    bottom: -1.2rem;
    margin: 0 -1.25rem -1.2rem;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid #dbe7f1;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

@media (max-width: 680px) {
    .member-edit-form > .grid-2,
    .member-edit-form > .grid-3,
    .member-photo-editor {
        grid-template-columns: 1fr;
    }

    .member-photo-preview img {
        width: 88px;
        height: 98px;
    }

    .member-photo-delete,
    .member-edit-actions button {
        width: 100%;
    }
}

dialog.members-overview-dialog {
    width: min(1060px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: 20px;
}

.members-overview-card {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.members-overview-head {
    padding: 1rem 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, #0b3c68, #13789b);
}

.members-overview-head span,
.members-overview-head h4,
.members-overview-head p {
    margin: 0;
}

.members-overview-head span {
    color: #bde9f4;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.members-overview-head h4 {
    margin-top: 0.12rem;
    font-size: 1.45rem;
}

.members-overview-head p {
    color: #e0f2f7;
    font-size: 0.84rem;
}

.members-overview-head .dialog-close {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.1);
}

.members-project-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.3rem;
    border-bottom: 1px solid #dce8f1;
    background: #f5f9fc;
}

.members-project-summary div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.members-project-summary strong {
    color: var(--primary);
    line-height: 1.25;
}

.members-project-summary small {
    color: var(--muted);
}

.members-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1.15rem 1.3rem;
}

.member-profile-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0.85rem;
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid #cfe0ec;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 64, 101, 0.07);
}

.member-profile-photo {
    position: relative;
}

.member-profile-photo img {
    display: block;
    width: 82px;
    height: 104px;
    border-radius: 11px;
    object-fit: cover;
    object-position: center top;
    background: #eaf3f8;
}

.member-profile-photo > span {
    position: absolute;
    right: -0.35rem;
    bottom: -0.25rem;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #0b537f;
    font-size: 0.72rem;
    font-weight: 900;
}

.member-profile-content {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.member-profile-title {
    display: grid;
    gap: 0.35rem;
}

.member-profile-title strong {
    color: var(--primary);
    line-height: 1.2;
}

.member-profile-title .tag {
    justify-self: start;
    padding: 0.2rem 0.5rem;
    font-size: 0.67rem;
}

.member-profile-facts {
    display: flex;
    gap: 0.8rem;
}

.member-profile-facts span {
    display: grid;
}

.member-profile-facts small {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.member-profile-facts strong {
    font-size: 0.8rem;
}

.member-profile-content > p {
    margin: 0;
    color: #506b84;
    font-size: 0.76rem;
    line-height: 1.35;
}

.member-profile-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: auto;
}

.member-profile-actions form {
    margin: 0;
}

.member-profile-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.38rem 0.62rem;
    font-size: 0.72rem;
    white-space: nowrap;
}

.member-profile-actions > .outline-btn {
    flex: 1;
}

.member-profile-actions .member-delete-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 9px;
}

.member-delete-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.members-history {
    margin: 0 1.3rem 1rem;
    border: 1px solid #d7e4ee;
    border-radius: 14px;
    background: #f8fbfd;
    overflow: hidden;
}

.members-history summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
}

.members-history summary::-webkit-details-marker {
    display: none;
}

.members-history summary > span:first-child {
    display: grid;
}

.members-history summary strong {
    color: var(--primary);
}

.members-history summary small {
    color: var(--muted);
}

.members-history-toggle {
    color: #08789e;
    font-size: 0.78rem;
    font-weight: 900;
}

.members-history[open] .members-history-toggle::before {
    content: "Ocultar ";
}

.members-history[open] .members-history-toggle {
    font-size: 0;
}

.members-history[open] .members-history-toggle::before {
    font-size: 0.78rem;
}

.members-history-list {
    display: grid;
    max-height: 270px;
    padding: 0 1rem 0.85rem;
    overflow-y: auto;
}

.members-history-list article {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #dce7ef;
}

.members-history-list time {
    color: #607a91;
    font-size: 0.75rem;
    font-weight: 800;
}

.members-history-list article strong {
    color: #16496f;
}

.members-history-list article p {
    margin: 0.2rem 0 0;
    color: #526b81;
    font-size: 0.8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.members-overview-card > .actions-row {
    margin: 0;
    padding: 0 1.3rem 1rem;
}

@media (max-width: 900px) {
    .members-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    dialog.members-overview-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .members-project-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .members-profile-grid {
        grid-template-columns: 1fr;
        padding: 0.85rem;
    }

    .member-profile-actions button {
        width: 100%;
    }

    .members-history {
        margin-inline: 0.85rem;
    }

    .members-history-list article {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

.judge-register-band .form-grid.inline-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}

.judge-register-card-accent.profile .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.judge-commitment-note {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid #ffd09b;
    border-radius: 14px;
    background: #fff7ed;
    color: #79420f;
    font-weight: 750;
}

.judge-choice-fieldset {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.judge-choice-fieldset legend {
    padding: 0;
    color: #33475f;
    font-weight: 850;
}

.judge-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.7rem;
}

.judge-choice-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.judge-choice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-height: 56px;
    padding: 0.8rem 0.9rem;
    border: 1px solid #c9d9ed;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.judge-choice-card input {
    width: 18px;
    height: 18px;
    accent-color: #1f8fb5;
}

.judge-choice-card span {
    color: #123a63;
    font-weight: 900;
}

.judge-choice-card small {
    grid-column: 2;
    color: #5f7288;
    line-height: 1.3;
}

.judge-choice-card:hover,
.judge-choice-card:has(input:checked) {
    border-color: #1f8fb5;
    background: linear-gradient(135deg, #edfaff 0%, #ffffff 100%);
    box-shadow: 0 14px 28px rgba(31, 143, 181, 0.14);
    transform: translateY(-1px);
}

.judge-choice-card.yes-card:has(input:checked) {
    border-color: #2f8f4e;
    background: #f0fff5;
}

.judge-choice-card.no-card:has(input:checked) {
    border-color: #b83d53;
    background: #fff3f5;
}

.judge-captcha-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    gap: 0.8rem;
    align-items: end;
    border: 1px solid #cfe0f1;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
    padding: 0.9rem;
}

.judge-captcha-prompt {
    display: grid;
    gap: 0.25rem;
}

.judge-captcha-prompt span {
    color: #58708a;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.judge-captcha-prompt strong {
    width: fit-content;
    border-radius: 14px;
    background: #eaf8ef;
    border: 1px solid #bfe2cd;
    color: #17613c;
    padding: 0.45rem 0.85rem;
    font-size: 1.35rem;
    font-weight: 950;
}

.judge-register-band .actions-row {
    display: flex;
    justify-content: flex-end;
}

.judge-success-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.judge-success-logos {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid #cfe0f1;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    padding: 0.75rem 1rem;
    box-shadow: 0 14px 30px rgba(18, 63, 107, 0.08);
}

.judge-success-logos img {
    width: auto;
    height: 74px;
    max-width: 150px;
    object-fit: contain;
}

.judge-success-card {
    gap: 1.15rem;
}

.judge-success-access {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #dce8f5;
    padding-bottom: 0.95rem;
}

.judge-success-access h3 {
    margin: 0.25rem 0 0;
    color: #123f6b;
}

.judge-success-message {
    display: grid;
    gap: 0.55rem;
    border: 1px solid #cfe0f1;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
    padding: 1rem;
}

.judge-success-message p {
    margin: 0;
    color: #4f6680;
    line-height: 1.5;
}

.judge-success-actions {
    justify-content: center;
}

.judge-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 58px;
    min-width: 230px;
    border: 1px solid #da8a0d;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffb83d 0%, #f5a11a 100%);
    color: #123f6b;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 16px 30px rgba(245, 161, 26, 0.24);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.judge-login-button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(245, 161, 26, 0.3);
}

.judge-login-button img {
    width: auto;
    height: 34px;
    max-width: 86px;
    object-fit: contain;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.temporary-password {
    display: inline-flex;
    border: 1px solid #b7d7c4;
    border-radius: 8px;
    background: #effaf3;
    color: #135d37;
    padding: 0.55rem 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-weight: 800;
    letter-spacing: 0.02em;
}

@media (max-width: 980px) {
    .judge-register-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-success-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-success-logos {
        width: fit-content;
    }

    .judge-hero-logo-card {
        justify-self: start;
        width: min(100%, 260px);
    }

    .judge-event-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-register-band .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .users-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .users-action-card,
    .users-public-link,
    .judge-public-status-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .judge-captcha-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-success-logos {
        width: 100%;
        justify-content: center;
    }

    .judge-success-logos img {
        height: 58px;
        max-width: 125px;
    }

    .judge-success-access {
        align-items: flex-start;
        flex-direction: column;
    }

    .judge-login-button {
        width: 100%;
        min-width: 0;
    }

    .judge-register-band .form-grid,
    .judge-register-card-accent.profile .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.project-documents-shell {
    display: grid;
    gap: 1rem;
    max-width: 1080px;
    margin: 0 auto;
}

/* ── Attendance confirmation ─────────────────────────────────────────────── */
.attendance-shell { max-width: 560px; }

.attendance-card {
    background: #fff;
    border: 1px solid #d0dff0;
    border-radius: 18px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 8px 28px rgba(12,50,90,0.08);
}

.attendance-logo-row {
    text-align: center;
}
.attendance-expo-label {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7a9ab8;
}
.attendance-title {
    margin: 0;
    font-size: 1.4rem;
    color: #0d2a4a;
    text-align: center;
}
.attendance-subtitle {
    margin: 0;
    color: #3a5a7a;
    text-align: center;
}
.attendance-already {
    background: #f0f7ff;
    border: 1px solid #c8dff5;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}
.attendance-form { display: flex; flex-direction: column; gap: 1rem; }
.attendance-fieldset {
    border: 1px solid #d0dff0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.attendance-fieldset legend {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1a4a7a;
    letter-spacing: 0.04em;
    padding: 0 0.3rem;
}
.attendance-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #d0dff0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-weight: 600;
    color: #1a4a7a;
}
.attendance-option:has(input:checked) { border-color: #1a4a7a; background: #f0f7ff; }
.attendance-option-yes:has(input:checked) { border-color: #1a7f4b; background: #f0fff6; }
.attendance-option-no:has(input:checked) { border-color: #c0392b; background: #fff5f5; }
.attendance-option input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: #1a4a7a; }
.attendance-option-icon { font-size: 1.1rem; }
.attendance-option-yes .attendance-option-icon { color: #1a7f4b; }
.attendance-option-no .attendance-option-icon { color: #c0392b; }
.attendance-profile-grid {
    display: grid;
    gap: 0.7rem;
}
.attendance-profile-grid label {
    display: grid;
    gap: 0.35rem;
    color: #1a4a7a;
    font-size: 0.82rem;
    font-weight: 800;
}
.attendance-profile-grid input {
    border: 1px solid #cbdced;
    border-radius: 10px;
    padding: 0.68rem 0.75rem;
    color: #123b5f;
    font: inherit;
}
.attendance-parking-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: #1a4a7a;
    cursor: pointer;
}
.attendance-parking-check input { width: 1.1rem; height: 1.1rem; accent-color: #1a4a7a; }
.attendance-actions { display: flex; justify-content: center; }
.attendance-submit-btn { min-width: 200px; }
.attendance-note {
    margin: 0;
    font-size: 0.78rem;
    color: #9ab5cc;
    text-align: center;
}
.attendance-thanks-card { align-items: center; text-align: center; padding: 3rem 2rem; }
.attendance-thanks-icon {
    font-size: 3rem;
    color: #1a7f4b;
    line-height: 1;
}
.attendance-detail-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.project-documents-head {
    display: grid;
    gap: 0.35rem;
    padding-top: 1rem;
}

.project-documents-head h2 {
    margin: 0;
    color: #0f2f52;
    font-size: clamp(2rem, 4vw, 3rem);
}

.project-documents-head p {
    margin: 0;
    color: #536b85;
}

.project-documents-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    gap: 1rem;
}

.project-documents-card {
    display: grid;
    gap: 0.75rem;
    border: 1px solid #d7e3ef;
    border-radius: 8px;
    background: #ffffff;
    padding: 1rem;
}

.project-documents-card h3,
.project-documents-card p,
.project-documents-card ul {
    margin: 0;
}

.project-documents-card ul {
    padding-left: 1.2rem;
}

.project-documents-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.project-documents-member-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem 0.75rem;
    align-items: center;
    border: 1px solid #d7e3ef;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 253, 0.94));
    padding: 0.85rem;
}

.project-documents-member-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8f4fb;
    border: 1px solid #b9d6ec;
    color: var(--primary);
    font-weight: 900;
}

.project-documents-member-card strong,
.project-documents-member-card p,
.project-documents-member-card dl,
.project-documents-member-card dd {
    margin: 0;
}

.project-documents-member-card p {
    color: var(--muted);
    font-size: 0.9rem;
}

.project-documents-member-card dl {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.35rem;
    border-top: 1px solid #dbe7f4;
    padding-top: 0.55rem;
}

.project-documents-member-card dt {
    color: #607798;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.project-documents-member-card dd {
    color: #0f3557;
    font-weight: 800;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.settings-summary-grid article {
    display: grid;
    gap: 0.2rem;
    border: 1px solid #d7e3ef;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.85rem;
    min-width: 0;
}

.settings-summary-grid article.ok {
    border-color: #b7dfc5;
    background: #f0fbf4;
}

.settings-summary-grid article.warn {
    border-color: #f1c2c8;
    background: #fff4f5;
}

.settings-summary-grid span {
    color: #607798;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.settings-summary-grid strong {
    color: var(--primary);
    overflow-wrap: anywhere;
}

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

    .users-action-grid {
        grid-template-columns: 1fr;
    }

    .judge-filter-panel,
    .judge-pool-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .users-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-filter-panel {
        gap: 0.55rem;
    }
}

.institution-page {
    overflow: hidden;
}

.institution-hero {
    border: 1px solid #cfe0f4;
    background:
        radial-gradient(circle at top right, rgba(95, 164, 224, 0.18), transparent 36%),
        linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.institution-form {
    gap: 1.15rem;
}

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

.institution-main,
.institution-side {
    display: grid;
    gap: 1rem;
}

.institution-panel {
    border: 1px solid #d5e3f4;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    box-shadow: 0 14px 30px rgba(22, 62, 102, 0.07);
    padding: 1.1rem;
    display: grid;
    gap: 0.95rem;
}

.institution-panel-primary {
    border-color: #bcd8f5;
}

.institution-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.institution-panel-head.compact {
    align-items: center;
}

.institution-panel-head h4 {
    margin: 0;
    color: #073d70;
    font-size: 1.1rem;
}

.institution-panel-head p {
    margin: 0.18rem 0 0;
    color: #5d7696;
    line-height: 1.35;
}

.institution-step {
    min-width: 44px;
    border-radius: 999px;
    background: #0f4c8a;
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-align: center;
    padding: 0.38rem 0.55rem;
    box-shadow: 0 8px 18px rgba(15, 76, 138, 0.2);
}

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

.institution-fields-grid label {
    display: grid;
    gap: 0.35rem;
    font-weight: 800;
    color: #30455e;
}

.institution-fields-grid input {
    min-height: 46px;
}

.field-span-2 {
    grid-column: 1 / -1;
}

.readonly-input {
    background: #eef5fc;
    color: #35556f;
    cursor: not-allowed;
}

.institution-preview-panel {
    border-color: #bad7ee;
    background:
        radial-gradient(circle at top right, rgba(134, 199, 92, 0.16), transparent 32%),
        linear-gradient(180deg, #fbfdff 0%, #edf7ff 100%);
}

.institution-preview-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.institution-preview-list div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: baseline;
    border-bottom: 1px solid #dbe7f2;
    padding-bottom: 0.45rem;
}

.institution-preview-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.institution-preview-list dt {
    margin: 0;
    color: #607a97;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.institution-preview-list dd {
    margin: 0;
    color: #063861;
    font-weight: 800;
    overflow-wrap: anywhere;
}

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

.institution-logo-preview {
    border: 1px dashed #bfd2e8;
    border-radius: 18px;
    min-height: 170px;
    background:
        linear-gradient(45deg, rgba(15, 76, 138, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(15, 76, 138, 0.04) 25%, transparent 25%),
        #ffffff;
    background-size: 20px 20px;
    padding: 1rem;
    display: grid;
    place-items: center;
}

.institution-logo-preview.compact {
    min-height: 140px;
}

.institution-logo-image {
    max-width: 100%;
    max-height: 120px;
    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: 800;
    color: #214a78;
}

.institution-actions {
    justify-content: flex-end;
    border-top: 1px solid #dfe8f3;
    padding-top: 1rem;
}

.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-lock-notice {
    margin: 0;
}

.evaluation-form.is-locked input,
.evaluation-form.is-locked textarea {
    cursor: not-allowed;
}

.evaluation-form.is-locked .evaluation-actions button[type="submit"] {
    display: none;
}

.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-toggle {
    display: none;
}

.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;
}

.admin-overview-page {
    gap: 1rem;
}

.overview-hero {
    border: 1px solid #cfe0f1;
    border-radius: 16px;
    padding: 1rem;
    background:
        radial-gradient(circle at 92% 18%, rgba(31, 143, 181, 0.16), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #eef8fd 100%);
}

.overview-hero h3 {
    margin-bottom: 0.18rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.overview-hero-status {
    justify-self: end;
    min-width: 150px;
    border: 1px solid #b9ddc0;
    border-radius: 16px;
    background: #effbea;
    padding: 0.8rem 1rem;
    text-align: center;
    color: #1f6a34;
    box-shadow: 0 10px 24px rgba(50, 120, 42, 0.08);
}

.overview-hero-status strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.overview-hero-status span {
    font-weight: 800;
}

.overview-action-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}

.overview-action-strip a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.05rem;
    min-height: 58px;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid #c7d7eb;
    border-radius: 13px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
    color: var(--primary);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(13, 63, 107, 0.06);
    overflow-wrap: normal;
    word-break: normal;
}

.overview-action-strip a:hover {
    transform: translateY(-1px);
    border-color: #8fb5da;
    box-shadow: 0 12px 24px rgba(13, 63, 107, 0.1);
}

.overview-action-strip span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.overview-action-strip strong {
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.overview-metrics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 0.8rem;
}

.overview-metric-panel {
    display: grid;
    gap: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem;
    background: #ffffff;
}

.overview-metric-panel.critical {
    border-left: 5px solid #c24858;
    background: linear-gradient(135deg, #fff 0%, #fff4f6 100%);
}

.overview-metric-panel.logistics {
    border-left: 5px solid var(--primary-2);
    background: linear-gradient(135deg, #fff 0%, #eef9fd 100%);
}

.overview-metric-panel h4 {
    margin: -0.45rem 0 0;
    color: var(--primary);
}

.overview-metric-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.overview-metric-list.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-metric-list article {
    min-height: 78px;
    border: 1px solid #d5e4f3;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.86);
    padding: 0.65rem;
}

.overview-metric-list strong {
    display: block;
    color: var(--primary);
    font-size: 1.7rem;
    line-height: 1;
}

.overview-metric-list span {
    display: block;
    margin-top: 0.28rem;
    color: #4e6883;
    font-weight: 800;
    line-height: 1.15;
}

.overview-work-grid {
    align-items: start;
}

.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;
}

.table-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
}

.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-summary-compact {
    grid-template-columns: minmax(240px, 1fr) minmax(0, 1.85fr);
}

.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;
}

.project-tracking-metrics-compact {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    align-items: stretch;
}

.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: normal;
    line-height: 1.15;
}

.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-option.is-incompatible {
    border-color: #f0c078;
    background: #fff8eb;
    opacity: 0.95;
}

.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;
}

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

.assignments-page-head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.assignments-stats-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.assignments-action-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1.05fr) minmax(280px, 1fr) minmax(240px, 0.8fr);
    gap: 0.72rem;
}

.assignments-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.assignments-tool-card {
    display: grid;
    align-content: start;
    gap: 0.62rem;
    padding: 0.72rem;
    border: 1px solid #cfe0f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    box-shadow: 0 10px 24px rgba(13, 63, 107, 0.055);
}

.assignments-tool-card-accent {
    border-color: #a8d5e8;
    background: linear-gradient(180deg, #f8fdff 0%, #eef8fc 100%);
}

.assignments-tool-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
}

.assignments-tool-head strong {
    display: block;
    color: #073864;
    font-size: 0.9rem;
    line-height: 1.15;
}

.assignments-tool-head small {
    display: block;
    margin-top: 0.08rem;
    color: #607998;
    font-size: 0.74rem;
    line-height: 1.2;
}

.assignments-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e6f5fc;
    color: #0c74a0;
}

.assignments-tool-icon svg,
.assignment-tool-btn svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.assignments-action-strip .outline-btn {
    min-width: 0;
    white-space: nowrap;
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
}

.assignment-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    min-height: 36px;
}

.assignment-tool-form {
    display: contents;
}

.assignment-manage-btn {
    width: auto;
    white-space: nowrap;
    overflow-wrap: normal;
}

.assignment-card-list {
    display: grid;
    gap: 0.72rem;
}

.assignment-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: end;
    gap: 0.65rem;
    max-width: 100%;
    padding: 0.78rem;
    border: 1px solid #cfe0f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.assignment-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 39px;
    min-width: 0;
    padding: 0.42rem 0.75rem;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.assignment-filter-clear span {
    white-space: nowrap;
}

.assignment-filter-panel .projects-filter-field,
.assignment-filter-panel .projects-filter-count {
    min-width: 0;
}

.assignment-filter-clear svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.assignment-filter-empty {
    margin: 0;
    padding: 1rem;
    border: 1px dashed #bfd4eb;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.assignment-project-card {
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(360px, 1.25fr) minmax(230px, 0.75fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.82rem 0.9rem;
    border: 1px solid #d7e6f5;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 12px 28px rgba(18, 63, 107, 0.06);
}

.assignment-project-card[hidden],
.assignment-filter-empty[hidden] {
    display: none;
}

.assignment-project-card:hover {
    border-color: #b9d3ee;
    background: linear-gradient(135deg, #ffffff 0%, #eef7ff 100%);
}

.assignment-project-main {
    display: grid;
    gap: 0.28rem;
    align-content: center;
    min-width: 0;
}

.assignment-project-main h4,
.assignment-project-main p {
    margin: 0;
}

.assignment-project-main h4 {
    color: var(--primary);
    font-size: clamp(1rem, 1.45vw, 1.16rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.assignment-project-main p {
    color: #5c7696;
    font-weight: 700;
}

.assignment-project-main .category-badge {
    justify-self: start;
    max-width: 100%;
}

.assignment-project-judges,
.assignment-project-status {
    display: grid;
    gap: 0.42rem;
    align-content: center;
    min-width: 0;
}

.assignment-project-status {
    align-content: center;
    justify-items: start;
    grid-template-columns: repeat(2, max-content);
    gap: 0.34rem;
    padding: 0.25rem 0.55rem;
    border-left: 1px solid #dbe8f5;
}

.assignment-project-status .assignment-field-label {
    grid-column: 1 / -1;
}

.assignment-field-label {
    color: #607798;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.assignment-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.assignment-column-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    min-height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #e6f3ff;
    color: #0d4778;
    font-size: 0.76rem;
    font-weight: 900;
}

.assignment-draft-head {
    margin-top: 0.25rem;
}

.assignment-summary-list-left {
    justify-content: flex-start;
}

.assignment-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    min-height: 38px;
    border-color: var(--primary-2);
    border-radius: 10px;
    background: linear-gradient(180deg, var(--primary-2) 0%, var(--primary) 100%);
    color: #ffffff;
    justify-self: end;
    padding: 0.42rem 0.8rem;
    font-size: 0.86rem;
    white-space: nowrap;
}

.assignment-manage-btn svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

@media (max-width: 1180px) {
    .assignments-action-strip {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }

    .assignment-filter-panel {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .assignment-project-card {
        grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
    }

    .assignment-manage-btn {
        justify-self: start;
    }

    .assignment-project-status {
        justify-self: stretch;
    }
}

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

.assignment-summary-list {
    display: grid;
    gap: 0.22rem;
    justify-content: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.assignment-summary-pill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.45rem;
    border: 1px solid #dce9f7;
    border-radius: 10px;
    background: #f3f8fe;
    color: #1f4f82;
    font-size: 0.82rem;
    font-weight: 700;
}

.assignment-judge-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-judge-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: max-content;
}

.assignment-summary-pill small {
    color: #607798;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.pill-english-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1a7f4b;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    line-height: 1.4;
}

.assignment-pill-draft {
    background: #fff8e8;
    color: #7a4f00;
    border: 1px dashed #e0b040;
}

.assignment-pill-draft small {
    color: #9a6b10;
}

.auto-assign-draft-section {
    border: 2px solid #e0b040;
    background: #fffbf0;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.auto-assign-draft-section .page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.load-report-table tr.load-high td {
    background: #fff5f5;
}

.load-report-table tr.load-none td {
    opacity: 0.55;
}

.auto-assign-rules {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d4e2f0;
    border-radius: 10px;
    background: #f6faff;
    font-size: 0.88rem;
}

.auto-assign-rules ul {
    margin: 0.3rem 0 0 1.1rem;
    padding: 0;
}

.auto-assign-rules li {
    margin-bottom: 0.2rem;
    color: #3a5a7c;
}

.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.55rem;
    padding: 0.78rem;
    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(360px, 1fr) 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(210px, 1fr) minmax(260px, 0.9fr) 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(280px, 1fr) minmax(330px, auto) auto;
    gap: 0.55rem;
    align-items: center;
}

.assignment-inline-add .assignment-scope-group {
    justify-self: center;
}

.assignment-scope-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    align-items: center;
}

.assignment-scope-group-wide {
    padding: 0.65rem;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: #f8fbff;
}

.assignment-scope-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 34px;
    margin: 0;
    padding: 0.38rem 0.62rem;
    border: 1px solid #bdd3e8;
    border-radius: 999px;
    background: #ffffff;
    color: #173e6a;
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1.1;
}

.assignment-scope-group input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #238f7e;
}

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

.assignment-inline-add button {
    justify-self: end;
    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: repeat(3, minmax(0, 1fr));
    align-items: center;
}

.assignment-inline-create-compact .assignment-scope-group {
    grid-column: 1 / 3;
    justify-self: center;
}

.assignment-inline-create-compact .secondary-btn {
    justify-self: end;
    align-self: center;
}

.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: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #bdd3e8;
    border-radius: 14px;
    background: #ffffff;
    color: #193b5e;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.requirement-item:hover,
.requirement-item:has(input:checked) {
    border-color: #1f8fb5;
    box-shadow: 0 10px 20px rgba(31, 143, 181, 0.12);
    transform: translateY(-1px);
}

.requirement-item input[type="checkbox"],
.radio-card-group input[type="radio"] {
    appearance: auto;
    width: 14px;
    height: 14px;
    min-width: 14px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    accent-color: #0f6f95;
}

.register-fieldset {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.register-fieldset > span {
    color: var(--text);
    font-weight: 800;
}

.radio-card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-start;
}

.radio-card-group-wide {
    display: flex;
}

.radio-card-group label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    width: auto;
    min-width: 86px;
    min-height: 32px;
    padding: 0.34rem 0.52rem;
    border: 1px solid #bdd3e8;
    border-radius: 999px;
    background: #ffffff;
    color: #193b5e;
    font-size: 0.84rem;
    font-weight: 850;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.radio-card-group label span {
    display: inline-block;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.radio-card-group input[type="radio"] {
    flex: 0 0 auto;
}

.radio-card-group input[type="radio"]:focus {
    box-shadow: none;
}

.radio-card-group label:hover,
.radio-card-group label:has(input:checked) {
    border-color: #1f8fb5;
    background: linear-gradient(135deg, #edfaff 0%, #ffffff 100%);
    box-shadow: 0 10px 20px rgba(31, 143, 181, 0.12);
    transform: translateY(-1px);
}

.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;
}

.project-registration-page {
    background:
        radial-gradient(circle at top left, rgba(31, 143, 181, 0.14), transparent 34rem),
        linear-gradient(180deg, #f6fbff 0%, #eef6fb 100%);
}

.project-register-shell {
    display: grid;
    gap: 1rem;
    max-width: 1360px;
    margin: 0 auto;
}

.project-register-hero {
    margin-top: 0.8rem;
}

.project-hero-logo-card {
    width: clamp(190px, 24vw, 320px);
}

.project-hero-logo-card img {
    max-height: 112px;
}

.project-register-form {
    display: grid;
    gap: 1rem;
}

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

.project-register-card-accent.project {
    --judge-accent: #1f8fb5;
}

.project-register-card-accent.student {
    --judge-accent: #75a928;
}

.project-register-card-accent.advisor {
    --judge-accent: #0f6f95;
}

.tutor-mode-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.tutor-mode-picker label { cursor: pointer; }

.tutor-mode-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tutor-mode-picker span {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid #bdd8df;
    border-radius: 0.9rem;
    background: #fff;
    color: var(--navy);
    font-weight: 800;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tutor-mode-picker input:checked + span {
    border-color: #168d91;
    background: #e6f7f5;
    box-shadow: 0 0 0 3px rgba(22, 141, 145, 0.12);
}

.tutor-existing-panel {
    padding: 1rem;
    border: 1px solid #c7e0e3;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.tutor-existing-panel label,
.tutor-existing-panel select { width: 100%; }

.tutor-privacy-note {
    margin: 0.65rem 0 0;
    color: #557087;
    font-size: 0.88rem;
}

.tutor-new-panel[hidden],
.tutor-existing-panel[hidden] { display: none !important; }

.mentor-question {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #efc4cc;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.66);
}

.mentor-fields[hidden] { display: none !important; }

.declaration-acceptance {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem;
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch;
    box-sizing: border-box;
    margin-top: 0.55rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e8b5bf;
    border-radius: 1rem;
    background: linear-gradient(135deg, #fff 0%, #fff8f9 100%);
    color: var(--navy);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(184, 61, 83, 0.07);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stage-6 .inline-grid-1,
.stage-6 .inline-grid-1 > .register-fieldset {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
}

.project-register-form .declaration-acceptance input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.25rem;
    box-shadow: none;
    accent-color: #b83d53;
}

.declaration-acceptance > span {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.declaration-acceptance strong {
    color: #173d62;
    font-size: 1rem;
    line-height: 1.2;
}

.declaration-acceptance small {
    color: #65798e;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
}

.declaration-acceptance:hover,
.declaration-acceptance:has(input:checked) {
    border-color: #c8415b;
    box-shadow: 0 10px 24px rgba(184, 61, 83, 0.13);
    transform: translateY(-1px);
}

.project-register-card-accent.confirm {
    --judge-accent: #b83d53;
}

.project-section-kicker {
    width: fit-content;
    margin: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--judge-accent, #1f8fb5) 13%, #ffffff);
    color: var(--judge-accent, #1f8fb5);
    padding: 0.22rem 0.58rem;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.project-register-form .stage-block h3 {
    margin: 0;
    color: #123a63;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.project-register-form label,
.project-register-form .register-fieldset > span {
    color: #33475f;
    font-weight: 800;
}

.project-register-form input,
.project-register-form select,
.project-register-form textarea {
    margin-top: 0.25rem;
}

.project-register-form .register-fieldset {
    align-content: start;
}

.project-register-form .requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.45rem;
}

.project-register-form .requirement-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    border: 1px solid #c9d9ed;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 0.45rem 0.65rem;
    color: #123a63;
    font-weight: 850;
}

.project-requirements-detail-row {
    grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1fr) minmax(320px, 1.25fr);
    align-items: end;
}

.project-requirements-detail-row input[type="file"] {
    min-height: 42px;
    padding: 0.42rem;
}

.requirement-items-editor {
    background: #f6faff;
    border: 1px solid #c9ddef;
    border-radius: 14px;
    margin-top: .9rem;
    padding: 1rem;
}

.requirement-items-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .8rem;
}

.requirement-items-heading strong,
.requirement-items-heading small {
    display: block;
}

.requirement-items-heading small {
    color: #60758a;
    margin-top: .2rem;
}

.requirement-item-row {
    align-items: end;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(180px, 1.5fr) minmax(85px, .55fr) minmax(110px, .7fr) minmax(180px, 1.4fr) auto;
    margin-top: .65rem;
}

.requirement-item-row .ghost-btn {
    min-height: 42px;
}

.project-submit-row {
    display: flex;
    justify-content: flex-end;
    padding: 0.4rem 0 1rem;
}

.project-submit-row button {
    min-width: min(100%, 260px);
    font-weight: 950;
}

.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;
}

.register-form .inline-grid-3 {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(260px, 1.15fr);
}

.register-form .inline-grid-4 {
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1.15fr) minmax(220px, 1.15fr) minmax(180px, 0.9fr);
}

.final-stages-grid .radio-card-group label {
    min-width: 96px;
}

.final-stages-grid .inline-grid-2 {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.final-stages-grid .register-fieldset {
    align-self: end;
}

.register-form.project-register-form {
    gap: 1rem;
}

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

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

.register-form.project-register-form .form-grid {
    gap: 0.75rem 0.9rem;
}

.register-form.project-register-form .inline-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.register-form.project-register-form .inline-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.register-form.project-register-form .final-stages-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1180px) {
    .register-form.project-register-form .inline-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .project-register-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-hero-logo-card {
        justify-self: start;
        width: min(100%, 280px);
    }

    .register-form.project-register-form .inline-grid-2,
    .register-form.project-register-form .inline-grid-3,
    .register-form.project-register-form .inline-grid-4,
    .register-form.project-register-form .project-requirements-detail-row,
    .register-form.project-register-form .final-stages-grid,
    .register-form.project-register-form .focus-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-submit-row {
        justify-content: stretch;
    }

    .project-submit-row button {
        width: 100%;
    }
}

.upload-error-page {
    max-width: 860px;
    margin: 2rem auto;
}

.upload-error-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    align-items: center;
    padding: 1.2rem;
    border: 1px solid #ffd2d2;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7f2 0%, #f2fbff 100%);
}

.upload-error-code {
    display: inline-grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 26px;
    background: #b4232f;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 900;
}

.upload-error-hero h2 {
    margin: 0.1rem 0 0.45rem;
}

.upload-error-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.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.85rem;
}

.home-objectives-grid article {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    border: 1px solid #d7e2f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    padding: 0.85rem;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(18, 63, 107, 0.06);
}

.home-objectives-grid article::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--objective-accent, #1f8fb5);
}

.objective-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--objective-accent-soft, #e8f5fb);
    color: var(--objective-accent, #123f6b);
    border: 1px solid color-mix(in srgb, var(--objective-accent, #123f6b) 28%, #ffffff);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.objective-card-1 {
    --objective-accent: #1f8fb5;
    --objective-accent-soft: #e8f5fb;
}

.objective-card-2 {
    --objective-accent: #357f21;
    --objective-accent-soft: #edf8e8;
}

.objective-card-3 {
    --objective-accent: #f47a20;
    --objective-accent-soft: #fff1e6;
}

.objective-card-4 {
    --objective-accent: #7a5db8;
    --objective-accent-soft: #f1edfb;
}

.objective-card-5 {
    --objective-accent: #b23b55;
    --objective-accent-soft: #fff0f3;
    grid-column: 1 / -1;
}

.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 #0f3557;
    background: #123f6b;
    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: minmax(280px, 340px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.projects-showcase-page .container {
    padding-top: 1rem;
}

.projects-showcase-page .showcase-layout {
    gap: 0.75rem;
}

.projects-showcase-page .project-sidebar {
    top: calc(var(--fixed-header-height, 96px) + 0.25rem);
    height: calc(100vh - var(--fixed-header-height, 96px) - 0.5rem);
    max-height: calc(100vh - var(--fixed-header-height, 96px) - 0.5rem);
}

.project-sidebar {
    background:
        linear-gradient(180deg, rgba(18, 63, 107, 0.04), rgba(255, 255, 255, 0.96)),
        #ffffff;
    border: 1px solid #ced9e8;
    border-radius: 18px;
    padding: 0;
    height: calc(100vh - var(--fixed-header-height, 96px) - 1.5rem);
    max-height: calc(100vh - var(--fixed-header-height, 96px) - 1.5rem);
    overflow: hidden;
    position: sticky;
    top: calc(var(--fixed-header-height, 96px) + 0.75rem);
    box-shadow: 0 16px 34px rgba(12, 50, 90, 0.08);
    display: flex;
    flex-direction: column;
}

.project-sidebar-head {
    border-bottom: 1px solid #dbe7f4;
    padding: 0.65rem 1rem 0.7rem;
    background: #ffffff;
}

.project-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
}

.project-sidebar-logo {
    width: 260px;
    height: auto;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #123f6b;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
}

.project-sidebar-logo.expo {
    width: 260px;
}

.project-sidebar-logo.expo img {
    width: 100%;
    height: auto;
    max-height: none;
}

.project-sidebar-logo img {
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    display: block;
}

.project-sidebar-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: start;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.85rem;
    scrollbar-color: #8fb1d4 #eef5fc;
    scrollbar-width: thin;
}

.project-sidebar-head h2 {
    margin: 0;
    text-align: center;
    line-height: 1.1;
}

.project-sidebar-head p {
    margin: 0.2rem 0 0;
    text-align: center;
}

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

.project-category-menu {
    margin: 0;
    background: #f8fbff;
    border: 1px solid #d7e2ef;
    border-radius: 14px;
    padding: 0.65rem;
}

.project-category-menu summary {
    list-style: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    margin: 0 0 0.35rem;
    color: #1f4f82;
    font-weight: 800;
    cursor: pointer;
}

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

.project-category-menu summary small {
    color: #617996;
    font-size: 0.76rem;
    font-weight: 700;
}

.project-category-list {
    display: grid;
    gap: 0.35rem;
}

.project-link {
    width: 100%;
    text-align: left;
    border: 1px solid #d5deeb;
    background: #eaf2fd;
    color: #1f3f66;
    margin-bottom: 0.35rem;
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    line-height: 1.2;
}

.project-link.active {
    border-color: #0f3557;
    background: #123f6b;
    color: #ffffff;
}

.institutional-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    background: linear-gradient(180deg, #123f6b 0%, #0f3557 100%);
    color: #ffffff;
    border: 1px solid #0f3557;
}

.institutional-banner-compact {
    padding: 1.2rem 1.35rem;
    min-height: auto;
}

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

.institutional-banner-compact h1 {
    margin-top: 0.25rem;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    text-transform: none;
}

.institutional-banner-compact p {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
}

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

.institutional-banner-compact .banner-kicker {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
}

.banner-badge {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(145deg, #123f6b 0%, #0f3557 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: minmax(170px, 240px) minmax(260px, 340px) minmax(430px, 1fr);
    gap: 0.95rem;
    align-items: stretch;
}

.project-detail.has-many-members .project-main {
    grid-template-columns: minmax(140px, 190px) minmax(240px, 0.8fr) minmax(470px, 1.2fr);
    align-items: center;
}

.project-detail.has-three-members .project-main {
    grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.18fr);
    grid-template-areas:
        "visual members"
        "content members";
    align-items: start;
    gap: 0.9rem;
}

.project-detail.has-three-members .project-visual {
    grid-area: visual;
    min-height: auto;
    padding: 0.75rem;
}

.project-detail.has-three-members .project-content {
    grid-area: content;
    align-self: start;
    padding: 0.15rem 0.2rem 0;
}

.project-detail.has-three-members .project-members-panel {
    grid-area: members;
}

.project-detail.has-three-members .integrants-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-visual {
    display: grid;
    place-items: center;
    min-height: 100%;
    border: 1px solid #d5e2f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fe 100%);
    padding: 0.85rem;
}

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

.project-detail.has-many-members .project-main-image,
.project-detail.has-many-members .project-main-placeholder {
    max-width: 170px;
}

.project-detail.has-three-members .project-main-image,
.project-detail.has-three-members .project-main-placeholder {
    max-width: 150px;
}

.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-content {
    align-self: center;
}

.project-content h2 {
    margin-top: 0;
}

.project-main-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 0;
}

.project-detail.has-three-members .project-main-meta {
    gap: 0.55rem;
}

.project-main-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #d4e5f5;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
    flex: 1 1 120px;
}

.project-main-meta dt {
    color: #607998;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-main-meta dd {
    margin: 0;
    color: #123f6b;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
}

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

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

/* GitOps admin module */
.gitops-page .gitops-card {
    border-left: 4px solid #2f6fa9;
}

.gitops-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.gitops-btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-weight: 700;
    color: #fff;
}

.gitops-btn-primary { background: linear-gradient(180deg, #1f7ac9 0%, #1664a8 100%); }
.gitops-btn-info { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); }
.gitops-btn-neutral { background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%); }
.gitops-btn-warn { background: linear-gradient(180deg, #e7a42f 0%, #c9820f 100%); color: #142033; }
.gitops-btn-success { background: linear-gradient(180deg, #2d9a68 0%, #1f7d53 100%); }
.gitops-btn-deploy { background: linear-gradient(180deg, #0f8b8d 0%, #076b6d 100%); }
.gitops-btn-danger { background: linear-gradient(180deg, #dc3545 0%, #a91f2f 100%); }

.gitops-service-stat.ok {
    border-color: #b7dfc5;
    background: #f0fbf4;
}

.gitops-service-stat.warn {
    border-color: #f1c2c8;
    background: #fff4f5;
}

.gitops-service-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.gitops-file-list {
    display: grid;
    gap: 0.45rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.gitops-file-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    border: 1px solid #d8e4f2;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.45rem 0.55rem;
    min-width: 0;
}

.gitops-file-row code {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #244765;
    font-size: 0.86rem;
}

.gitops-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.gitops-badge-modificado { background: #fff2cc; color: #8a5a00; }
.gitops-badge-nuevo { background: #dff6e9; color: #145d35; }
.gitops-badge-eliminado { background: #ffe1e5; color: #8c1d2d; }
.gitops-badge-renombrado { background: #e1e9ff; color: #2047a6; }
.gitops-badge-cambio { background: #e9edf2; color: #3e4b5b; }

.gitops-changes-card {
    padding: 1rem;
}

.gitops-changes-card summary {
    background: #eef7fd;
}

.gitops-changes-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 1rem;
    margin-top: 0.9rem;
}

.gitops-changes-panel {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-width: 0;
    border: 1px solid #d8e4f2;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.85rem;
}

.gitops-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.gitops-list-head h4 {
    margin: 0;
}

.gitops-list-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eaf3fb;
    color: #123f6b;
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.gitops-console {
    gap: 1rem;
}

.gitops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
    gap: 1rem;
    align-items: stretch;
    border: 1px solid #cfe0f1;
    border-radius: 18px;
    padding: 1rem;
    background:
        radial-gradient(circle at 85% 8%, rgba(31, 143, 181, 0.2), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #eef8fd 100%);
}

.gitops-hero h3 {
    margin-bottom: 0.2rem;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.gitops-health-card {
    display: grid;
    align-content: center;
    gap: 0.18rem;
    border: 1px solid #d6e3ef;
    border-radius: 16px;
    background: #ffffff;
    padding: 0.9rem;
}

.gitops-health-card.ok {
    border-color: #b7dfc5;
    background: #f0fbf4;
}

.gitops-health-card.warn {
    border-color: #f1c2c8;
    background: #fff4f5;
}

.gitops-health-card span,
.gitops-status-strip span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.gitops-health-card strong {
    color: var(--primary);
    font-size: 1.15rem;
}

.gitops-health-card small,
.gitops-status-strip small {
    color: #58708a;
}

.gitops-status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.gitops-status-strip article {
    display: grid;
    gap: 0.12rem;
    border: 1px solid #d5e4f3;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.75rem 0.85rem;
}

.gitops-status-strip article.ok {
    border-color: #b7dfc5;
    background: #f0fbf4;
}

.gitops-status-strip article.warn {
    border-color: #f1c2c8;
    background: #fff4f5;
}

.gitops-status-strip strong {
    color: var(--primary);
    font-size: 1.12rem;
    overflow-wrap: anywhere;
}

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

.gitops-primary-actions form {
    min-width: 0;
}

.gitops-action-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.18rem 0.65rem;
    align-items: center;
    width: 100%;
    min-height: 96px;
    padding: 0.85rem;
    border-radius: 16px;
    text-align: left;
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(13, 63, 107, 0.12);
}

.gitops-action-card span {
    grid-row: 1 / 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 900;
}

.gitops-action-card strong {
    font-size: 1.1rem;
}

.gitops-action-card small {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.25;
}

.gitops-action-card.fetch {
    background: linear-gradient(135deg, #e79b27 0%, #b76b08 100%);
}

.gitops-action-card.deploy {
    background: linear-gradient(135deg, #168f6d 0%, #076b6d 100%);
}

.gitops-action-card.check {
    background: linear-gradient(135deg, #1f7ac9 0%, #144f88 100%);
}

.gitops-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 0.8rem;
}

.gitops-panel,
.gitops-details-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.9rem;
}

.gitops-panel-highlight {
    border-left: 5px solid #c24858;
}

.gitops-panel-head h4,
.gitops-details-card h4 {
    margin: 0 0 0.25rem;
    color: var(--primary);
}

.gitops-panel-head p {
    margin: 0;
    color: var(--muted);
}

.gitops-revert-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr);
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.gitops-revert-form .compact-toggle,
.gitops-revert-form button {
    align-self: end;
}

.compact-toggle {
    align-items: center;
    min-height: 40px;
}

.gitops-compact-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.gitops-compact-actions .gitops-btn,
.gitops-revert-form .gitops-btn,
.gitops-config-form .gitops-btn {
    width: 100%;
    justify-content: center;
}

.gitops-config-form {
    align-items: end;
    margin-top: 0.85rem;
}

.gitops-config-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.gitops-config-actions .compact-toggle {
    min-width: 180px;
}

.gitops-config-actions .gitops-btn,
.gitops-test-form .gitops-btn {
    width: auto;
    min-width: 220px;
    justify-content: center;
}

.gitops-test-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.gitops-details-card {
    display: block;
}

.gitops-details-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--primary);
    font-weight: 900;
    list-style: none;
    border-radius: 12px;
    background: #eef7fd;
    padding: 0.7rem 0.85rem;
}

.gitops-details-card summary:focus {
    outline: 2px solid rgba(31, 143, 181, 0.35);
    outline-offset: 2px;
}

.gitops-details-card summary:focus:not(:focus-visible) {
    outline: none;
}

.gitops-details-card summary::-webkit-details-marker {
    display: none;
}

.gitops-details-card summary::after {
    content: "+";
    color: var(--primary-2);
    font-weight: 900;
}

.gitops-details-card[open] summary::after {
    content: "-";
}

.gitops-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 0.85rem;
}

.gitops-revision-list,
.gitops-log-list {
    display: grid;
    gap: 0.45rem;
}

.gitops-revision-list div,
.gitops-log-list article {
    border: 1px solid #d8e4f2;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.55rem 0.65rem;
}

.gitops-changes-panel .gitops-revision-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.gitops-changes-panel .gitops-revision-list div {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.52rem 0.6rem;
}

.gitops-revision-list code {
    margin-right: 0.4rem;
}

.gitops-changes-panel .gitops-revision-list code {
    margin: 0;
    color: #123f6b;
    font-weight: 900;
}

.gitops-revision-list span,
.gitops-log-list p {
    color: #344b62;
}

.gitops-changes-panel .gitops-revision-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gitops-revision-list small,
.gitops-log-list span,
.gitops-log-list small {
    display: block;
    color: var(--muted);
}

.gitops-changes-panel .gitops-revision-list small {
    white-space: nowrap;
}

.audit-page {
    gap: 1rem;
}

.audit-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.24fr);
    gap: 1rem;
    align-items: stretch;
    border: 1px solid #cfe0f1;
    border-radius: 18px;
    padding: 1rem;
    background:
        radial-gradient(circle at 88% 12%, rgba(31, 143, 181, 0.18), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #eef8fd 100%);
}

.audit-hero h3 {
    margin-bottom: 0.18rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.audit-hero-count {
    display: grid;
    align-content: center;
    gap: 0.1rem;
    border: 1px solid #b9ddc0;
    border-radius: 16px;
    background: #effbea;
    padding: 0.85rem;
    color: #1f6a34;
    text-align: center;
}

.audit-hero-count strong {
    font-size: 2rem;
    line-height: 1;
}

.audit-hero-count span {
    font-weight: 900;
}

.audit-hero-count small {
    color: #55705f;
}

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

.audit-summary-grid article {
    display: grid;
    gap: 0.12rem;
    border: 1px solid #d5e4f3;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.72rem 0.85rem;
}

.audit-summary-grid article.ok {
    border-color: #b7dfc5;
    background: #f0fbf4;
}

.audit-summary-grid article.warn {
    border-color: #f3d08a;
    background: #fff9ea;
}

.audit-summary-grid span,
.audit-event-meta span::before {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.audit-summary-grid strong {
    color: var(--primary);
    font-size: 1.35rem;
}

.audit-filter-panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 0.9rem;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr) auto;
    gap: 0.65rem;
    align-items: end;
}

.audit-filter-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.audit-filter-actions button,
.audit-filter-actions .outline-btn {
    min-height: 40px;
    white-space: nowrap;
}

.audit-filter-actions .outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.52rem 0.9rem;
    border: 1px solid rgba(31, 143, 181, 0.35);
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    overflow-wrap: normal;
    word-break: normal;
}

.audit-filter-actions button {
    overflow-wrap: normal;
    word-break: normal;
}

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

.audit-event-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) minmax(0, 1.4fr);
    gap: 0.8rem;
    border: 1px solid #d8e4f2;
    border-radius: 16px;
    background: #ffffff;
    padding: 0.82rem;
    box-shadow: 0 8px 22px rgba(13, 63, 107, 0.06);
}

.audit-event-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    min-width: 0;
}

.audit-event-dot {
    width: 0.72rem;
    height: 0.72rem;
    margin-top: 0.34rem;
    border-radius: 50%;
    background: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(31, 143, 181, 0.12);
}

.audit-event-main strong {
    color: var(--primary);
    overflow-wrap: anywhere;
}

.audit-event-main p {
    margin: 0.18rem 0 0;
    color: #445d76;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.audit-event-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.audit-event-meta span {
    display: grid;
    gap: 0.12rem;
    align-content: start;
    min-width: 0;
    border: 1px solid #e0ebf6;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.45rem 0.55rem;
    color: #1c3147;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.audit-event-meta span::before {
    content: attr(data-label);
}

.audit-event-meta small {
    color: var(--muted);
    font-weight: 600;
}

.audit-empty-state {
    border: 1px dashed #c8d9eb;
    border-radius: 16px;
    background: #f8fbff;
    padding: 1rem;
    text-align: center;
}

.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 #0f3557;
    background: #123f6b;
    color: #fff;
    padding: 0.85rem;
}

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

.project-members-panel {
    border: 1px solid #d5e2f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    padding: 0.85rem;
}

.project-members-panel h3 {
    margin: 0 0 0.7rem;
    color: #123f6b;
    font-size: 1rem;
}

.project-members-empty {
    margin: 0;
    color: #607998;
}

.integrants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
    justify-content: stretch;
    align-items: stretch;
}

.integrant-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    justify-items: center;
    gap: 0.45rem;
    text-align: center;
    padding: 0.65rem;
    border: 1px solid #d5e2f0;
    border-radius: 14px;
    background: #ffffff;
    min-height: 185px;
}

.integrant-card > div {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-content: start;
    justify-items: center;
    width: 100%;
}

.integrant-card h4 {
    color: #123f6b;
    margin: 0 0 0.25rem;
    font-size: 0.92rem;
    line-height: 1.15;
    overflow-wrap: normal;
    word-break: normal;
    min-height: 2.1em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.integrant-card p {
    color: #607998;
    margin: 0.16rem 0;
    font-size: 0.82rem;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
}

.integrant-card p:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.integrant-photo {
    width: 86px;
    height: 86px;
    object-fit: cover;
    object-position: center;
    background: transparent;
    border: 2px solid #dbe9ff;
    outline: 1px solid #9fb7e0;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(7, 36, 74, 0.14);
}

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

/* ── Project detail — redesigned layout ─────────────────────────────────── */
.project-detail.card {
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}
.project-detail.card.active {
    display: flex;
}

/* Hero */
.pd-hero {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    padding: 2rem 2rem 1.5rem;
}

.pd-logo-wrap {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: #f4f8ff;
    border: 1px solid #d8e6f4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pd-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}
.pd-logo-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #1a6fba 0%, #0d3f7a 100%);
}

.pd-hero-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.25rem;
}

.pd-category-badge {
    display: inline-block;
    background: #e4f0ff;
    color: #1a5a9a;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.75rem;
    border-radius: 100px;
    width: fit-content;
}

.pd-title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
    color: #0d2a4a;
    line-height: 1.25;
}

.pd-description {
    margin: 0;
    color: #3a5a7a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.pd-doc-btn { margin-top: 0.4rem; width: fit-content; }

/* Metadata strip */
.pd-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
    margin: 0;
    padding: 0 2rem;
    border-top: 1px solid #e8eef4;
    border-bottom: 1px solid #e8eef4;
    background: #f8fafd;
}
.pd-meta div {
    padding: 1rem 1rem 1rem 0;
    border-right: 1px solid #e8eef4;
}
.pd-meta div:last-child { border-right: none; }
.pd-meta dt {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8aabcc;
    margin-bottom: 0.3rem;
}
.pd-meta dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0d2a4a;
    line-height: 1.3;
}

/* Members */
.pd-members {
    padding: 1.75rem 2rem 2rem;
}
.pd-members-title {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8aabcc;
    margin: 0 0 1.25rem;
}
.pd-members-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 260px));
    justify-content: center;
    align-items: start;
}

.pd-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.9rem;
}
.pd-member-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
    background: #dce8f4;
    display: block;
}
.pd-member-info { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; }
.pd-member-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0d2a4a;
    line-height: 1.25;
}
.pd-member-specialty {
    margin: 0;
    font-size: 0.82rem;
    color: #3a5a7a;
    font-weight: 600;
}
.pd-member-section {
    margin: 0;
    font-size: 0.78rem;
    color: #7a9ab8;
}

@media (max-width: 680px) {
    .pd-hero {
        grid-template-columns: 1fr;
    }
    .pd-logo-wrap {
        width: 120px;
        height: 120px;
    }
    .pd-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@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: 440px;
    }

    .project-sidebar-list {
        max-height: 310px;
    }

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

    .project-detail.has-many-members .project-main {
        grid-template-columns: 1fr;
    }

    .project-detail.has-three-members .project-main {
        grid-template-areas:
            "visual"
            "content"
            "members";
    }

    .project-detail.has-three-members .integrants-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .project-detail.has-many-members .project-visual {
        place-items: center;
    }

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

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

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

    .projects-filter-clear {
        grid-column: auto;
        justify-self: stretch;
    }

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

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

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

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

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

    .project-tracking-metrics-compact {
        grid-template-columns: repeat(2, 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: 1fr;
        gap: 0.45rem;
        margin-top: 0.15rem;
    }

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

    .site-nav-public {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .nav-profile {
        width: 100%;
    }

    .nav-profile summary {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 0.42rem 0.55rem;
    }

    .nav-profile summary::after {
        margin-left: auto;
    }

    .nav-profile-card {
        position: static;
        width: 100%;
        margin-top: 0.4rem;
        border-radius: 12px;
        box-shadow: none;
    }

    .nav-profile-copy strong,
    .nav-profile-copy small {
        max-width: none;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown > summary {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        min-height: 36px;
        padding: 0.45rem 0.5rem;
        border: 1px solid rgba(244, 122, 32, 0.22);
        background: rgba(255, 255, 255, 0.06);
        font-size: 0.94rem;
    }

    .nav-dropdown > summary::after {
        margin-left: auto;
    }

    .nav-dropdown-card {
        position: static;
        width: 100%;
        margin-top: 0.4rem;
        border-radius: 10px;
        box-shadow: none;
    }

    .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;
        display: flex;
        align-items: center;
        justify-content: center;
    }

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

    .header nav .inline-form .btn-link {
        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;
    }

    .judge-dashboard-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.85rem;
        border-radius: 14px;
    }

    .judge-dashboard-profile {
        justify-items: start;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        min-width: 0;
    }

    .judge-dashboard-profile small {
        grid-column: 2;
        text-align: left;
    }

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

    .judge-project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-project-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .judge-project-status {
        justify-items: start;
        width: 100%;
    }
}

@media (max-width: 700px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .header {
        position: sticky;
        top: 0;
        padding: 0.55rem 0.7rem;
        margin-top: 0;
        z-index: 200;
    }

    .header-inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .brand-block {
        min-width: 0;
        gap: 0.55rem;
    }

    .brand-block h1 {
        font-size: 1rem;
        line-height: 1.18;
    }

    .brand-logo {
        height: 48px;
        max-width: 56px;
        border-radius: 10px;
    }

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

    .nav-toggle {
        width: fit-content;
    }

    .container {
        display: block;
        width: 100%;
        padding: 0.55rem;
    }

    .card {
        max-width: 100%;
        border-radius: 10px;
        padding: 0.85rem;
    }

    .home-intro-block {
        display: block;
    }

    .home-intro-hero {
        display: block;
    }

    .home-intro-copy {
        display: block;
        min-width: 0;
    }

    .home-intro-kicker {
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .home-intro-copy h2 {
        font-size: 1.22rem;
        line-height: 1.2;
        margin-bottom: 0.65rem;
    }

    .home-intro-copy h3 {
        font-size: 1rem;
        line-height: 1.25;
        margin: 0 0 0.55rem;
    }

    .home-intro-copy p {
        width: 100%;
        max-width: 100%;
        margin: 0;
        font-size: 0.92rem;
        line-height: 1.45;
        white-space: normal;
        overflow: visible;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .home-expo-brand {
        display: none;
    }

    .home-objectives-wrap {
        margin-top: 1.1rem;
    }

    .home-objectives-wrap h3 {
        font-size: 1rem;
        margin-bottom: 0.55rem;
    }

    .home-objectives-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .home-objectives-grid article {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 0.7rem;
        width: 100%;
        padding: 0.82rem 0.78rem;
        border: 1px solid #d7e2f0;
        border-radius: 14px;
        border-bottom: 1px solid #d7e2f0;
        background: linear-gradient(135deg, #ffffff 0%, var(--objective-accent-soft, #f6f9fd) 100%);
        overflow: visible;
    }

    .home-objectives-grid article::before {
        width: 4px;
    }

    .objective-number {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: #ffffff;
        color: var(--objective-accent, #123f6b);
        font-size: 0.78rem;
        font-weight: 900;
        border: 1px solid color-mix(in srgb, var(--objective-accent, #123f6b) 30%, #ffffff);
        box-shadow: 0 6px 14px rgba(18, 63, 107, 0.08);
    }

    .home-objectives-grid h4 {
        margin-bottom: 0.25rem;
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .home-objectives-grid p {
        margin: 0;
        font-size: 0.86rem;
        line-height: 1.42;
        white-space: normal;
        overflow: visible;
        overflow-wrap: break-word;
    }

    .home-logos-panel {
        margin-top: 1rem;
        padding: 0.75rem;
    }

    .home-logos-panel h3 {
        font-size: 0.95rem;
    }

    .logos-track {
        min-height: auto;
    }

    .logo-slide img {
        height: auto;
        max-height: 190px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.55rem 0.7rem;
    }

    .header-inner {
        gap: 0.55rem;
    }

    .brand-block {
        min-width: 0;
        align-items: center;
    }

    .brand-block h1 {
        font-size: 1rem;
        line-height: 1.15;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .brand-logo {
        height: 48px;
        max-width: 56px;
        border-radius: 10px;
    }

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

    .nav-toggle {
        width: fit-content;
        padding: 0.4rem 0.65rem;
    }

    .container {
        padding: 0.65rem;
        gap: 0.75rem;
    }

    .card {
        border-radius: 10px;
        padding: 1rem;
    }

    .home-intro-block {
        gap: 1rem;
        overflow: visible;
    }

    .home-intro-copy,
    .home-intro-copy p,
    .home-objectives-grid article,
    .home-objectives-grid p {
        min-width: 0;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .home-intro-copy h2 {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .home-intro-copy h3,
    .home-objectives-wrap h3 {
        font-size: 1.05rem;
    }

    .home-expo-brand {
        min-height: 150px;
        padding: 0.75rem;
    }

    .home-expo-logo {
        max-height: 120px;
    }

    .home-objectives-grid {
        gap: 0.55rem;
    }

    .home-objectives-grid article {
        padding: 0.6rem;
    }

    .home-objectives-grid h4 {
        font-size: 0.98rem;
    }

    .home-objectives-grid p {
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .home-logos-panel {
        padding: 0.75rem;
    }

    .logos-track {
        min-height: 230px;
    }

    .logo-slide img {
        height: 210px;
    }

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

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

/* Mobile fit guardrails for desktop-oriented templates. */
.container,
.card,
.inline-card,
.admin-shell,
.admin-main,
.admin-section,
.admin-sidebar,
.page-head,
.page-head-actions,
.maintenance-tools,
.form-grid,
.table-wrap,
.dialog-card,
.home-intro-copy,
.project-detail,
.project-main,
.integrant-card {
    min-width: 0;
}

h1,
h2,
h3,
h4,
p,
label,
td,
th,
small,
strong,
a,
button,
.tag,
.campaign-badge,
.assignment-summary-pill,
.project-link,
.admin-menu a {
    overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
    min-width: 0;
    max-width: 100%;
}

.table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
    .container {
        display: grid;
        gap: 0.75rem;
    }

    .card,
    .inline-card,
    .maintenance-panel,
    .assignment-manage-block,
    .projects-filter-bar,
    .card-soft {
        padding: 0.75rem;
        border-radius: 10px;
    }

    .page-head,
    .section-head,
    .category-title-wrap,
    .members-header,
    .maintenance-head,
    .institutional-banner,
    .maintenance-banner {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .page-head-actions,
    .maintenance-tools,
    .actions-cell,
    .project-main-actions,
    .assignment-inline-delete {
        width: 100%;
        justify-content: stretch;
    }

    .page-head-actions > *,
    .maintenance-tools > *,
    .actions-cell > *,
    .actions-cell .inline-form,
    .project-main-actions > *,
    .assignment-inline-delete > * {
        flex: 1 1 auto;
        width: 100%;
    }

    button,
    .project-action,
    .outline-btn,
    .ghost-btn,
    .secondary-btn,
    .danger-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .nav-toggle,
    .logo-dot,
    .dialog-close {
        flex: 0 0 auto;
    }

    .nav-toggle,
    .dialog-close {
        width: fit-content;
    }

    .logo-dot {
        width: 10px;
        min-width: 10px;
    }

    .btn-icon-only {
        width: 42px;
        min-width: 42px;
        flex: 0 0 42px;
    }

    .admin-menu {
        grid-template-columns: 1fr;
    }

    .admin-menu a {
        min-width: 0;
    }

    dialog.maintenance-dialog,
    .eval-types-dialog,
    .rubric-criteria-dialog,
    .assignment-manage-dialog {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        margin: auto;
    }

    .dialog-card,
    .dialog-card-wide {
        padding: 0.75rem;
        max-height: calc(100vh - 1rem);
        overflow: auto;
    }

    .requirements-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .requirement-item {
        align-items: start;
        width: 100%;
    }

    .register-header-brand {
        min-height: auto;
    }

    .register-header-logo {
        width: min(100%, 120px);
        max-height: 120px;
    }

    .register-header-fallback {
        width: 120px;
        height: 120px;
    }

    .focus-grid,
    .filter-grid,
    .projects-filter-row,
    .tracking-filter-row,
    .assignments-action-strip,
    .assignment-filter-panel,
    .assignment-project-card,
    .assignment-inline-add,
    .assignment-inline-create,
    .assignment-inline-create-compact,
    .assignment-manage-form,
    .assignment-manage-item,
    .member-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .assignment-inline-add button,
    .assignment-inline-create .secondary-btn,
    .assignment-manage-item .secondary-btn,
    .assignment-manage-item .danger-btn {
        min-width: 0;
        white-space: normal;
    }

    .member-grid,
    .integrants-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .member-card {
        align-items: flex-start;
    }

    .project-link {
        white-space: normal;
    }

    .project-main-image,
    .project-main-placeholder {
        max-width: 100%;
    }

    .banner-badge {
        width: 120px;
        height: 120px;
        justify-self: start;
    }

    .site-footer-inner {
        padding: 0.75rem;
    }

    .site-footer p {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .table-wrap {
        overflow-x: visible;
        border: 0;
        border-radius: 0;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
    }

    .table-wrap table {
        border: 0;
        background: transparent;
        table-layout: auto;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tr {
        margin-bottom: 0.7rem;
        padding: 0.72rem;
        border: 1px solid #d9e3ef;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 18px rgba(18, 63, 107, 0.06);
    }

    .table-wrap td,
    .table-wrap th {
        border: 0;
        padding: 0.3rem 0;
        white-space: normal;
        text-align: left;
    }

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

    .table-wrap td:not([data-label])::before,
    .table-wrap td[data-label=""]::before {
        content: none;
    }

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

    .logistics-status-tag,
    .member-count-badge {
        min-width: 0;
        white-space: normal;
    }
}

@media (max-width: 380px) {
    .container {
        padding: 0.45rem;
    }

    .card,
    .inline-card {
        padding: 0.65rem;
    }

    .brand-block h1 {
        font-size: 0.92rem;
    }

    .brand-logo {
        height: 42px;
        max-width: 50px;
    }

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

/* Compact project logo carousel. */
.home-logos-panel {
    overflow: hidden;
}

.logos-track {
    display: grid;
    align-items: center;
}

.logo-slide {
    width: 100%;
    min-width: 0;
}

.logo-slide.active {
    place-items: center;
}

.logo-slide img {
    display: block;
    max-width: min(100%, 470px);
}

.logo-slide figcaption {
    max-width: 100%;
    text-align: center;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.logos-dots {
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 700px) {
    .home-logos-panel {
        display: grid;
        gap: 0.65rem;
        margin-top: 0.8rem;
        padding: 0.75rem;
        border-radius: 12px;
    }

    .home-logos-panel h3 {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .logos-carousel {
        gap: 0.55rem;
        min-width: 0;
    }

    .logos-track {
        min-height: 0;
    }

    .logo-slide {
        gap: 0.45rem;
    }

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

    .logo-slide img {
        width: 100%;
        height: clamp(130px, 46vw, 180px);
        max-height: none;
        padding: 0.5rem;
        border-radius: 9px;
        object-fit: contain;
    }

    .logo-slide figcaption {
        width: 100%;
        color: #ffffff;
        font-size: 0.88rem;
        min-height: 1.1rem;
    }

    .logos-dots {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
        gap: 0.22rem;
        width: 100%;
        max-height: none;
        overflow: visible;
        padding: 0.15rem 0 0;
    }

    .logo-dot {
        width: 100%;
        min-width: 0;
        height: 6px;
        border-width: 0;
        border-radius: 999px;
        opacity: 0.62;
    }

    .logo-dot.active {
        opacity: 1;
        transform: none;
        background: #ffffff;
    }
}

@media (max-width: 480px) {
    .home-logos-panel {
        padding: 0.65rem;
    }

    .logo-slide img {
        height: clamp(115px, 42vw, 155px);
    }
}

/* Cleaner mobile header menu. */
@media (max-width: 900px) {
    .header {
        padding: 0.55rem 0.7rem;
    }

    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem;
        align-items: center;
    }

    .brand-block {
        min-width: 0;
        width: auto;
    }

    .brand-logo {
        height: 46px;
        max-width: 52px;
        border-radius: 10px;
    }

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

    .brand-block h1 {
        font-size: 0.98rem;
        line-height: 1.15;
    }

    .brand-block p {
        display: none;
    }

    .nav-toggle {
        justify-self: end;
        min-height: 38px;
        padding: 0.45rem 0.68rem;
        border-color: rgba(255, 255, 255, 0.42);
        background: rgba(255, 255, 255, 0.12);
        box-shadow: none;
    }

    .header nav {
        grid-column: 1 / -1;
        margin-top: 0.25rem;
        padding: 0.35rem;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 10px;
        background: rgba(7, 28, 48, 0.24);
        gap: 0.2rem;
    }

    .header nav a,
    .header nav .btn-link {
        min-height: 38px;
        justify-content: flex-start;
        padding: 0.48rem 0.62rem;
        border: 0;
        border-radius: 7px;
        background: transparent;
        text-align: left;
        font-size: 0.92rem;
    }

    .header nav a:hover,
    .header nav .btn-link:hover {
        background: rgba(255, 255, 255, 0.11);
    }

    .header nav .inline-form .btn-link {
        justify-content: flex-start;
    }
}

@media (max-width: 380px) {
    .brand-block h1 {
        font-size: 0.88rem;
    }

    .nav-toggle span:last-child {
        display: none;
    }
}

/* Professional mobile layout system. Keep this final so it wins older desktop rules. */
@media (max-width: 820px) {
    :root {
        --mobile-page-pad: 0.75rem;
        --mobile-card-pad: 0.85rem;
        --mobile-gap: 0.75rem;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        line-height: 1.42;
    }

    .container {
        width: 100%;
        max-width: 100vw;
        padding: var(--mobile-page-pad);
        display: grid;
        gap: var(--mobile-gap);
    }

    .card,
    .inline-card,
    .admin-overview-block,
    .permissions-card,
    .assignment-manage-block,
    .assignment-picker,
    .projects-filter-bar,
    .maintenance-panel,
    .card-soft,
    .project-sidebar,
    .integrants-strip {
        width: 100%;
        min-width: 0;
        border-radius: 10px;
        padding: var(--mobile-card-pad);
    }

    h1,
    h2,
    h3,
    h4 {
        line-height: 1.18;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.08rem;
    }

    h4 {
        font-size: 1rem;
    }

    p,
    label,
    input,
    select,
    textarea,
    button,
    a,
    span,
    small,
    strong,
    td,
    th {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    input,
    select,
    textarea {
        min-height: 42px;
        font-size: 0.96rem;
    }

    textarea {
        resize: vertical;
    }

    .header {
        position: static;
        padding: 0.55rem 0.7rem;
    }

    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem;
    }

    .brand-block {
        min-width: 0;
        width: auto;
        gap: 0.5rem;
    }

    .brand-logo {
        height: 44px;
        max-width: 50px;
        border-radius: 10px;
    }

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

    .brand-block h1 {
        font-size: 0.96rem;
        line-height: 1.16;
        max-width: 100%;
    }

    .brand-block p {
        display: none;
    }

    .nav-toggle {
        justify-self: end;
        width: auto;
        min-height: 38px;
        padding: 0.45rem 0.68rem;
        border-color: rgba(255, 255, 255, 0.45);
        background: rgba(255, 255, 255, 0.12);
        border-radius: 8px;
    }

    .header nav {
        grid-column: 1 / -1;
        width: 100%;
        display: none;
        grid-template-columns: 1fr;
        gap: 0.18rem;
        margin: 0.2rem 0 0;
        padding: 0.32rem;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(6, 25, 44, 0.25);
    }

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

    .header nav a,
    .header nav .btn-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 36px;
        padding: 0.46rem 0.6rem;
        border: 0;
        border-radius: 7px;
        background: transparent;
        text-align: left;
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .header nav a:hover,
    .header nav .btn-link:hover {
        background: rgba(255, 255, 255, 0.12);
    }

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

    .admin-shell,
    .showcase-layout,
    .auth-shell,
    .home-intro-hero,
    .project-main,
    .maintenance-grid,
    .cleanup-grid,
    .institution-layout,
    .institution-fields-grid,
    .admin-overview-grid,
    .permissions-grid,
    .permissions-summary,
    .evaluation-stats,
    .winner-grid,
    .project-tracking-summary,
    .project-tracking-detail,
    .assignment-manage-grid,
    .assignment-manage-item,
    .assignment-inline-add,
    .assignment-inline-create,
    .assignment-inline-create-compact,
    .assignment-manage-form,
    .register-header,
    .focus-grid,
    .filter-grid,
    .projects-filter-row,
    .tracking-filter-row,
    .member-row,
    .final-stages-grid,
    .compact-form .grid-2,
    .compact-form .grid-3,
    .inline-grid-1,
    .inline-grid-2,
    .inline-grid-3,
    .inline-grid-4,
    .inline-grid-6,
    .inline-grid-7 {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--mobile-gap);
        align-items: stretch;
    }

    .admin-sidebar {
        position: static;
        top: auto;
    }

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

    .admin-menu a,
    .quick-links a,
    .project-link {
        min-width: 0;
        min-height: 38px;
        padding: 0.5rem 0.62rem;
        line-height: 1.22;
        white-space: normal;
    }

    .quick-links,
    .admin-stats,
    .admin-stats-3,
    .admin-stats-4,
    .academic-hub,
    .project-tracking-metrics,
    .project-tracking-metrics-compact,
    .assignment-project-list,
    .member-grid,
    .integrants-grid,
    .home-objectives-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
    }

    .admin-stats article {
        min-width: 0;
        padding: 0.75rem;
    }

    .page-head,
    .section-head,
    .category-title-wrap,
    .members-header,
    .maintenance-head,
    .maintenance-banner,
    .rubric-criteria-head,
    .dialog-head,
    .institutional-banner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 0.6rem;
    }

    .page-head-actions,
    .maintenance-tools,
    .actions-row,
    .actions-cell,
    .project-main-actions,
    .evaluation-actions,
    .assignment-inline-delete {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        gap: 0.42rem;
        justify-content: stretch;
    }

    .page-head-actions > *,
    .maintenance-tools > *,
    .actions-row > *,
    .actions-cell > *,
    .actions-cell .inline-form,
    .project-main-actions > *,
    .assignment-inline-delete > * {
        width: 100%;
        min-width: 0;
    }

    button,
    .project-action,
    .table-link-btn,
    .outline-btn,
    .ghost-btn,
    .secondary-btn,
    .danger-btn {
        min-height: 40px;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .dialog-close,
    .nav-toggle,
    .logo-dot,
    .btn-icon-only {
        width: auto;
    }

    .dialog-close {
        justify-self: end;
        min-width: 40px;
        width: 40px;
        padding: 0;
    }

    .btn-icon-only {
        width: 42px;
        min-width: 42px;
        justify-self: start;
    }

    .table-wrap,
    .eval-types-table-wrap,
    .rubric-criteria-table-wrap,
    .evaluation-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: visible;
        border: 0;
        border-radius: 0;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto;
    }

    .table-wrap table {
        border: 0;
        background: transparent;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tr {
        margin: 0 0 0.7rem;
        padding: 0.72rem;
        border: 1px solid #d8e3ef;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 18px rgba(18, 63, 107, 0.06);
    }

    .table-wrap td,
    .table-wrap th {
        padding: 0.3rem 0;
        border: 0;
        text-align: left;
        white-space: normal;
    }

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

    .table-wrap td:not([data-label])::before,
    .table-wrap td[data-label=""]::before,
    .table-wrap td[colspan]::before {
        content: none;
    }

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

    .tag,
    .campaign-badge,
    .assignment-summary-pill,
    .assignment-project-badge,
    .logistics-status-tag,
    .member-count-badge {
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        line-height: 1.2;
    }

    dialog.maintenance-dialog,
    .eval-types-dialog,
    .rubric-criteria-dialog,
    .assignment-manage-dialog {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        margin: auto;
        border-radius: 12px;
    }

    .dialog-card,
    .dialog-card-wide {
        max-height: calc(100vh - 1rem);
        overflow: auto;
        padding: 0.8rem;
        gap: 0.7rem;
    }

    .compact-form,
    .form-grid,
    .register-form,
    .evaluation-form,
    .maintenance-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.72rem;
    }

    .requirements-grid,
    .projects-filter-state-group,
    .auth-brand-points,
    .assignment-summary-list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        align-items: stretch;
    }

    .projects-filter-radio,
    .requirement-item,
    .permissions-toggle,
    .switch-card,
    .assignment-project-option {
        width: 100%;
        min-width: 0;
    }

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

    .register-header-brand,
    .home-expo-brand {
        min-height: auto;
        justify-items: start;
    }

    .register-header-logo,
    .home-expo-logo {
        width: min(100%, 130px);
        max-height: 130px;
    }

    .auth-logo-school {
        width: 84px;
        height: 84px;
    }

    .auth-logo-expo {
        width: 140px;
        height: 84px;
    }

    .project-sidebar {
        max-height: none;
        overflow: visible;
    }

    .project-sidebar-list {
        display: grid;
        gap: 0.35rem;
    }

    .project-category-menu {
        margin: 0;
        border: 1px solid #d7e2ef;
        border-radius: 10px;
        background: #ffffff;
        overflow: hidden;
    }

    .project-category-menu summary {
        min-height: 44px;
        margin: 0;
        padding: 0.7rem 0.75rem;
        background: linear-gradient(180deg, #f8fbff 0%, #eff5fd 100%);
        color: #173e6a;
    }

    .project-category-menu summary::after {
        content: "+";
        display: grid;
        place-items: center;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 999px;
        background: #ffffff;
        border: 1px solid #c8d8eb;
        color: #1f4f82;
        font-weight: 900;
    }

    .project-category-menu[open] summary::after {
        content: "-";
    }

    .project-category-menu summary small {
        display: none;
    }

    .project-category-list {
        padding: 0.55rem;
        background: #fbfdff;
    }

    .project-category-list .project-link {
        margin: 0;
        border-radius: 8px;
        background: #ffffff;
    }

    .project-category-list .project-link.active {
        border-color: #7fa4cf;
        background: #eaf3ff;
    }

    .project-main-image,
    .project-main-placeholder {
        width: 100%;
        max-width: 260px;
        justify-self: center;
    }

    .project-content,
    .project-main-meta,
    .project-main-description {
        min-width: 0;
    }

    .institutional-banner h1 {
        font-size: clamp(1.7rem, 11vw, 2.7rem);
    }

    .institutional-banner-compact h1 {
        font-size: clamp(1.35rem, 8vw, 2rem);
    }

    .project-sidebar-brand {
        justify-content: center;
    }

    .project-sidebar-logo {
        width: min(260px, 100%);
        height: auto;
        border-radius: 0;
        padding: 0;
    }

    .project-sidebar-logo.expo {
        width: min(260px, 100%);
    }

    .banner-badge {
        width: 112px;
        height: 112px;
        justify-self: start;
    }

    .home-logos-panel {
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .logos-track {
        min-height: 0;
    }

    .logo-slide img {
        height: clamp(120px, 40vw, 175px);
        max-height: none;
    }

    .logos-dots {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
        width: 100%;
        gap: 0.22rem;
    }

    .logo-dot {
        width: 100%;
        min-width: 0;
        height: 6px;
        border: 0;
        border-radius: 999px;
    }

    .evaluation-score-option {
        min-width: 0;
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .site-footer-inner {
        padding: 0.75rem;
    }

    .site-footer p {
        font-size: 0.82rem;
        line-height: 1.35;
    }
}

/* Remove any browser/page frame around the top navigation. */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

html {
    scrollbar-gutter: auto !important;
}

body {
    background: var(--bg);
    padding-top: var(--fixed-header-height, 96px) !important;
}

.header {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-top: 0 !important;
    z-index: 3000 !important;
}

@media (max-width: 820px) {
    body {
        padding-top: var(--fixed-header-height, 68px) !important;
    }
}

@media (max-width: 520px) {
    :root {
        --mobile-page-pad: 0.55rem;
        --mobile-card-pad: 0.72rem;
        --mobile-gap: 0.6rem;
    }

    .brand-block h1 {
        font-size: 0.9rem;
    }

    .brand-logo {
        height: 40px;
        max-width: 46px;
    }

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

    .nav-toggle {
        padding-inline: 0.58rem;
    }

    .nav-toggle span:last-child {
        display: none;
    }

    .card,
    .inline-card,
    .admin-overview-block,
    .permissions-card,
    .assignment-manage-block,
    .assignment-picker,
    .projects-filter-bar,
    .maintenance-panel,
    .card-soft,
    .project-sidebar,
    .integrants-strip {
        border-radius: 9px;
    }

    .table-wrap tr {
        padding: 0.65rem;
    }

    .dialog-card,
    .dialog-card-wide {
        padding: 0.7rem;
    }

    .project-main-image,
    .project-main-placeholder {
        max-width: 220px;
    }

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

    .project-members-panel .integrants-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .project-members-panel .integrant-card {
        grid-template-columns: 1fr;
    }

    .integrant-photo {
        width: 72px;
        height: 72px;
    }
}

/* Final mobile header placement override. */
@media (max-width: 820px) {
    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    .header {
        position: sticky !important;
        top: 0 !important;
        left: 0;
        right: 0;
        margin: 0 !important;
        z-index: 1000;
    }

    .header-inner {
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
    }
}

/* Users admin cards: compact layout for medium/mobile table mode. */
@media (max-width: 980px) {
    .users-table-wrap .users-table tr[data-user-row] {
        display: grid !important;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        gap: 0.52rem 0.85rem;
        padding: 0.82rem 0.95rem;
        border-radius: 14px;
    }

    .users-table-wrap .users-table td {
        display: grid !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        align-content: start;
    }

    .users-table-wrap .users-table td[data-label]::before {
        margin-bottom: 0.12rem;
        color: #5b7593;
        font-size: 0.68rem;
        letter-spacing: 0.075em;
        line-height: 1.1;
        white-space: nowrap;
        word-break: normal;
    }

    .users-table-wrap .users-table td[data-label="Usuario"] {
        grid-column: 1 / -1;
        padding-bottom: 0.48rem !important;
        border-bottom: 1px solid #e1edf8;
    }

    .users-table-wrap .users-table td[data-label="Acciones"] {
        grid-column: 1 / -1;
        padding-top: 0.12rem !important;
    }

    .users-table-wrap .user-identity-cell {
        gap: 0.12rem;
    }

    .users-table-wrap .user-identity-cell strong {
        font-size: 1.05rem;
    }

    .users-table-wrap .user-identity-cell span,
    .users-table-wrap .user-identity-cell small {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    .users-table-wrap .user-profile-cell,
    .users-table-wrap .user-status-stack {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.35rem;
        align-items: center;
    }

    .users-table-wrap .user-profile-cell .tag,
    .users-table-wrap .user-status-stack .tag {
        display: inline-flex;
        width: auto !important;
        max-width: max-content;
        padding: 0.22rem 0.65rem;
        white-space: nowrap;
    }

    .users-table-wrap .user-profile-cell > span:not(.tag),
    .users-table-wrap .user-profile-cell > small {
        flex-basis: 100%;
        line-height: 1.2;
    }

    .users-table-wrap .users-actions-cell {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.45rem;
        align-items: center;
        width: auto !important;
    }

    .users-table-wrap .users-actions-cell > *,
    .users-table-wrap .users-actions-cell .inline-form {
        flex: 0 0 auto;
    }

    .users-table-wrap .users-actions-cell button {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px;
        min-height: 42px;
        padding: 0;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }
}

@media (min-width: 701px) and (max-width: 980px) {
    .users-table-wrap .users-table tr[data-user-row] {
        grid-template-columns: minmax(220px, 1.25fr) minmax(140px, 0.75fr) minmax(190px, 1fr) minmax(210px, 0.85fr);
        align-items: start;
    }

    .users-table-wrap .users-table td[data-label="Usuario"] {
        grid-column: auto;
        grid-row: span 2;
        padding-right: 0.9rem !important;
        padding-bottom: 0 !important;
        border-right: 1px solid #e1edf8;
        border-bottom: 0;
    }

    .users-table-wrap .users-table td[data-label="Perfil"],
    .users-table-wrap .users-table td[data-label="Estado"] {
        grid-row: 1;
    }

    .users-table-wrap .users-table td[data-label="Último acceso"] {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .users-table-wrap .users-table td[data-label="Acciones"] {
        grid-column: 4;
        grid-row: 1 / 3;
        padding-top: 0 !important;
        justify-content: stretch;
    }

    .users-table-wrap .users-actions-cell {
        align-content: start;
        justify-content: flex-start;
        gap: 0.45rem;
    }
}

@media (max-width: 560px) {
    .users-table-wrap .users-table tr[data-user-row] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Mobile admin navigation: keep maintenance content reachable without scrolling past the full menu. */
@media (max-width: 900px) {
    .admin-shell {
        gap: 0.65rem !important;
    }

    .admin-sidebar {
        position: sticky !important;
        top: 0.65rem !important;
        z-index: 120;
        padding: 0.55rem;
        border-radius: 12px;
        box-shadow: 0 10px 26px rgba(13, 63, 107, 0.12);
    }

    .admin-sidebar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .admin-sidebar-top h2 {
        font-size: 1.05rem;
        line-height: 1.1;
    }

    .admin-sidebar-top p {
        margin: 0.12rem 0 0;
        font-size: 0.82rem;
        line-height: 1.15;
    }

    .admin-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto !important;
        min-width: 86px;
        min-height: 40px;
        padding: 0.45rem 0.75rem;
        border-color: rgba(31, 143, 181, 0.35);
        background: #ffffff;
        color: var(--primary);
        white-space: nowrap;
    }

    .admin-sidebar .admin-menu {
        display: none !important;
        margin-top: 0.55rem;
        max-height: min(62vh, 520px);
        overflow-y: auto;
        padding-right: 0.2rem;
    }

    .admin-sidebar.is-open .admin-menu {
        display: grid !important;
    }

    .admin-menu-group {
        margin-top: 0.35rem;
    }

    .gitops-hero,
    .gitops-main-grid,
    .gitops-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .gitops-primary-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .gitops-action-card {
        min-height: 72px;
    }

    .gitops-revert-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .gitops-config-actions,
    .gitops-test-form {
        justify-content: stretch;
    }

    .gitops-config-actions .compact-toggle,
    .gitops-config-actions .gitops-btn,
    .gitops-test-form .gitops-btn {
        width: 100%;
        min-width: 0;
    }

    .gitops-changes-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gitops-changes-panel .gitops-revision-list div {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .gitops-changes-panel .gitops-revision-list small {
        grid-column: 2;
    }

    .audit-hero,
    .audit-event-card {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .audit-filter-actions {
        grid-column: 1 / -1;
    }

    .audit-event-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-hero {
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center;
        padding: 0.85rem;
    }

    .overview-hero-status {
        min-width: 112px;
        padding: 0.65rem 0.75rem;
    }

    .overview-hero-status strong {
        font-size: 1.6rem;
    }

    .overview-action-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .overview-action-strip a {
        min-height: 52px;
        padding: 0.5rem 0.6rem;
    }

    .overview-metrics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .overview-metric-list,
    .overview-metric-list.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gitops-hero {
        padding: 0.8rem;
    }

    .gitops-status-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .gitops-health-card,
    .gitops-status-strip article,
    .gitops-panel,
    .gitops-details-card {
        border-radius: 12px;
        padding: 0.72rem;
    }

    .gitops-action-card {
        min-height: 66px;
        padding: 0.7rem;
    }

    .gitops-action-card strong {
        font-size: 1rem;
    }

    .gitops-action-card small {
        font-size: 0.82rem;
    }

    .gitops-file-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
    }

    .gitops-revision-list div,
    .gitops-log-list article {
        padding: 0.5rem;
    }

    .audit-hero,
    .audit-filter-panel,
    .audit-event-card {
        border-radius: 12px;
        padding: 0.72rem;
    }

    .audit-summary-grid,
    .audit-filter-grid,
    .audit-event-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .audit-hero-count {
        text-align: left;
    }

    .audit-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-filter-actions button,
    .audit-filter-actions .outline-btn {
        width: 100%;
        justify-content: center;
    }

    .audit-event-main {
        gap: 0.5rem;
    }

    .overview-hero {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .overview-hero-status {
        justify-self: stretch;
        text-align: left;
    }

    .overview-action-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-action-strip a {
        min-height: 48px;
    }

    .overview-metric-list,
    .overview-metric-list.compact {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-overview-page .pending-logistics-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.42rem !important;
        padding: 0.7rem !important;
        border-radius: 14px !important;
    }

    .admin-overview-page .pending-logistics-row td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem;
        width: auto !important;
        min-width: 0 !important;
        padding: 0.42rem 0.5rem !important;
        border: 1px solid #dce9f5;
        border-radius: 10px;
        background: #f8fbff;
    }

    .admin-overview-page .pending-logistics-row td::before {
        margin: 0;
        font-size: 0.67rem;
        line-height: 1;
        white-space: nowrap;
    }

    .admin-overview-page .pending-logistics-row td[data-label="Proyecto"],
    .admin-overview-page .pending-logistics-row td[data-label="Control"] {
        grid-column: 1 / -1;
    }

    .admin-overview-page .pending-logistics-row td[data-label="Proyecto"] {
        display: grid !important;
        justify-content: stretch;
        background: #ffffff;
        font-weight: 800;
        color: var(--primary);
    }

    .admin-overview-page .pending-logistics-row td[data-label="Proyecto"]::before {
        margin-bottom: 0.1rem;
    }

    .admin-overview-page .pending-logistics-row .tag {
        padding: 0.16rem 0.48rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .admin-overview-page .pending-logistics-row .logistics-control-link {
        width: 100%;
        justify-content: center;
        min-height: 36px;
    }
}

/* Public projects page already sits below the fixed header through body padding. */
.projects-showcase-page .container {
    padding-top: 1rem !important;
}

.projects-showcase-page .project-sidebar {
    top: calc(var(--fixed-header-height, 96px) + 1rem) !important;
}

@media (max-width: 820px) {
    .projects-showcase-page .container {
        padding-top: 0.75rem !important;
    }
}

/* Header account menu: keep public navigation separate from private actions. */
.header nav .nav-profile-actions a,
.header nav .nav-profile-actions .btn-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d4e2f0;
    border-radius: 10px;
    background: #f6faff;
    color: var(--primary);
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: normal;
}

.header nav .nav-profile-actions a:hover,
.header nav .nav-profile-actions .btn-link:hover {
    border-color: #9fbddc;
    background: #eaf4ff;
    color: var(--primary);
}

.header nav .nav-profile-actions .inline-form .btn-link {
    border-color: #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

@media (max-width: 820px) {
    .header nav .site-nav-public {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
        width: 100%;
    }

    .header nav .nav-profile {
        width: 100%;
    }

    .header nav .nav-profile summary {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .header nav .nav-profile-card {
        position: static;
        width: 100%;
        margin-top: 0.4rem;
        box-shadow: none;
    }
}

/* Compact judge panel: designed for a small set of assigned projects. */
.judge-dashboard-compact {
    gap: 0.75rem;
    width: min(1120px, 100%);
    margin-inline: auto;
    align-self: start;
    align-content: start;
    grid-auto-rows: max-content;
}

.container > .judge-dashboard-compact {
    align-self: start;
}

.judge-dashboard-hero.compact {
    grid-template-columns: minmax(240px, 0.78fr) minmax(420px, 1.22fr);
    min-height: auto;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #eef9fd 100%);
}

.judge-dashboard-hero.compact h2 {
    font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

.judge-dashboard-hero.compact p {
    margin-top: 0.25rem;
}

.judge-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.judge-summary-strip article {
    display: grid;
    gap: 0.05rem;
    align-content: center;
    min-height: 58px;
    padding: 0.55rem 0.65rem;
    border: 1px solid #d0e0ef;
    border-radius: 13px;
    background: #ffffff;
}

.judge-summary-strip strong {
    color: var(--primary);
    font-size: 1.35rem;
    line-height: 1;
}

.judge-summary-strip span {
    color: #5d728c;
    font-size: 0.78rem;
    font-weight: 900;
}

.judge-availability-card {
    border: 1px solid #cbddee;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    padding: 0.82rem;
    box-shadow: 0 10px 24px rgba(13, 63, 107, 0.05);
}

.judge-availability-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    cursor: pointer;
    list-style: none;
}

.judge-availability-card summary::-webkit-details-marker {
    display: none;
}

.judge-availability-card summary strong {
    color: var(--primary);
    font-size: 1.04rem;
}

.judge-availability-card summary small {
    display: block;
    margin-top: 0.16rem;
    color: #607995;
    font-size: 0.84rem;
}

.judge-document-reminder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #f7c62f;
    border-left: 6px solid #f59e0b;
    border-radius: 16px;
    background: #fff8ed;
    padding: 0.85rem 1rem;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.12);
}

.judge-document-reminder h3 {
    margin: 0.1rem 0 0.16rem;
    color: #7a4f00;
    font-size: 1.05rem;
}

.judge-document-reminder p {
    margin: 0;
    color: #5d728c;
    font-size: 0.9rem;
}

.judge-availability-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #d9e7f5;
}

.judge-availability-form label {
    display: grid;
    gap: 0.32rem;
    color: #405a76;
    font-weight: 800;
}

.judge-availability-form input,
.judge-availability-form select {
    min-height: 42px;
}

.judge-availability-check {
    align-self: end;
    min-height: 42px;
}

.judge-availability-form .actions-row {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.judge-project-list {
    display: grid;
    gap: 0.6rem;
    align-content: start;
    grid-auto-rows: max-content;
}

.judge-project-row {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.15fr);
    gap: 0.75rem;
    align-items: center;
    border: 1px solid #cbddee;
    border-radius: 16px;
    padding: 0.85rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(13, 63, 107, 0.06);
}

.judge-project-info h3 {
    margin: 0.28rem 0 0;
    color: var(--primary);
    font-size: 1.18rem;
    line-height: 1.12;
}

.judge-project-info p {
    margin: 0.18rem 0 0;
    color: #607995;
    font-size: 0.9rem;
}

.judge-project-english-note {
    display: inline-block;
    margin-top: 0.28rem;
    color: #157a8c;
    font-size: 0.82rem;
    font-weight: 900;
}

.judge-project-info .judge-project-progress {
    margin-top: 0.55rem;
}

.judge-project-progress {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: baseline;
    gap: 0.35rem;
    width: fit-content;
    border-radius: 13px;
    padding: 0.32rem 0.6rem;
    border: 1px solid #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

.judge-project-progress.complete {
    border-color: #b9ddc0;
    background: #effbea;
    color: #1f6a34;
}

.judge-project-progress strong {
    font-size: 1.15rem;
    line-height: 1;
}

.judge-project-progress span {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.judge-project-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.38rem;
}

.judge-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    border: 1px solid #cbd9ea;
    background: #f6faff;
    color: var(--primary);
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
}

.judge-action-link.document {
    border-color: #2c7264;
    background: linear-gradient(135deg, #2f9c84 0%, #1f6f7c 100%);
    color: #ffffff;
}

.judge-action-link.evaluate {
    border-color: #d79026;
    background: linear-gradient(180deg, #ffb333 0%, #f0a11b 100%);
    color: #15395e;
}

.judge-action-link.done {
    border-color: #b9ddc0;
    background: #effbea;
    color: #1f6a34;
}

.judge-action-link.missing {
    border-color: #f0c3c9;
    background: #fff2f4;
    color: #8c2030;
}

.judge-empty-state.compact {
    padding: 1rem;
}

@media (max-width: 900px) {
    .judge-dashboard-hero.compact {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
    }

    .judge-summary-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .judge-project-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .judge-project-actions {
        justify-content: flex-start;
    }

    .judge-availability-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .judge-dashboard-compact {
        gap: 0.55rem;
    }

    .judge-dashboard-hero.compact {
        padding: 0.7rem;
        border-radius: 13px;
    }

    .judge-dashboard-hero.compact h2 {
        font-size: 1.45rem;
    }

    .judge-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
    }

    .judge-summary-strip article {
        min-height: 50px;
        padding: 0.45rem 0.5rem;
    }

    .judge-summary-strip strong {
        font-size: 1.15rem;
    }

    .judge-summary-strip span {
        font-size: 0.72rem;
    }

    .judge-availability-card {
        padding: 0.7rem;
        border-radius: 13px;
    }

    .judge-availability-card summary {
        align-items: flex-start;
    }

    .judge-availability-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.55rem;
    }

    .judge-availability-form .actions-row,
    .judge-availability-form .secondary-btn {
        width: 100%;
    }

    .judge-project-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        padding: 0.62rem;
        border-radius: 13px;
    }

    .judge-project-progress {
        width: 100%;
        grid-template-columns: auto 1fr;
        justify-items: start;
        align-items: baseline;
        gap: 0.4rem;
        min-width: 0;
    }

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

    .judge-action-link {
        min-height: 34px;
        padding: 0.34rem 0.5rem;
        border-radius: 10px;
        font-size: 0.78rem;
    }

    .judge-action-link.document {
        grid-column: 1 / -1;
    }
}

/* ── Metric alert (overview panel for pending revisions) ─────────────────── */
.overview-metric-list .metric-alert {
    border: 1px solid #f0d090;
    background: #fff8e8;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    display: grid;
    gap: 0.1rem;
    text-align: center;
}

.overview-metric-list .metric-alert strong {
    color: #8a4d00;
    font-size: 1.5rem;
    font-weight: 900;
}

.overview-metric-list .metric-alert span {
    color: #7a5010;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-alert-link {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #9a5010;
    text-decoration: underline;
}

/* ── Photos modal (overview logistics) ──────────────────────────────────── */
.logistics-photos-btn {
    all: unset;
    cursor: pointer;
    display: grid;
    gap: 0.18rem;
    min-height: 56px;
    padding: 0.45rem 0.55rem;
    border: 1px solid #f0cf86;
    border-radius: 14px;
    background: #fff8e8;
    text-align: center;
    box-sizing: border-box;
}

.logistics-photos-btn:hover {
    background: #fff0c0;
    border-color: #d4a800;
}

.logistics-photos-btn strong {
    color: #607798;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.logistics-photos-btn em {
    color: #9a5b12;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.05;
}

.tutor-reminder-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.2rem 0.2rem;
    border-top: 1px dashed #d7e2ef;
    margin-top: 0.5rem;
}
.tutor-reminder-form {
    margin: 0;
}
.btn-tutor-reminder {
    background: #0d5fa6;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.btn-tutor-reminder:hover {
    background: #0a4d88;
}
.tutor-reminder-email {
    font-size: 0.78rem;
    color: #8fa0b4;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tutor-no-email-note {
    font-size: 0.78rem;
    color: #aab8c8;
    font-style: italic;
}

.photos-modal {
    border: none;
    border-radius: 18px;
    padding: 0;
    max-width: 400px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(10, 40, 80, 0.18);
}

.photos-modal::backdrop {
    background: rgba(10, 30, 60, 0.35);
    backdrop-filter: blur(2px);
}

.photos-modal-inner {
    display: grid;
    gap: 1rem;
    padding: 1.3rem 1.4rem;
}

.photos-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.photos-modal-head h4 {
    margin: 0;
    color: #0f2f52;
    font-size: 1rem;
    line-height: 1.25;
}

.photos-modal-close {
    all: unset;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    line-height: 1;
    color: #6a8aaa;
    border-radius: 50%;
    flex-shrink: 0;
}

.photos-modal-close:hover { background: #eef4fb; color: #0f2f52; }

.photos-modal-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.photos-modal-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: #fff8e8;
    border: 1px solid #f0d090;
    border-radius: 10px;
}

.photos-modal-list li strong { color: #0f2f52; font-size: 0.92rem; }

.photos-modal-list li span {
    color: #7a8a9a;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: auto;
}

.photos-modal-link { justify-self: start; font-size: 0.85rem; }

/* ── Admin overview v2 ───────────────────────────────────────────────────── */
.ov2-shell { display: flex; flex-direction: column; gap: 1.4rem; padding: 1.6rem 1.8rem; }

.ov2-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ov2-header h3 { margin: 0; font-size: 1.7rem; color: #0d2f52; }
.ov2-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.ov2-shortcut { padding: 0.45rem 1rem; border-radius: 8px; font-size: 0.83rem; font-weight: 700;
    background: #073d70; color: #fff; text-decoration: none; transition: background 120ms; }
.ov2-shortcut:hover { background: #0a52a0; }
.ov2-shortcut.outline { background: transparent; border: 1.5px solid #073d70; color: #073d70; }
.ov2-shortcut.outline:hover { background: #eaf3fb; }

/* KPI strip */
.ov2-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; }
.ov2-kpi { background: #fff; border: 1px solid #d6e8f7; border-radius: 14px; padding: 1rem 1.2rem;
    display: flex; flex-direction: column; gap: 0.2rem; }
.ov2-kpi strong { font-size: 1.55rem; font-weight: 800; color: #073d70; line-height: 1; }
.ov2-kpi span { font-size: 0.78rem; color: #607998; font-weight: 600; }

/* Alerts */
.ov2-alerts { background: #fff8ed; border: 1.5px solid #f5c060; border-radius: 14px; padding: 0.9rem 1.2rem; }
.ov2-alerts-label { font-size: 0.73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
    color: #a06010; margin: 0 0 0.6rem; }
.ov2-alert-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ov2-alert-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.85rem;
    border-radius: 20px; font-size: 0.82rem; font-weight: 700; text-decoration: none; transition: opacity 120ms; }
.ov2-alert-chip:hover { opacity: .82; }
.ov2-alert-chip strong { font-size: 1rem; }
.ov2-alert-chip.critical { background: #fde8e8; color: #b01c1c; border: 1.5px solid #f5a0a0; }
.ov2-alert-chip.warning  { background: #fff3cd; color: #8a5c00; border: 1.5px solid #f5c060; }
.ov2-alert-chip.neutral  { background: #eaf3fb; color: #1a4f80; border: 1.5px solid #b8d8f0; }

/* Donut charts */
.ov2-charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.ov2-requirement-list { margin: 0; padding-left: 1.05rem; color: #743e00; }
.ov2-requirement-list li + li { margin-top: .2rem; }
.ov2-pending-project small { display: block; margin-top: .2rem; color: #647887; }
.ov2-chart-card { background: #fff; border: 1px solid #d6e8f7; border-radius: 16px;
    padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: 1.1rem; }
.ov2-donut {
    --pct: 0; --clr: #073d70;
    width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%;
    background: conic-gradient(var(--clr) calc(var(--pct) * 1%), #e8f0f8 0);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.ov2-donut::after {
    content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #fff;
}
.ov2-donut span { position: relative; z-index: 1; font-size: 0.78rem; font-weight: 800; color: #0d2f52; }
.ov2-chart-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.ov2-chart-info strong { font-size: 0.95rem; color: #0d2f52; font-weight: 800; }
.ov2-chart-info p { font-size: 0.78rem; color: #4f6680; margin: 0; }
.ov2-chart-sub { font-size: 0.72rem; font-weight: 700; }
.ov2-chart-sub.ok   { color: #1d7a22; }
.ov2-chart-sub.warn { color: #a07020; }

/* Work grid */
.ov2-work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: start; }
.ov2-block { background: #fff; border: 1px solid #d6e8f7; border-radius: 16px; padding: 1.1rem 1.3rem;
    display: flex; flex-direction: column; gap: 0.8rem; }
.ov2-full { grid-column: 1 / -1; }
.ov2-block-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.ov2-block-head h4 { margin: 0; font-size: 0.95rem; color: #0d2f52; font-weight: 800; }
.ov2-block-link { font-size: 0.78rem; font-weight: 700; color: #0d5fa6; text-decoration: none; white-space: nowrap; }
.ov2-block-link:hover { text-decoration: underline; }
.ov2-block-count { font-size: 0.78rem; color: #607998; }
.ov2-empty { font-size: 0.82rem; color: #8aaecc; font-style: italic; margin: 0; }

/* Tables inside blocks */
.ov2-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.ov2-table th { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
    color: #607998; padding: 0.3rem 0.4rem; border-bottom: 1.5px solid #e0edf7; text-align: left; }
.ov2-table td { padding: 0.45rem 0.4rem; border-bottom: 1px solid #f0f5fa; color: #1a3a5a; vertical-align: middle; }
.ov2-table tr:last-child td { border-bottom: none; }

.ov2-pending-block {
    align-self: start;
}

.ov2-pending-block .ov2-table th:nth-child(2),
.ov2-pending-block .ov2-table td:nth-child(2) {
    width: 150px;
}

.ov2-pending-block .ov2-table th:nth-child(3),
.ov2-pending-block .ov2-table td:nth-child(3) {
    width: 70px;
    text-align: center;
}

.ov2-pending-block .ov2-mini-bar {
    width: 110px;
}

.ov2-pending-table td:first-child {
    min-width: 0;
}

.ov2-pending-project {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.ov2-pending-project > strong {
    color: #0d2f52;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

.ov2-pending-detail {
    display: grid;
    gap: 0.28rem;
}

.ov2-pending-scope {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.4rem;
}

.ov2-pending-scope .tag {
    min-width: 96px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.ov2-pending-scope small {
    color: #607998;
    line-height: 1.25;
}

/* Mini progress bar */
.ov2-mini-bar { height: 6px; background: #e0edf7; border-radius: 4px; width: 80px; margin-bottom: 2px; }
.ov2-mini-bar-fill { height: 100%; background: #1d7a22; border-radius: 4px; transition: width .3s; }

/* Attendance bars */
.ov2-attendance-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.ov2-att-row { display: flex; align-items: center; gap: 0.6rem; }
.ov2-att-label { font-size: 0.78rem; color: #4f6680; width: 90px; flex-shrink: 0; }
.ov2-bar-track { flex: 1; height: 10px; background: #e8f0f8; border-radius: 6px; overflow: hidden; }
.ov2-bar-fill { height: 100%; border-radius: 6px; transition: width .4s; }
.ov2-bar-fill.confirmed { background: #1d7a22; }
.ov2-bar-fill.pending   { background: #e0a020; }
.ov2-bar-fill.rejected  { background: #c03030; }
.ov2-att-row > strong { font-size: 0.88rem; color: #0d2f52; width: 24px; text-align: right; flex-shrink: 0; }

/* Logistics chips */
.ov2-logistics-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.ov2-req-chip { display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 12px; padding: 0.7rem 0.5rem; text-align: center; gap: 0.15rem; border: 1.5px solid; }
.ov2-req-chip.ok  { background: #f0fff4; border-color: #b7e4c0; }
.ov2-req-chip.bad { background: #fff4f4; border-color: #f5b0b0; }
.ov2-req-chip strong { font-size: 1.3rem; font-weight: 800; }
.ov2-req-chip.ok  strong { color: #1d7a22; }
.ov2-req-chip.bad strong { color: #b01c1c; }
.ov2-req-chip span { font-size: 0.7rem; font-weight: 700; color: #607998; }

@media (max-width: 800px) {
    .ov2-shell { padding: 1rem; gap: 1rem; }
    .ov2-logistics-chips { grid-template-columns: repeat(2, 1fr); }
    .ov2-charts-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .ov2-charts-row { grid-template-columns: 1fr; }
    .ov2-work-grid { grid-template-columns: 1fr; }
    .ov2-logistics-chips { grid-template-columns: repeat(2, 1fr); }
}

/* ── Public: search project for revision ────────────────────────────────── */
.search-revision-form {
    background: #f7fbff;
    border: 1px solid #d0e4f4;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
}

.search-revision-field {
    display: grid;
    gap: 0.4rem;
}

.search-revision-field label {
    font-weight: 700;
    color: #1a3a5c;
    font-size: 0.95rem;
}

.search-revision-input-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.search-revision-input-row input[type="search"] {
    flex: 1 1 240px;
    border: 1.5px solid #b0ccе4;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    color: #1a3a5c;
    background: #ffffff;
    min-width: 0;
}

.search-revision-field small {
    color: #6a8299;
    font-size: 0.82rem;
}

.search-revision-count {
    margin: 0 0 0.75rem;
    color: #344e6a;
    font-size: 0.92rem;
}

.search-revision-results { display: grid; gap: 0.9rem; }

.search-revision-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #d0e4f4;
    border-radius: 14px;
    background: #ffffff;
    padding: 1rem 1.1rem;
}

.search-revision-project-info { display: grid; gap: 0.3rem; }

.search-revision-project-info h3 {
    margin: 0;
    color: #0f2f52;
    font-size: 1rem;
}

.search-revision-team {
    margin: 0;
    color: #5d7693;
    font-size: 0.85rem;
    font-weight: 700;
}

.search-revision-members {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.45rem;
    margin-top: 0.2rem;
}

.search-revision-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f0f5fa;
    border: 1px solid #c8d8ea;
    color: #3a5a78;
}

.search-revision-member-chip.match {
    background: #e6f3ff;
    border-color: #80b8e8;
    color: #0a3a70;
    font-weight: 800;
}

.search-revision-member-chip em {
    font-style: normal;
    opacity: 0.65;
    font-size: 0.72rem;
}

.search-revision-card-action {
    display: grid;
    gap: 0.4rem;
    text-align: center;
    min-width: 160px;
}

.search-revision-pending-badge {
    display: inline-block;
    background: #fff8e8;
    border: 1px solid #f0d090;
    color: #8a5500;
    border-radius: 20px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-revision-pending-note {
    margin: 0;
    font-size: 0.78rem;
    color: #7a6020;
}

.member-edit-search-action {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0;
    border-top: 1px solid #e8eef4;
}
.member-edit-search-action:first-child { border-top: none; }
.member-edit-search-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #2a4a7a;
}

.search-revision-empty {
    background: #f7f9fc;
    border: 1px solid #d0dde8;
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    color: #3a5070;
}

.search-revision-empty p { margin: 0 0 0.4rem; }
.search-revision-empty p:last-child { margin: 0; }

@media (max-width: 640px) {
    .search-revision-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-revision-card-action {
        min-width: unset;
        text-align: left;
    }
}

/* ── Public: doc-revision page ───────────────────────────────────────────── */
.doc-revision-back {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.doc-revision-back:hover { text-decoration: underline; }

.doc-revision-pending-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff8e8;
    border: 1px solid #f0d090;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
}

.doc-revision-pending-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.doc-revision-pending-notice strong {
    display: block;
    color: #7a4d00;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.doc-revision-pending-notice p { margin: 0; color: #7a5010; }

.doc-revision-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.doc-revision-info-card {
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    background: #f7fbff;
    padding: 1rem 1.1rem;
}

.doc-revision-info-card h4 { margin: 0 0 0.6rem; color: #0f2f52; }

.doc-revision-info-card ol,
.doc-revision-info-card ul {
    margin: 0;
    padding-left: 1.3rem;
    color: #344e6a;
    font-size: 0.9rem;
    display: grid;
    gap: 0.3rem;
}

.doc-revision-form {
    border: 1px solid #d7e3ef;
    border-radius: 14px;
    background: #ffffff;
    padding: 1.4rem 1.5rem;
}

.doc-revision-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.1rem;
}

.doc-revision-form legend {
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #607798;
    margin-bottom: 1rem;
}

.doc-revision-form .form-field {
    display: grid;
    gap: 0.35rem;
}

.doc-revision-form label {
    font-weight: 700;
    color: #1a3a5c;
    font-size: 0.92rem;
}

.doc-revision-form label .required { color: #c0392b; }

.doc-revision-form select,
.doc-revision-form textarea,
.doc-revision-form input[type="file"] {
    border: 1px solid #c7d9ed;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    color: #1a3a5c;
    background: #f8fbff;
    width: 100%;
    box-sizing: border-box;
}

.doc-revision-form textarea { resize: vertical; min-height: 80px; }

.doc-revision-form small { color: #6a8299; font-size: 0.8rem; }

.doc-revision-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.3rem;
    flex-wrap: wrap;
}

.project-action-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.6rem 1.3rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-block;
}

.project-action-secondary:hover { background: #eaf3ff; }

.doc-revision-cta-card { border-color: #b9d9f0; background: #f0f8ff; }

/* ── Public: revision history ────────────────────────────────────────────── */
.doc-revision-history { margin-top: 0.5rem; }

.doc-revision-history h3 { margin: 0 0 0.85rem; color: #1a3a5c; font-size: 1.05rem; }

.doc-revision-history-list { display: grid; gap: 0.65rem; }

.doc-revision-history-card {
    border: 1px solid #d7e3ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.9rem 1rem;
    display: grid;
    gap: 0.4rem;
}

.doc-revision-history-card.aprobado { border-color: #b0ddb0; background: #f3fff5; }
.doc-revision-history-card.rechazado { border-color: #e5b0b0; background: #fff5f5; }

.doc-revision-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.doc-revision-status-badge {
    padding: 0.18rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #e8f0ff;
    color: #1a3a7a;
    border: 1px solid #b5ceee;
}

.doc-revision-status-badge.aprobado { background: #e2f9e2; color: #1a6a1a; border-color: #90d990; }
.doc-revision-status-badge.rechazado { background: #ffe8e8; color: #8a1a1a; border-color: #e09090; }

.doc-revision-history-date { color: #7a9ab5; font-size: 0.82rem; margin-left: auto; }

.doc-revision-history-justification { margin: 0; color: #344e6a; font-size: 0.9rem; }

.doc-revision-history-admin-note {
    margin: 0;
    font-size: 0.85rem;
    color: #7a1a1a;
    background: #fff0f0;
    border-left: 3px solid #e09090;
    padding: 0.35rem 0.6rem;
    border-radius: 0 6px 6px 0;
}

/* ── Admin: pending document revisions section ───────────────────────────── */
.doc-revision-admin-section {
    margin-bottom: 1.5rem;
    border: 2px solid #f0d090;
    border-radius: 18px;
    background: #fffdf5;
    padding: 1.1rem 1.2rem;
}

.doc-revision-admin-list { display: grid; gap: 1rem; margin-top: 0.75rem; }

.doc-revision-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    background: #ffffff;
    border: 1px solid #e8d8a0;
    border-radius: 14px;
    padding: 1rem 1.1rem;
}

.doc-revision-admin-main { display: grid; gap: 0.4rem; }

.doc-revision-admin-main .maintenance-kicker {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #8a6000;
}

.doc-revision-admin-by { margin: 0; font-size: 0.85rem; color: #5a5a5a; }

.doc-revision-admin-justification {
    margin: 0;
    color: #2a3a5a;
    font-size: 0.9rem;
    border-left: 3px solid #c8a030;
    padding: 0.3rem 0.6rem;
    background: #fffbf0;
    border-radius: 0 6px 6px 0;
}

.doc-revision-prev-link,
.doc-revision-new-link {
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.doc-revision-new-link { background: #eaf6ff; border-color: #90c8f0; color: #0a4a7a; }

.doc-revision-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 160px;
}

/* ── Member edit request: diff table ─────────────────────────────────────── */
.member-edit-diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-top: 0.4rem;
    border-radius: 8px;
    overflow: hidden;
}
.member-edit-diff-table thead th {
    background: #f0f4fa;
    color: #3a5a7a;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #d0dde8;
}
.member-edit-diff-table td {
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid #eef0f4;
    vertical-align: top;
}
.member-edit-diff-table .diff-old { color: #b03030; text-decoration: line-through; }
.member-edit-diff-table .diff-new { color: #1a7a3a; font-weight: 600; }
.member-edit-diff-changed td:first-child { color: #3a5a7a; font-weight: 600; }

/* ── Member edit: public form ────────────────────────────────────────────── */
.member-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.8rem 1.2rem;
}
.member-edit-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    background: #f4f8ff;
    border-radius: 10px;
    border: 1px solid #d0ddf0;
}
.member-edit-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #2a4a7a;
    cursor: pointer;
}
.member-edit-current-data {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.25rem;
    font-size: 0.85rem;
}
.member-edit-link {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

.doc-revision-reject-form {
    display: grid;
    gap: 0.4rem;
}

.doc-revision-reject-notes {
    border: 1px solid #d0c0a0;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
    resize: vertical;
    min-height: 52px;
    background: #fffff8;
    width: 100%;
    box-sizing: border-box;
}

.approve-btn { background: #e6f7e6; border-color: #80c880; color: #1a5a1a; }
.approve-btn:hover { background: #c8eec8; }
.reject-btn { border-color: #d0a0a0; color: #8a1a1a; }
.reject-btn:hover { background: #fff0f0; }

@media (max-width: 760px) {
    .doc-revision-admin-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .doc-revision-admin-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: unset;
    }

    .doc-revision-reject-form {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* ── Overview logistics panel head ───────────────────────────────────────── */
.overview-metric-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.overview-reminder-btn {
    white-space: nowrap;
    font-size: 0.78rem;
    flex-shrink: 0;
}

/* ── Logistics reminder page ─────────────────────────────────────────────── */
.reminder-send-bar {
    background: var(--primary-soft);
    border: 1px solid #b8d8eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.reminder-send-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.projects-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.gmail-setup-guide {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #d7e2ef;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f5f9fd);
}

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

.smtp-summary-grid .smtp-email-summary {
    grid-column: span 2;
}

.gmail-setup-guide p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.gmail-setup-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff0ef;
    color: #c5221f;
    font-size: 1.25rem;
    font-weight: 900;
}

.gmail-config-note {
    padding: 0.75rem 0.85rem;
    border: 1px solid #b8d8eb;
    border-radius: 10px;
    background: #eef8fc;
    color: var(--primary);
    font-size: 0.86rem;
}

.gmail-config-note[hidden],
.smtp-custom-fields[hidden] {
    display: none;
}

.projects-reminder-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.projects-reminder-link svg {
    width: 17px;
    height: 17px;
}

.reminder-logo-email-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.15fr);
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid #b8d8eb;
    border-radius: 16px;
    background: #fff;
}

.reminder-logo-email-card h4,
.reminder-logo-email-card p {
    margin: 0;
}

.reminder-logo-email-card h4 {
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.reminder-logo-email-card > div > p:last-child {
    color: var(--muted);
    font-size: 0.86rem;
}

.reminder-logo-email-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
}

.reminder-logo-email-form label {
    display: grid;
    gap: 0.3rem;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.reminder-logo-email-form input {
    width: 100%;
}

.reminder-command-center {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.6fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid #b8d8eb;
    border-radius: 16px;
    background:
        radial-gradient(circle at 95% 5%, rgba(133, 196, 70, 0.16), transparent 34%),
        linear-gradient(135deg, #f4faff, #edf6fc);
}

.reminder-command-copy {
    display: grid;
    gap: 0.25rem;
}

.reminder-command-copy h4,
.reminder-command-copy p {
    margin: 0;
}

.reminder-command-copy h4 {
    color: var(--primary);
    font-size: 1.15rem;
}

.reminder-command-copy p {
    color: var(--muted);
    font-size: 0.86rem;
}

.reminder-batch-progress {
    display: grid;
    gap: 0.45rem;
    padding: 0.8rem 1rem;
    border: 1px solid #b8d8eb;
    border-radius: 12px;
    background: #f7fbff;
}

.reminder-batch-progress[hidden] {
    display: none;
}

.reminder-batch-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--primary);
}

.reminder-batch-progress small {
    color: #607998;
}

.reminder-batch-track {
    height: 10px;
    border-radius: 999px;
    background: #dce9f3;
    overflow: hidden;
}

.reminder-batch-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1d8d47, #8dc63f);
    transition: width 0.25s ease;
}

.reminder-batch-progress.is-complete {
    border-color: #add8b8;
    background: #f1fbf4;
}

.reminder-batch-progress.has-error {
    border-color: #e8b7b7;
    background: #fff4f4;
}

.reminder-bulk-form {
    justify-content: flex-end;
    padding: 0.75rem;
    border: 1px solid rgba(126, 171, 207, 0.32);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.reminder-audience-field {
    display: grid;
    gap: 0.2rem;
    min-width: 245px;
    color: #4a6078;
    font-size: 0.78rem;
    font-weight: 700;
}

.reminder-audience-field select {
    min-height: 38px;
    background: #fff;
}

.reminder-deadline-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a6078;
}
.reminder-deadline-field input[type="date"] {
    border: 1px solid #b8cfe0;
    border-radius: 7px;
    padding: 0.32rem 0.6rem;
    font-size: 0.85rem;
    color: #123f6b;
    background: #fff;
    cursor: pointer;
}

.reminder-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.2rem;
    align-items: start;
}

.reminder-project-entry {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.6rem;
    background: #ffffff;
    display: grid;
    gap: 0.5rem;
}

.reminder-project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.reminder-project-head strong {
    font-size: 0.9rem;
    color: var(--primary);
}

.reminder-project-head > div:first-child {
    display: grid;
    gap: 0.16rem;
}

.reminder-project-head small {
    color: #607998;
    font-size: 0.75rem;
    font-weight: 650;
}

.reminder-project-recipient-tags {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.reminder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.reminder-member-rows {
    display: grid;
    gap: 0;
}

.reminder-member-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
    padding: 0.35rem 0;
    border-top: 1px solid var(--line);
}

.reminder-member-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.reminder-member-meta strong { color: var(--primary); font-size: 0.84rem; }

.reminder-individual { font-size: 0.75rem; color: var(--error-text); font-weight: 600; }

.reminder-no-email { opacity: 0.5; }

.reminder-email-tag {
    font-size: 0.72rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.reminder-project-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
}

.reminder-project-actions button {
    width: auto;
    min-height: 36px;
    padding: 0.42rem 0.75rem;
}

.reminder-preview-col {
    position: sticky;
    top: 0.75rem;
}

.reminder-preview-panel {
    margin-bottom: 0.65rem;
    border: 1px solid #d7e2ef;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.reminder-preview-panel > summary {
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    color: var(--primary);
    font-weight: 800;
    background: #f4f8fc;
}

.reminder-preview-panel[open] > summary {
    border-bottom: 1px solid #d7e2ef;
}

.reminder-preview-panel .reminder-email-iframe {
    border: 0;
    border-radius: 0;
}

.reminder-email-iframe {
    width: 100%;
    min-height: 520px;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: block;
    background: #f6f9fd;
}

@media (max-width: 900px) {
    .smtp-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reminder-logo-email-card,
    .reminder-command-center,
    .reminder-two-col {
        grid-template-columns: 1fr;
    }

    .reminder-preview-col {
        position: static;
    }
}

@media (max-width: 640px) {
    .smtp-summary-grid {
        grid-template-columns: 1fr;
    }

    .smtp-summary-grid .smtp-email-summary {
        grid-column: auto;
    }

    .gmail-setup-guide {
        grid-template-columns: auto 1fr;
    }

    .gmail-setup-guide .outline-btn {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .projects-header-actions,
    .projects-reminder-link {
        width: 100%;
    }

    .projects-header-actions {
        align-items: stretch;
    }

    .projects-reminder-link {
        justify-content: center;
    }

    .reminder-logo-email-form {
        grid-template-columns: 1fr;
    }

    .reminder-logo-email-form button {
        width: 100%;
    }

    .reminder-bulk-form,
    .reminder-project-head,
    .reminder-project-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .reminder-audience-field {
        min-width: 0;
    }

    .reminder-project-recipient-tags {
        justify-content: flex-start;
    }

    .reminder-project-actions button {
        width: 100%;
    }
}

/* ── Evaluations redesign (ev2) ──────────────────────────────────────────── */

.ev2-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ev2-tracking-head {
    flex-wrap: nowrap;
}

.ev2-tracking-head .ev2-filter-row {
    margin-left: auto;
    flex-wrap: nowrap;
}

.ev2-tracking-head .ev2-filter-input {
    width: min(350px, 32vw);
    min-width: 240px;
}

.ev2-tracking-head .ghost-btn,
.ev2-tracking-head .ov2-block-count {
    flex-shrink: 0;
}

.ev2-tracking-head .ov2-block-count {
    min-width: 130px;
    text-align: right;
    white-space: nowrap;
}

.ev2-filter-input {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.83rem;
    background: #fff;
    min-width: 200px;
    color: var(--primary);
}

.ev2-winners-block {
    grid-column: 1 / -1;
}

.ev2-english-chart {
    border-color: #bfdaf0;
}

.ev2-winner-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.ev2-winner-card {
    flex: 1 1 200px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ev2-winner-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ev2-winner-cat-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.ev2-winner-cat-count {
    font-size: 0.7rem;
    color: #999;
}

.ev2-winner-top,
.ev2-winner-runner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ev2-rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ev2-rank-1 { background: #ffe566; color: #5a3e00; }
.ev2-rank-2 { background: #e0e0e0; color: #555; }

.ev2-winner-detail {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ev2-winner-detail strong {
    font-size: 0.88rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ev2-winner-detail span {
    font-size: 0.73rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ev2-winner-detail small {
    font-size: 0.82rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ev2-score {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1d7a22;
    white-space: nowrap;
    flex-shrink: 0;
}

.ev2-score-sm {
    font-size: 0.88rem;
    font-weight: 700;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Summary row in accordion */
.ev2-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    cursor: pointer;
    list-style: none;
}

.ev2-summary-metrics {
    display: flex;
    gap: 1.1rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

.ev2-metric {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 60px;
}

.ev2-metric small {
    font-size: 0.68rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ev2-metric strong {
    font-size: 0.9rem;
    color: var(--primary);
}

.ev2-metric-final strong {
    font-size: 1rem;
    color: #1d7a22;
    font-weight: 800;
}

.ev2-metric-bar {
    min-width: 110px;
}

.ev2-pct-label {
    font-size: 0.72rem;
    color: #888;
}

.ev2-score-val { color: #1d7a22; }
.ev2-score-nd  { color: #bbb; font-weight: 400; font-size: 0.82rem; }

@media (max-width: 800px) {
    .ev2-summary-metrics { gap: 0.6rem; }
    .ev2-winner-list { flex-direction: column; }
    .ev2-tracking-head { flex-wrap: wrap; }
    .ev2-tracking-head h4 { margin-right: auto; }
    .ev2-tracking-head .ev2-filter-row { order: 3; width: 100%; margin-left: 0; }
    .ev2-tracking-head .ev2-filter-input { flex: 1; min-width: 0; width: auto; }
    .ev2-tracking-head .ov2-block-count { min-width: 0; }
    .ev2-filter-input { min-width: 140px; }
}

/* ev2 — ancho fijo para columna de titulo en cards de seguimiento */
.ev2-summary .project-tracking-main {
    width: 260px;
    min-width: 160px;
    max-width: 260px;
    flex-shrink: 0;
}

.ev2-summary .project-tracking-main strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ev2-summary .project-tracking-main span {
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .ev2-summary .project-tracking-main {
        width: 100%;
        max-width: 100%;
    }
    .ev2-summary .project-tracking-main strong {
        white-space: normal;
    }
}

/* ── Overview logistics compact summary ─────────────────────────────────── */
.ov2-block-head-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ov2-log-progress-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.6rem 0 0.5rem;
}

.ov2-log-bar {
    flex: 1;
    height: 8px;
    border-radius: 6px;
}

.ov2-log-progress-label {
    font-size: 0.78rem;
    color: #607998;
    white-space: nowrap;
    flex-shrink: 0;
}

.ov2-log-mini-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
    margin-top: 0.55rem;
}

.ov2-log-item {
    font-size: 0.78rem;
    color: #607998;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.ov2-log-item strong {
    font-size: 0.86rem;
    font-weight: 800;
}

.ov2-log-item.ok strong { color: #1d7a22; }
.ov2-log-item.bad strong { color: #b01c1c; }

.ov2-log-download {
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.ov2-log-download:hover,
.ov2-log-download:focus-visible {
    color: #8f1818;
    background: #fff0f0;
    text-decoration: underline;
}

.ov2-log-cta {
    display: inline-block;
    margin-top: 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0d5fa6;
    text-decoration: none;
}

.ov2-log-cta:hover { text-decoration: underline; }

/* Admin navigation stays fixed; only the content pane scrolls. */
body.admin-page {
    overflow: hidden;
}

body.admin-page .container {
    height: calc(100dvh - var(--fixed-header-height, 96px));
    overflow: hidden;
    padding-bottom: 0.5rem;
}

body.admin-page .admin-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.admin-page .admin-shell > .admin-sidebar {
    position: static !important;
    top: auto !important;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow: hidden;
}

body.admin-page .admin-shell > .admin-sidebar .admin-menu {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 0.16rem;
    padding-right: 0.18rem;
    padding-bottom: 1.35rem;
}

body.admin-page .admin-menu-group {
    margin: 0.28rem 0 0.05rem;
    padding: 0.1rem 0.55rem;
    font-size: 0.68rem;
}

body.admin-page .admin-menu a {
    min-height: 32px;
    padding: 0.34rem 0.55rem;
    font-size: 0.92rem;
    line-height: 1.05;
}

body.admin-page .admin-menu-icon {
    width: 0.82rem;
    height: 0.82rem;
}

body.admin-page .admin-sidebar-top h2 {
    font-size: 1.35rem;
    line-height: 1.1;
}

body.admin-page .admin-sidebar-top p {
    margin-bottom: 0.35rem;
}

body.admin-page .admin-main {
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
    padding-bottom: 0.75rem;
}

body.admin-page .site-footer {
    display: none;
}

/* Portal de colegios: navegación compacta y proyectos en tarjetas. */
body.school-portal-page .admin-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

body.school-portal-page .admin-sidebar {
    top: 1rem;
    padding: 1.15rem;
    border-radius: 20px;
    background: #f5f9fc;
    box-shadow: 0 12px 30px rgba(23, 54, 75, 0.06);
}

body.school-portal-page .admin-sidebar-top {
    padding: 0.2rem 0.25rem 1rem;
    border-bottom: 1px solid #dbe6ed;
}

body.school-portal-page .admin-sidebar-top h2 {
    font-size: 1.32rem;
    line-height: 1.2;
}

body.school-portal-page .admin-menu {
    gap: 0.35rem;
    padding-top: 0.8rem;
}

body.school-portal-page .admin-menu a {
    padding: 0.72rem 0.8rem;
    border-radius: 10px;
}

body.school-portal-page .admin-menu a:hover {
    background: #e6f1f7;
    border-color: #c5dce8;
}

.school-dashboard-hero {
    padding: 1.25rem 1.4rem;
    border-radius: 18px;
}

.school-dashboard-hero h3 {
    margin: 0.1rem 0 0.35rem;
    font-size: 1.65rem;
}

.school-dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.school-dashboard-actions > * {
    min-height: 44px;
    margin: 0;
}

.school-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    gap: 1rem;
}

.school-project-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(23, 54, 75, 0.07);
}

.school-project-card-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
}

.school-project-mark {
    display: grid;
    place-items: center;
    width: 48px;
    aspect-ratio: 1;
    border-radius: 13px;
    background: #e4f1f7;
    color: #174d68;
    font-weight: 900;
}

.school-project-title span,
.school-project-title p,
.school-project-meta span {
    color: var(--muted);
    font-size: 0.82rem;
}

.school-project-title h3 {
    margin: 0.08rem 0;
    font-size: 1.3rem;
}

.school-project-title p {
    margin: 0;
}

.school-project-status {
    max-width: 190px;
    padding: 0.5rem 0.72rem;
    border: 1px solid #bfd7e3;
    border-radius: 999px;
    background: #edf5f8;
    color: #173f55;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.school-project-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid #dce6ec;
    border-radius: 14px;
    overflow: hidden;
}

.school-project-meta > div {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
    border-right: 1px solid #dce6ec;
}

.school-project-meta > div:last-child {
    border-right: 0;
}

.school-project-meta strong {
    font-size: 0.9rem;
}

.school-project-meta .is-ready { color: #287118; }
.school-project-meta .is-pending { color: #9a5b00; }

.school-project-card-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding-top: 0.9rem;
    border-top: 1px solid #e1e9ee;
}

.school-project-card-actions form { margin: 0; }
.school-project-card-actions .outline-btn,
.school-project-card-actions button { min-height: 42px; }

.project-maintenance-file {
    min-width: 0;
    padding: .85rem;
    border: 1px solid #d8e3ea;
    border-radius: 12px;
    background: #f8fbfc;
}
.project-maintenance-file > label { display: block; }
.project-maintenance-file small { display: block; margin-top: .55rem; color: #60737e; }
.project-maintenance-current,
.project-maintenance-preview { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .65rem; }
.project-maintenance-current label,
.project-maintenance-preview label { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: #8f2330; cursor: pointer; }
.project-maintenance-current a,
.project-maintenance-preview a { font-weight: 750; color: #215c7a; }
.project-maintenance-preview { justify-content: flex-start; }
.project-maintenance-preview img { width: 52px; height: 52px; object-fit: cover; border: 1px solid #cbdbe4; border-radius: 10px; background: #fff; }
.project-maintenance-preview > div { display: grid; gap: .35rem; }

.school-project-editor-shell { padding: 1.35rem; border-radius: 18px; }
.school-project-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.25rem; }
.school-project-editor-head h3 { margin: .1rem 0 .35rem; font-size: 1.55rem; }
.school-project-editor-head p:last-child { margin: 0; }
.school-project-editor { display: grid; gap: 1rem; }
.school-project-editor fieldset { min-width: 0; margin: 0; padding: 1rem; border: 1px solid #d8e4eb; border-radius: 14px; background: #fbfdfe; }
.school-project-editor legend { padding: 0 .45rem; color: #244b63; font-size: .9rem; font-weight: 850; }
.school-project-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.school-project-editor-grid .editor-span-2 { grid-column: 1 / -1; }
.school-project-editor label { color: #263f50; font-size: .86rem; font-weight: 750; }
.school-project-editor input,
.school-project-editor select,
.school-project-editor textarea { margin-top: .25rem; border-radius: 9px; }
.school-project-editor small { color: #657986; font-weight: 500; }
.school-student-editor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.school-student-editor { display: grid; gap: .7rem; min-width: 0; padding: .9rem; border: 1px solid #dce7ed; border-radius: 12px; background: #fff; }
.school-student-editor > span { color: #235773; font-size: .78rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.school-project-editor-actions { display: flex; justify-content: flex-end; align-items: center; gap: .7rem; padding-top: .2rem; }

.regional-requirements-blocked,
.regional-requirements-ready { padding: .85rem 1rem; border-radius: 12px; }
.regional-requirements-blocked { border: 1px solid #efb7bd; background: #fff1f2; color: #8f2230; }
.regional-requirements-ready { display: grid; gap: .2rem; border: 1px solid #b9daa8; background: #f1faec; color: #316d1d; }
.regional-requirements-blocked p { margin: .25rem 0; color: inherit; }
.regional-requirements-blocked ul { margin: .4rem 0 0; padding-left: 1.25rem; }
.regional-requirements-blocked li + li { margin-top: .25rem; }
.regional-requirements-ready span { color: #4c7240; }

.school-project-followup {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.school-project-empty {
    padding: 2rem;
    text-align: center;
}

@media (max-width: 900px) {
    body.school-portal-page .admin-shell { grid-template-columns: 1fr; }
    body.school-portal-page .admin-sidebar { position: static; }
    .school-project-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .school-project-meta > div:nth-child(2) { border-right: 0; }
    .school-project-meta > div:nth-child(-n+2) { border-bottom: 1px solid #dce6ec; }
    .school-student-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .school-project-editor-head { display: grid; gap: .8rem; }
    .school-project-editor-grid { grid-template-columns: 1fr; }
    .school-project-editor-grid .editor-span-2 { grid-column: auto; }
    .school-project-editor-actions { display: grid; }
    .school-project-editor-actions > * { width: 100%; text-align: center; }
    .school-project-card-head { grid-template-columns: 42px minmax(0, 1fr); }
    .school-project-status { grid-column: 1 / -1; max-width: none; }
    .school-project-meta { grid-template-columns: 1fr; }
    .school-project-meta > div { border-right: 0; border-bottom: 1px solid #dce6ec; }
    .school-project-card-actions > * { width: 100%; }
    .school-project-card-actions button,
    .school-project-card-actions .outline-btn { width: 100%; text-align: center; }
}

@media (max-width: 900px) {
    body.admin-page .container {
        height: calc(100dvh - var(--fixed-header-height, 68px));
    }

    body.admin-page .admin-sidebar {
        z-index: 1200;
    }
}
.requirements-summary-tags,
.requirements-requested-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tutors-summary-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 1rem 0;
}

.tutors-summary-grid article {
    background: #f8fbff;
    border: 1px solid #d7e5f1;
    border-radius: 13px;
    display: grid;
    gap: .15rem;
    padding: .8rem .9rem;
}

.tutors-summary-grid article.has-pending {
    background: #fffaf0;
    border-color: #efd695;
}

.tutors-summary-grid span,
.tutors-summary-grid small {
    color: #60758a;
    font-size: .78rem;
    font-weight: 700;
}

.tutors-summary-grid strong {
    color: var(--primary);
    font-size: 1.65rem;
}

.tutors-filter-bar {
    align-items: end;
    background: #f3f8fd;
    border: 1px solid #d7e5f1;
    border-radius: 13px;
    display: grid;
    gap: .7rem;
    grid-template-columns: minmax(240px, 1fr) minmax(170px, .35fr) auto auto;
    margin-bottom: 1rem;
    padding: .8rem;
}

.tutors-filter-bar label span {
    color: #53708d;
    display: block;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.tutors-filter-bar > strong {
    align-self: center;
    color: #53708d;
    white-space: nowrap;
}

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

.tutor-card {
    background: #fff;
    border: 1px solid #d8e5ef;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(18, 63, 107, .06);
    display: grid;
    gap: .65rem;
    padding: .9rem;
}

.tutor-card-head {
    align-items: center;
    display: grid;
    gap: .7rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

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

.tutor-card-head p {
    color: #6a7f92;
    font-size: .82rem;
    margin-top: .12rem;
}

.tutor-avatar {
    align-items: center;
    background: linear-gradient(145deg, #dceffa, #eaf6df);
    border-radius: 12px;
    color: #0d527d;
    display: flex;
    font-size: 1.25rem;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

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

.tutor-contact-grid span {
    color: #445f77;
    font-size: .82rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.tutor-contact-grid b {
    color: #75889a;
    display: block;
    font-size: .68rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tutor-metrics {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tutor-metrics span {
    align-items: center;
    background: #f3f8fc;
    border: 1px solid #dce8f1;
    border-radius: 9px;
    color: #365b78;
    display: grid;
    font-size: .7rem;
    gap: .08rem;
    justify-items: center;
    line-height: 1.15;
    min-height: 50px;
    padding: .42rem .3rem;
    text-align: center;
}

.tutor-metrics span b {
    color: #123f6b;
    font-size: 1rem;
    line-height: 1;
}

.tutor-projects-detail {
    border-top: 1px solid #e3ebf2;
    padding-top: .65rem;
}

.tutor-projects-detail summary {
    color: var(--primary);
    cursor: pointer;
    font-weight: 800;
}

.tutor-projects-detail summary span {
    color: #668096;
    font-size: .8rem;
    margin-left: .25rem;
}

.tutor-project-list {
    display: grid;
    gap: .4rem;
    margin-top: .6rem;
}

.tutor-project-list a {
    align-items: center;
    background: #f8fbfd;
    border: 1px solid #e0e9f0;
    border-radius: 9px;
    color: var(--primary);
    display: flex;
    gap: .6rem;
    justify-content: space-between;
    padding: .55rem .65rem;
    text-decoration: none;
}

.tutor-project-list small {
    color: #6b8093;
    display: block;
    margin-top: .12rem;
}

.tutor-card-actions {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: .15rem;
}

.tutor-card-actions .inline-form {
    display: block;
    margin: 0;
    width: 100%;
}

.tutor-card-actions button {
    align-items: center;
    display: inline-flex;
    font-size: .78rem;
    justify-content: center;
    line-height: 1.15;
    min-height: 40px !important;
    padding: .48rem .65rem !important;
    width: 100% !important;
}

@media (max-width: 1100px) {
    .tutors-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tutors-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .tutors-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tutors-filter-bar { grid-template-columns: 1fr; }
    .tutor-contact-grid { grid-template-columns: 1fr; }
    .tutor-card-head { grid-template-columns: auto minmax(0, 1fr); }
    .tutor-card-head > .tag { grid-column: 1 / -1; justify-self: start; }
    .tutor-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tutor-metrics span:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.requirements-responsibility-note {
    align-items: flex-start;
    background: #eef6ff;
    border: 1px solid #c9def2;
    border-radius: 12px;
    color: #173f63;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: 1rem 0;
    padding: .9rem 1rem;
}

.requirements-project-list {
    display: grid;
    gap: .85rem;
}

.requirements-project-card {
    background: #fff;
    border: 1px solid #dce6ee;
    border-left: 5px solid #d59a20;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(18, 55, 87, .06);
    padding: 1rem;
}

.requirements-project-card.is-complete {
    border-left-color: #27824b;
}

.requirements-project-main {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.requirements-project-main h4,
.requirements-project-main p {
    margin: .3rem 0 0;
}

.requirements-requested-list {
    margin-top: .85rem;
}

.requirement-pill {
    background: #edf4f8;
    border-radius: 999px;
    color: #214a68;
    font-size: .82rem;
    font-weight: 700;
    padding: .42rem .68rem;
}

.requirement-pill.resources {
    background: #fff4cf;
    color: #6e5300;
}

.requirements-missing {
    color: #8a421f;
    font-size: .86rem;
    margin: .8rem 0 0;
}

.requirements-manage-btn {
    margin-top: .85rem;
}

.requirements-items-summary {
    margin-top: .9rem;
}

.requirements-items-summary > strong {
    color: #234b6b;
    display: block;
    font-size: .78rem;
    letter-spacing: .04em;
    margin-bottom: .45rem;
    text-transform: uppercase;
}

.requirements-items-table {
    display: grid;
    gap: .4rem;
}

.requirements-item-summary {
    align-items: center;
    background: #f8fbfd;
    border: 1px solid #dce8f0;
    border-radius: 10px;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(100px, .35fr) minmax(200px, 1.5fr) auto;
    padding: .65rem .75rem;
}

.requirements-item-summary.is-pending {
    background: #fffaf0;
    border-color: #efd695;
}

.requirements-item-summary small {
    color: #60758a;
    display: block;
    margin-top: .15rem;
}

.requirements-item-quantity {
    color: #174d74;
    font-weight: 850;
}

.requirements-detail-editor {
    background: #f7fbfe;
    border: 1px solid #d4e5f2;
    border-radius: 12px;
    margin-top: 1rem;
    padding: .9rem;
}

.requirements-admin-items {
    display: grid;
    gap: .65rem;
    margin-top: .7rem;
}

.requirements-admin-item {
    align-items: end;
    background: #fff;
    border: 1px solid #dce7ef;
    border-radius: 10px;
    display: grid;
    gap: .55rem;
    grid-template-columns: minmax(150px, 1.25fr) minmax(75px, .45fr) minmax(90px, .55fr) minmax(150px, 1fr) auto auto;
    padding: .7rem;
}

.requirements-item-confirm {
    align-items: center;
    display: flex;
    gap: .35rem;
    min-height: 42px;
}

.requirements-add-item {
    margin-top: .75rem;
}

.requirements-dialog-card {
    max-width: 820px;
}

.requirements-empty-request {
    background: #f2f6f8;
    border-radius: 10px;
    color: #526779;
    margin: .8rem 0;
    padding: .85rem;
}

@media (max-width: 650px) {
    .requirements-project-main {
        flex-direction: column;
    }

    .requirements-manage-btn {
        width: 100%;
    }

    .requirement-items-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .requirement-item-row,
    .requirements-admin-item,
    .requirements-item-summary {
        grid-template-columns: 1fr;
    }
}
/* Regional institutions workspace */
.institutions-page { display: grid; gap: 1rem; min-width: 0; }
.institutions-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.institutions-hero h3, .institution-card h3 { margin: 0; }
.institutions-hero-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.institutions-primary { white-space: nowrap; }
.institution-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.institution-form-grid label { min-width: 0; font-size: .84rem; font-weight: 750; color: #294457; }
.institution-form-grid input:not([type="checkbox"]), .institution-form-grid select { width: 100%; min-height: 44px; margin-top: .35rem; font-size: .95rem; }
.institution-form-grid label > span { color: #b42318; }
.institution-field-wide { grid-column: span 2; }
.institutions-list { display: grid; gap: 1rem; min-width: 0; }
.institution-card { padding: 0; overflow: hidden; }
.institution-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--border-color, #d8e0e5); }
.institution-identity { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.institution-identity h3 { font-size: 1.15rem; }
.institution-identity p { margin: .2rem 0 0; color: var(--muted, #5c6b73); }
.institution-code { display: inline-grid; place-items: center; min-width: 4.5rem; min-height: 2.7rem; padding: .35rem .65rem; border-radius: .65rem; background: #e8f0f5; color: #17384a; font-weight: 800; }
.institution-shield { width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; padding: 4px; border: 1px solid #d5e0e6; border-radius: 12px; background: #fff; }
.institution-shield-preview { display: grid; place-items: center; min-height: 190px; padding: 1rem; border: 1px dashed #bdced8; border-radius: 14px; background: #f7fafb; }
.institution-shield-preview img { width: min(220px, 60vw); height: 180px; object-fit: contain; }
.school-profile-shield { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #d4e1e7; border-radius: 14px; background: #f6fafb; }
.school-profile-shield > img, .school-profile-shield > span { display: grid; place-items: center; width: 92px; height: 92px; flex: 0 0 92px; object-fit: contain; padding: 6px; border: 1px solid #cedce3; border-radius: 14px; background: #fff; color: #24566f; font-weight: 850; }
.school-profile-shield > label { flex: 1; }
.institution-facts { display: grid; grid-template-columns: 2fr 1.25fr .65fr .75fr; gap: 0; }
.institution-facts > div { display: grid; align-content: start; gap: .2rem; padding: 1rem 1.25rem; border-right: 1px solid var(--border-color, #d8e0e5); min-width: 0; }
.institution-facts > div:last-child { border-right: 0; }
.institution-facts span { color: var(--muted, #5c6b73); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.institution-facts strong, .institution-facts small { overflow-wrap: anywhere; }
.institution-actions { display: flex; align-items: center; gap: .65rem; padding: .85rem 1.25rem; background: #f7fafc; border-top: 1px solid var(--border-color, #d8e0e5); flex-wrap: wrap; }
.institution-toggle-form { margin-left: auto; }
dialog.maintenance-dialog.institution-dialog { width: min(760px, calc(100vw - 2rem)) !important; border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 28px 80px rgba(13, 35, 49, .28); }
dialog.maintenance-dialog.institution-dialog-small { width: min(540px, calc(100vw - 2rem)) !important; }
.institution-dialog::backdrop { background: rgba(17, 36, 49, .62); backdrop-filter: blur(2px); }
.institution-dialog .dialog-card { gap: 1.15rem; padding: 1.35rem 1.5rem 1.5rem; max-height: min(86vh, 760px); overflow-y: auto; }
.institution-dialog .dialog-head { align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid #dce5ea; }
.institution-dialog .dialog-head h4 { color: #15384d; font-size: 1.25rem; line-height: 1.2; }
.institution-dialog .dialog-head p { margin: .3rem 0 0; color: #647681; font-size: .9rem; }
.institution-dialog .dialog-close { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; min-width: 2.25rem; padding: 0; border-radius: 50%; font-size: 1.35rem; }
.institution-dialog .actions-row { justify-content: flex-end; grid-column: 1 / -1; margin-top: .25rem; padding-top: 1rem; border-top: 1px solid #e2e9ed; }
.institution-platform-option { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1px solid #cbdbe5; border-radius: 12px; background: #f5f9fb; cursor: pointer; }
.institution-platform-option:has(input:checked) { border-color: #397493; background: #edf7fb; box-shadow: inset 0 0 0 1px #397493; }
.institution-platform-option input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; accent-color: #245c78; }
.institution-platform-option span { display: grid; gap: .15rem; color: #17384a !important; }
.institution-platform-option small { color: #60737e; font-weight: 500; line-height: 1.35; }
.institution-credentials-list { margin-top: 1rem; }
.institution-credential { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid #e4eaee; }
.institution-credential span { display: grid; }
.institutions-empty { padding: 3rem; text-align: center; }
@media (max-width: 1100px) {
  .institution-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .institution-facts > div:nth-child(2) { border-right: 0; }
  .institution-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--border-color, #d8e0e5); }
}

/* Regional project review workspace */
.regional-review-page { display: grid; gap: 1rem; min-width: 0; }
.regional-review-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.35rem 1.5rem; }
.regional-review-hero h2 { margin: .1rem 0 .35rem; color: #15384d; }
.regional-review-hero p { margin: 0; color: #60737e; }
.regional-review-count { display: grid; min-width: 130px; padding: .8rem 1rem; border-radius: 14px; background: #eaf3f7; text-align: center; }
.regional-review-count strong { color: #174b66; font-size: 1.55rem; }
.regional-review-count span { color: #526c7a; font-size: .78rem; }
.regional-auto-rule { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #cddce4; border-radius: 14px; overflow: hidden; background: #f7fafb; }
.regional-auto-rule > div { display: grid; gap: .2rem; padding: .85rem 1rem; border-right: 1px solid #d8e3e8; }
.regional-auto-rule > div:last-child { border-right: 0; }
.regional-auto-rule strong { color: #214b61; font-size: .84rem; }
.regional-auto-rule span { color: #647883; font-size: .78rem; line-height: 1.35; }
.regional-project-list { display: grid; gap: 1rem; }
.regional-project-card { padding: 0; overflow: hidden; }
.regional-project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid #dbe5ea; }
.regional-project-school { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.regional-project-school > img, .regional-project-school > span { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; display: grid; place-items: center; padding: 4px; border: 1px solid #d4e0e6; border-radius: 12px; background: #f4f8fa; color: #24566f; font-size: .72rem; font-weight: 850; }
.regional-project-school small { color: #57717f; font-weight: 700; }
.regional-project-school h3 { margin: .1rem 0; color: #16394d; font-size: 1.12rem; }
.regional-project-school p { margin: 0; color: #657984; font-size: .88rem; }
.regional-status { padding: .45rem .7rem; border: 1px solid #bfd3dd; border-radius: 999px; background: #eef5f8; color: #28586f; font-size: .78rem; font-weight: 800; }
.regional-status-regional_winner { border-color: #c6a94a; background: #fff7d8; color: #765c08; }
.regional-status-evaluated { border-color: #82b899; background: #edf8f1; color: #24623c; }
.regional-project-body { display: grid; grid-template-columns: 1fr 1.25fr 1.15fr .75fr; }
.regional-project-data { display: grid; align-content: start; gap: .2rem; min-width: 0; padding: 1rem 1.25rem; border-right: 1px solid #e0e8ec; }
.regional-project-data:last-child { border-right: 0; }
.regional-project-data > span { color: #70828b; font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.regional-project-data strong { color: #213d4c; overflow-wrap: anywhere; }
.regional-project-data small { color: #657984; }
.regional-progress-track { height: 6px; margin-top: .3rem; overflow: hidden; border-radius: 99px; background: #dfe8ec; }
.regional-progress-track i { display: block; height: 100%; border-radius: inherit; background: #347b9b; }
.regional-project-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; padding: .8rem 1.25rem; border-top: 1px solid #dbe5ea; background: #f7fafb; }
.regional-project-action > div { display: grid; gap: .12rem; }
.regional-project-action strong { color: #23485c; }
.regional-project-action span { color: #657984; font-size: .83rem; }
.regional-winner-note strong { color: #765c08; }
@media (max-width: 900px) { .regional-auto-rule { grid-template-columns: 1fr; } .regional-auto-rule > div { border-right: 0; border-bottom: 1px solid #d8e3e8; } .regional-project-body { grid-template-columns: repeat(2, 1fr); } .regional-project-data:nth-child(2) { border-right: 0; } }
@media (max-width: 620px) { .regional-review-hero, .regional-project-head, .regional-project-action { align-items: stretch; flex-direction: column; } .regional-project-body { grid-template-columns: 1fr; } .regional-project-data { border-right: 0; border-bottom: 1px solid #e0e8ec; } }
@media (max-width: 680px) {
  .institutions-hero, .institution-card-header { align-items: stretch; flex-direction: column; }
  .institution-form-grid, .institution-facts { grid-template-columns: 1fr; }
  .institution-field-wide { grid-column: auto; }
  .institution-facts > div { border-right: 0; border-bottom: 1px solid var(--border-color, #d8e0e5); }
  .institution-toggle-form { margin-left: 0; width: 100%; }
}
