* {
    box-sizing: border-box;
}

:root {
    --site-primary: #087b68;
    --site-primary-hover: color-mix(in srgb, var(--site-primary) 78%, #000000);
    --site-primary-text: color-mix(in srgb, var(--site-primary) 64%, #000000);
    --site-primary-soft: color-mix(in srgb, var(--site-primary) 8%, #ffffff);
    --site-primary-border: color-mix(in srgb, var(--site-primary) 22%, #ffffff);
    --brand-coffee: #743b26;
    --brand-orange-soft: #fff5eb;
    --brand-orange-accent: #cf875b;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #243040;
    font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
    background: #f4f7f6;
}

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

.site-shell {
    width: min(1180px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 12px 24px 24px;
}

.site-header {
    display: grid;
    justify-items: center;
    column-gap: 0;
    row-gap: 0;
    margin-bottom: 0;
}

.logo-wrap {
    position: relative;
    width: min(1080px, 100%);
}

.site-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    height: 120px;
    border: 1px solid #cddbd8;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: #ffffff;
    background: var(--site-primary);
    text-align: center;
    box-shadow: 0 14px 34px rgba(34, 50, 63, 0.12);
}

.logo-icon {
    width: clamp(48px, 7vw, 76px);
    height: clamp(48px, 7vw, 76px);
    flex: 0 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: #ffffff;
    object-fit: cover;
    padding: 3px;
}

.site-logo span {
    padding: 0 18px;
    font-size: clamp(1.45rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.25;
}

.site-logo-custom {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.site-logo-custom .logo-icon,
.site-logo-custom span {
    visibility: hidden;
}

.visit-stats {
    display: flex;
    grid-column: 1;
    grid-row: 3;
    flex-wrap: wrap;
    width: min(1080px, 100%);
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    padding: 7px 18px;
    color: var(--site-primary-text);
    border: 1px solid var(--site-primary-border);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--site-primary-soft);
    font-size: 0.95rem;
    font-weight: 700;
}

.guide-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.14);
    font-weight: 700;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    width: min(1080px, 100%);
    min-height: 38px;
    justify-content: flex-start;
    gap: 0;
    background: var(--site-primary);
    border-top: 0;
    border-right: 1px solid #cddbd8;
    border-left: 1px solid #cddbd8;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(34, 50, 63, 0.10);
}

.login-status {
    grid-column: 1;
    grid-row: 3;
    z-index: 1;
    width: min(1080px, 100%);
    align-self: center;
    padding: 7px 12px;
    color: var(--site-primary-text);
    font-weight: 700;
    text-align: right;
    pointer-events: none;
}

.nav-button {
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0;
    padding: 5px 20px;
    color: #ffffff;
    background: transparent;
    font-size: clamp(14px, 1.35vw, 17px);
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.nav-button-light {
    color: #ffffff;
    background: transparent;
}

.nav-button:last-child {
    border-right: 0;
}

.site-nav-editor .nav-button {
    padding-right: 12px;
    padding-left: 12px;
}

.nav-break {
    flex-basis: 100%;
    height: 0.5px;
    background: #f4f7f6;
}

.nav-button:hover,
.nav-button:focus {
    color: #ffffff;
    background: var(--site-primary-hover);
}

.event-section,
.content-panel {
    width: min(1080px, 100%);
    margin: 0 auto;
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(34, 50, 63, 0.08);
}

.event-section h1 {
    margin-bottom: 18px;
    font-size: 1.65rem;
}

.announcement-section {
    margin-bottom: 18px;
}

.board-management-button {
    transform: translateY(-8px);
}

.announcement-list {
    display: grid;
    gap: 12px;
}

.announcement-item {
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 16px;
    background: #f8fbfa;
}

.announcement-item h2 {
    margin-bottom: 8px;
    color: #182736;
    font-size: 1.18rem;
}

.announcement-item p {
    margin-bottom: 0;
    color: #344352;
    line-height: 1.7;
}

.announcement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    color: #667481;
    font-size: 0.88rem;
    font-weight: 700;
}

.purpose-panel {
    line-height: 1.8;
}

.purpose-panel > h1 {
    font-size: clamp(1rem, 2.25vw, 2.1rem);
}

.database-import-panel > h1 {
    font-size: clamp(1rem, 2.25vw, 2.1rem);
}

.registration-review-panel > h1,
.login-logs-panel > h1,
.audit-logs-panel > h1 {
    font-size: clamp(1rem, 2.25vw, 2.1rem);
}

.purpose-content {
    display: grid;
    gap: 16px;
    color: #263746;
}

.purpose-content h2,
.purpose-block h3 {
    margin: 0;
    color: var(--brand-coffee);
}

.purpose-content p {
    margin: 0;
    font-size: 1.05rem;
}

.purpose-intro-title {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.5;
}

.purpose-block {
    border-left: 5px solid var(--brand-orange-accent);
    padding: 12px 16px;
    background: var(--brand-orange-soft);
}

.purpose-block ul {
    margin: 8px 0 0;
    padding-left: 1.3rem;
}

.purpose-numbered-list {
    display: grid;
    gap: 10px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: purpose-item;
}

.purpose-numbered-list > li {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    align-items: start;
    counter-increment: purpose-item;
}

.purpose-numbered-list > li::before {
    content: "(" counter(purpose-item) ")";
    font-weight: 700;
    color: var(--brand-coffee);
}

.duties-panel {
    padding: clamp(22px, 4vw, 42px);
    background:
        radial-gradient(circle at 100% 0, rgba(207, 135, 91, 0.12), transparent 30%),
        #ffffff;
}

.duties-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.duties-heading h1 {
    margin: 0;
    color: var(--brand-coffee);
    font-size: clamp(1.05rem, 2.4vw, 1.5rem);
    line-height: 1.25;
}

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

.duty-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #f0dac5;
    border-top: 5px solid var(--brand-orange-accent);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(116, 59, 38, 0.08);
}

.duty-card-director {
    border-top-color: var(--brand-orange-accent);
}

.duty-card-deputy {
    border-top-color: var(--brand-orange-accent);
}

.duty-card-administration {
    border-top-color: var(--brand-orange-accent);
}

.duty-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid #f0dac5;
    background: var(--brand-orange-soft);
}

.duty-card-header h2 {
    margin: 3px 0 0;
    color: var(--brand-coffee);
    font-size: 1.4rem;
}

.duty-role {
    margin: 0;
    color: var(--brand-coffee);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.duty-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px 22px 14px;
    list-style: none;
    counter-reset: duty-item;
}

.duty-list li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: start;
    padding: 11px 0;
    border-bottom: 1px dashed #ead7c6;
    color: #334847;
    line-height: 1.65;
    counter-increment: duty-item;
}

.duty-list li:last-child {
    border-bottom: 0;
}

.duty-list li::before {
    content: counter(duty-item, decimal-leading-zero);
    padding-top: 0.12rem;
    color: var(--brand-coffee);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.event-number-context {
    display: inline-block;
    margin-left: 0.6rem;
    color: #0f5f52;
    font-size: 0.7em;
    font-weight: 700;
}

.case-card-focused {
    outline: 3px solid #d49b27;
    outline-offset: 2px;
    scroll-margin-top: 16px;
}

.document-download-list {
    display: grid;
    gap: 14px;
}

.documents-panel > h1 {
    font-size: clamp(1rem, 2.25vw, 2.1rem);
}

.document-download-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.document-download-column {
    min-width: 0;
}

.document-download-column > h2 {
    margin-bottom: 12px;
    color: #153f49;
    font-size: 1.25rem;
}

.document-download-item {
    display: grid;
    gap: 8px;
    align-items: start;
    border: 1px solid #f0dac5;
    border-left: 5px solid var(--brand-orange-accent);
    border-radius: 8px;
    padding: 16px;
    background: var(--brand-orange-soft);
}

.document-download-item h2,
.document-download-item p {
    margin: 0;
}

.document-download-link {
    color: #153f49;
    font-size: 1.08rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.document-download-link:hover,
.document-download-link:focus-visible {
    color: var(--site-primary);
    text-decoration: underline;
}

@media (max-width: 800px) {
    .document-download-columns {
        grid-template-columns: 1fr;
    }
}

.session-timeout-dialog[hidden] {
    display: none;
}

.session-timeout-dialog {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.session-timeout-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 35 39 / 72%);
}

.session-timeout-card {
    position: relative;
    width: min(100%, 520px);
    padding: 30px 34px;
    color: #17394b;
    text-align: center;
    background: #fff;
    border: 3px solid var(--site-primary);
    border-radius: 12px;
    box-shadow: 0 18px 60px rgb(0 0 0 / 30%);
}

.session-timeout-card h2 {
    margin: 0 0 16px;
    color: #9b3d25;
    font-size: 1.65rem;
}

.session-timeout-card p {
    margin: 10px 0;
    font-size: 1.08rem;
    line-height: 1.65;
}

.session-timeout-card [data-session-countdown] {
    display: inline-block;
    min-width: 72px;
    color: #b3261e;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
}

.session-timeout-card .session-timeout-hint {
    color: #52666d;
    font-size: 0.95rem;
}

.session-timeout-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.session-timeout-actions .btn {
    width: auto;
    min-width: 130px;
}

.session-timeout-logout {
    color: #29464e;
    background: #eef3f2;
    border: 1px solid #a8bbb7;
}

.session-timeout-error {
    color: #b3261e;
    font-weight: 700;
}

body.session-timeout-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .session-timeout-card {
        padding: 24px 20px;
    }

    .session-timeout-actions {
        flex-direction: column;
    }

    .session-timeout-actions .btn {
        width: 100%;
    }
}

/* Administrator-only system information dashboard. */
.system-information-page {
    color: #153b43;
}

.system-information-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #ceddda;
}

.system-information-heading h1 {
    margin: 0 0 6px;
}

.system-information-heading p {
    margin: 0;
    color: #667985;
}

.system-load-panel,
.system-detail-card {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #cadbd8;
    border-radius: 9px;
    background: #fbfdfd;
}

.system-load-panel h2,
.system-detail-card h2 {
    margin: 0 0 18px;
    color: #175374;
    font-size: 1.25rem;
}

.system-load-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.system-metric-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #cbdcE5;
    border-radius: 8px;
    background: #ffffff;
}

.system-metric-card h3 {
    margin: 0 0 14px;
    color: #173c4d;
    font-size: 1rem;
}

.system-metric-card strong {
    display: block;
    margin-bottom: 12px;
    color: #164f93;
    font-size: 1.5rem;
    line-height: 1.2;
}

.system-metric-card p {
    margin: 10px 0 0;
    color: #687c87;
    font-size: 0.86rem;
    line-height: 1.55;
}

.system-progress {
    overflow: hidden;
    height: 8px;
    border-radius: 999px;
    background: #dfe9ed;
}

.system-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--site-primary), #1a6aa0);
}

.system-runtime-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 16px 0 0;
    border: 1px solid #cbdcE5;
    border-radius: 8px;
    background: #ffffff;
}

.system-runtime-stats div {
    min-width: 0;
    padding: 13px 14px;
    border-right: 1px solid #d5e2e6;
}

.system-runtime-stats div:last-child {
    border-right: 0;
}

.system-runtime-stats dt,
.system-detail-card dt {
    color: #617986;
    font-size: 0.82rem;
}

.system-runtime-stats dd {
    margin: 4px 0 0;
    color: #173c4d;
    font-weight: 700;
}

.system-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.system-detail-card dl {
    margin: 0;
}

.system-detail-card dl div {
    display: grid;
    grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.8fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #d3dfE3;
}

.system-detail-card dl div:last-child {
    border-bottom: 0;
}

.system-detail-card dd {
    min-width: 0;
    margin: 0;
    color: #173c4d;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.system-generated-at {
    margin: 16px 0 0;
    color: #6d7f87;
    font-size: 0.88rem;
    text-align: right;
}

@media (max-width: 900px) {
    .system-load-grid,
    .system-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .system-runtime-stats div,
    .system-runtime-stats div:last-child {
        border-right: 0;
        border-bottom: 1px solid #d5e2e6;
    }

    .system-runtime-stats div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 560px) {
    .system-information-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .system-information-heading .btn {
        width: 100%;
    }

    .system-runtime-stats {
        grid-template-columns: 1fr;
    }

    .system-detail-card dl div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

.attachment-list {
    display: grid;
    gap: 6px;
    color: #1f4650;
    font-size: 0.92rem;
}

.attachment-list a {
    color: var(--site-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.data-form + .attachment-list,
.data-form + .attachment-list + .attachment-list {
    display: none;
}

.attachment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.attachment-list-public {
    margin-top: 12px;
    border-top: 1px solid #dfe7e4;
    padding-top: 12px;
}

.file-link {
    display: block;
    color: var(--site-primary);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.uploaded-file-action {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
}

.uploaded-file-action .file-link {
    display: inline;
}

.inline-link {
    color: var(--site-primary);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nowrap-label {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
}

.bar-chart {
    display: grid;
    gap: 14px;
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 18px;
    background: #f8fbfa;
}

.stats-subsection {
    margin-top: 28px;
}

.stats-subsection h2 {
    margin: 0 0 14px;
    color: #20313f;
    font-size: 1.3rem;
}

.stats-table th,
.stats-table td,
.stats-cross-table th,
.stats-cross-table td {
    text-align: center;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) 72px;
    gap: 12px;
    align-items: center;
}

.bar-label {
    color: #213140;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.bar-meter {
    display: block;
    width: 100%;
    height: 30px;
    border: 1px solid #cbd8d7;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    appearance: none;
}

.bar-meter::-webkit-progress-bar {
    border-radius: 7px;
    background: #ffffff;
}

.bar-meter::-webkit-progress-value {
    border-radius: 7px;
    background: var(--site-primary);
}

.bar-meter::-moz-progress-bar {
    border-radius: 7px;
    background: var(--site-primary);
}

.bar-value {
    color: #344352;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.content-panel {
    display: grid;
    gap: 18px;
}

.stats-table-grid {
    display: grid;
    gap: 24px;
    justify-items: center;
}

.stats-filter-form {
    width: 600px;
    max-width: 100%;
    margin-inline: auto;
}

.stats-filter-intro {
    display: grid;
    flex: 1 0 100%;
    gap: 4px;
}

.stats-filter-intro strong {
    color: #20313f;
    font-size: 1.1rem;
}

.stats-filter-intro span {
    color: #52616d;
    line-height: 1.5;
}

.audit-search-form label {
    flex: 1 1 420px;
}

.audit-search-form input[type="search"] {
    width: 100%;
}

.stats-table-section {
    display: grid;
    gap: 12px;
    width: 600px;
    max-width: 100%;
}

.stats-table-section h2 {
    margin: 0;
}

.stats-table-section .table-wrap {
    width: 600px;
    max-width: 100%;
}

.stats-summary-table {
    width: 600px !important;
    max-width: 100%;
    table-layout: fixed;
}

.stats-summary-table th:first-child,
.stats-summary-table td:first-child {
    width: 60%;
}

.stats-summary-table .number-cell {
    width: 20%;
    text-align: center;
    white-space: nowrap;
}

.stats-type-table th:first-child,
.stats-type-table td:first-child {
    width: 300px;
}

.stats-type-table th:nth-child(n+2),
.stats-type-table td:nth-child(n+2) {
    width: 100px;
}

.stats-summary-table tfoot th {
    background: var(--brand-orange-soft);
    font-weight: 800;
}

.guide-panel {
    line-height: 1.8;
}

.guide-section {
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 18px;
    background: #f8fbfa;
}

.guide-section h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.guide-section ol {
    margin: 0;
    padding-left: 24px;
}

.guide-section p {
    margin-bottom: 8px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h1 {
    margin-bottom: 0;
    font-size: 1.65rem;
}

.section-note {
    margin: 14px 0 18px;
    color: #31514c;
    line-height: 1.7;
    font-weight: 700;
}

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

.table-wrap table th,
.table-wrap table td {
    background: var(--brand-orange-soft);
}

.event-table {
    width: 1024px;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.95rem;
}

.public-event-table {
    width: 1024px;
    max-width: 100%;
}

.event-table th,
.event-table td {
    border: 1px solid #dbe5e3;
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.event-table th {
    color: #20313f;
    background: var(--brand-orange-soft);
    white-space: normal;
}

.event-table .serial-col {
    width: 40px;
    padding-right: 2px;
    padding-left: 2px;
    text-align: center;
}

.event-table .action-col {
    width: 80px;
}

.event-table tbody tr:nth-child(even) {
    background: var(--brand-orange-soft);
}

.admin-events-table tbody tr.event-closed-row > td {
    background: #e9ecef;
}

.admin-events-table tbody tr.event-mediating-row > td {
    background: #fff3e0;
}

.admin-events-table tbody tr.event-pending-row > td {
    background: var(--brand-orange-soft);
}

.event-table.stats-table th,
.event-table.stats-table td,
.event-table.stats-cross-table th,
.event-table.stats-cross-table td {
    text-align: center;
}

.registration-review-table {
    width: 1024px;
}

.registration-review-table th:first-child,
.registration-review-table td:first-child {
    width: 81px;
    text-align: center;
}

.registration-review-table th:nth-child(2),
.registration-review-table td:nth-child(2),
.registration-review-table th:nth-child(5),
.registration-review-table td:nth-child(5) {
    width: 121px;
}

.registration-review-table th:nth-child(3),
.registration-review-table td:nth-child(3) {
    width: 88px;
}

.registration-review-table th:nth-child(8),
.registration-review-table td:nth-child(8) {
    width: 83px;
}

.registration-review-table th:nth-child(4),
.registration-review-table td:nth-child(4) {
    width: 241px;
}

.registration-review-table th:nth-child(6),
.registration-review-table td:nth-child(6) {
    width: 178px;
}

.registration-review-table th:nth-child(7),
.registration-review-table td:nth-child(7) {
    width: 111px;
}

.review-sort-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.review-sort-form label {
    font-weight: 700;
}

.review-sort-form select {
    width: min(260px, 100%);
}

.review-radio-group {
    display: inline-grid;
    gap: 2px;
    justify-items: start;
    white-space: nowrap;
}

.review-radio-group label {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-weight: 700;
    line-height: 1.2;
}

.review-radio-group input[type="radio"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.review-application-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    white-space: nowrap;
}

.review-application-actions .file-link {
    display: inline;
}

.review-reupload-form {
    display: inline-flex;
    margin: 0;
}

.review-reupload-button {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border: 1px solid var(--site-primary);
    border-radius: 6px;
    padding: 2px 7px;
    color: var(--site-primary);
    background: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.review-reupload-button:hover,
.review-reupload-button:focus-within {
    color: #fff;
    background: var(--site-primary);
}

.review-reupload-button input[type="file"] {
    display: none;
}

.review-checkbox-form {
    display: inline-flex;
    margin: 0;
}

.review-checkbox-form label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.review-checkbox-form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.case-list {
    display: grid;
    gap: 20px;
}

.case-card {
    border: 1px solid #c9dcd7;
    border-left: 5px solid var(--site-primary);
    border-radius: 12px;
    background: #fff;
    color: #1f2f3b;
    box-shadow: 0 10px 30px rgba(25, 58, 51, 0.09);
    overflow: hidden;
}

.case-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 13px 20px;
    background: linear-gradient(90deg, #eaf6f2, #f7fbfa);
    border-bottom: 1px solid #c9deda;
}

.case-title {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-right: 8px;
    color: #0e473d;
    font-size: 1.08rem;
    font-weight: 800;
}

.case-title span {
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--site-primary);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.case-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.case-actions form {
    margin: 0;
}

.case-actions .icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 8px;
    font-size: 1.15rem;
}

.case-grid {
    display: grid;
    grid-template-columns: minmax(310px, 40%) minmax(0, 1fr);
}

.case-cell {
    min-height: 170px;
    padding: 20px 22px;
}

.case-summary,
.case-mediation-info {
    border-right: 1px solid #d5e4e1;
    background: #fbfdfc;
}

.case-mediation-info {
    background: #fff3b8;
}

.case-mediation-info,
.case-mediation-description {
    border-top: 1px solid #d5e4e1;
}

.case-card-closed {
    border-color: #bcc3c7;
    border-left-color: #7b858a;
    background: #e9ecee;
}

.case-card-closed .case-card-top {
    border-bottom-color: #c3c9cc;
    background: #e1e5e7;
}

.case-card-closed .case-cell,
.case-card-closed .case-summary,
.case-card-closed .case-mediation-info,
.case-card-closed .case-description,
.case-card-closed .case-mediation-description {
    border-color: #c7cccf;
    background: #eef0f1;
}

.case-card-closed .case-text {
    border-color: #c9ced1;
    background: #e5e8ea;
}

.case-section-title {
    margin-bottom: 14px;
    color: #174f45;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.case-meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.case-meta > div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
}

.case-meta > .case-reporter-start {
    margin-top: 4px;
    border-top: 1px solid #d4e2de;
    padding-top: 12px;
}

.case-meta > .case-school-safety-number {
    border-radius: 6px;
    padding: 6px 8px;
    background: #fff3b8;
}

.case-meta dt,
.case-meta dd {
    margin: 0;
    line-height: 1.55;
}

.case-meta dt {
    color: #698078;
    font-size: 0.88rem;
    font-weight: 700;
}

.case-meta dd {
    color: #20343f;
}

.case-status {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 9px;
    background: #e4f2ee;
    color: #176452;
    font-size: 0.86rem;
    font-weight: 700;
}

.case-status-notice {
    display: block;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 7px;
    border: 1px solid #e6c94f;
    border-radius: 5px;
    padding: 6px 9px;
    background: #fff3a6;
    color: #c51616;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.55;
}

.case-text {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 112px;
    margin: 0;
    border: 1px solid #d7e6e3;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f7fbfa;
    color: #1f2f3b;
    line-height: 1.8;
    white-space: normal;
    overflow-wrap: anywhere;
}

.case-description .case-text,
.case-mediation-description .case-text {
    color: #354b55;
}

.case-files {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 15px;
    border-top: 1px dashed #cbdcd8;
    padding-top: 14px;
}

.case-files-label {
    color: #698078;
    font-size: 0.88rem;
    font-weight: 700;
}

.case-file-list {
    display: grid;
    gap: 7px;
    justify-items: stretch;
}

.case-file-link {
    display: inline-block;
    max-width: 100%;
    border-radius: 6px;
    padding: 5px 9px;
    background: transparent;
    color: #087461;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.case-file-link:hover {
    background: transparent;
    text-decoration: underline;
}

.case-empty-value {
    color: #82918d;
    font-size: 0.9rem;
}

.inline-file-link {
    display: inline;
    color: var(--site-primary);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.my-event-list {
    display: grid;
    gap: 18px;
}

.my-event-card {
    color: #0b2234;
}

.my-event-card-header {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    border: 1px solid #c8ddd8;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #edf7f4;
    font-size: 1.05rem;
}

.my-event-number {
    font-weight: 700;
}

.my-event-card-grid {
    display: grid;
    grid-template-columns: minmax(320px, 47%) minmax(0, 1fr);
    border: 1px solid #c8ddd8;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(8, 46, 39, 0.08);
    overflow: hidden;
}

.my-event-card-info,
.my-event-card-description {
    min-height: 168px;
    padding: 16px 18px;
}

.my-event-card-info {
    border-right: 1px solid #d9e9e5;
    background: #fbfdfc;
}

.my-event-card-info p,
.my-event-card-description p {
    margin: 0 0 6px;
    line-height: 1.55;
}

.my-event-card-description div {
    line-height: 1.7;
    white-space: normal;
}

.empty-state {
    border: 1px dashed #b9cbc8;
    border-radius: 8px;
    padding: 28px;
    color: #596675;
    background: #f7faf9;
    text-align: center;
}

.site-footer {
    width: min(1080px, 100%);
    margin: 18px auto 0;
    color: #566772;
    font-size: 0.95rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.site-footer .site-footer-text {
    color: #405b62;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.site-footer .site-footer-ip {
    margin-top: 6px;
    color: #405b62;
    font-weight: 600;
}

.home-shell,
.dashboard-shell {
    min-height: 100vh;
}

.home-shell {
    display: grid;
    place-items: center;
    padding: 32px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 28px;
    width: min(1180px, 100%);
    align-items: stretch;
}

.hero__content,
.info-panel,
.auth-card,
.module-card {
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(34, 50, 63, 0.08);
}

.hero__content {
    padding: clamp(32px, 6vw, 72px);
    background: linear-gradient(135deg, #ffffff 0%, #eef6f2 100%);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--site-primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    color: #182736;
    font-size: clamp(2rem, 4.5vw, 4.2rem);
    line-height: 1.12;
    letter-spacing: 0;
}

.profile-heading {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 18px;
}

.profile-heading h1 {
    margin: 0;
    font-size: 20pt;
}

.profile-account {
    color: #40515e;
    font-size: 1.05rem;
    font-weight: 700;
}

.profile-password-button {
    margin-left: auto;
}

.mediator-import-title {
    font-size: clamp(1.2rem, 2.7vw, 2.52rem);
}

.hero__text {
    max-width: 640px;
    color: #546170;
    font-size: 1.15rem;
    line-height: 1.8;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.actions.compact {
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    color: #ffffff;
    background: var(--site-primary);
}

.btn-secondary {
    color: #1f4650;
    border-color: #c6d5d3;
    background: #ffffff;
}

.filter-form .form-actions .btn {
    color: #243040;
    border-color: #b8c0c5;
    background: #d9dee2;
}

.filter-form .form-actions .btn:hover,
.filter-form .form-actions .btn:focus {
    background: #c8ced3;
}

.btn-wide {
    width: 100%;
    margin-top: 8px;
}

.info-panel {
    padding: 32px;
}

.info-panel h2,
.module-card h2 {
    margin-bottom: 18px;
    font-size: 1.35rem;
}

dl {
    display: grid;
    gap: 18px;
    margin: 0;
}

dt {
    color: var(--site-primary);
    font-weight: 800;
}

dd {
    margin: 6px 0 0;
    color: #5c6875;
    line-height: 1.7;
}

.auth-shell {
    display: grid;
    place-items: center;
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 8px 0 28px;
}

.login-page-panel {
    padding: 28px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 32px;
}

.auth-card h1 {
    font-size: 2rem;
}

.auth-card p {
    color: #596675;
    line-height: 1.7;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--site-primary);
    font-weight: 700;
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.compact-login-form {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    row-gap: 14px;
}

.compact-login-form label {
    margin: 0;
}

.compact-login-form .btn-wide {
    grid-column: 1 / -1;
}

.compact-login-form label[for="user_id"] {
    grid-column: 1;
    grid-row: 1;
}

.compact-login-form .plain-secret-input {
    grid-column: 2;
    grid-row: 1;
}

.compact-login-form label[for="passwd"] {
    grid-column: 1;
    grid-row: 2;
}

.compact-login-form .secret-input:not(.plain-secret-input) {
    grid-column: 2;
    grid-row: 2;
}

.compact-login-form label[for="captcha"] {
    grid-column: 1;
    grid-row: 3;
}

.compact-login-form .captcha-row {
    grid-column: 2;
    grid-row: 3;
}

.compact-login-form label[for="email"] {
    grid-column: 1;
    grid-row: 1;
}

.compact-login-form label[for="cellphone"] {
    grid-column: 1;
    grid-row: 2;
}

.compact-login-form .mediator-phone-input {
    grid-column: 2;
    grid-row: 2;
}

label {
    color: #2d3b49;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd8d7;
    border-radius: 8px;
    padding: 10px 12px;
    color: #213140;
    font-size: 1rem;
}

input:focus {
    border-color: var(--site-primary);
    outline: 3px solid color-mix(in srgb, var(--site-primary) 16%, transparent);
}

.secret-input {
    position: relative;
    display: flex;
    align-items: stretch;
}

.secret-input input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 50px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.plain-secret-input input {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.secret-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #0d4778;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%);
}

.secret-input.has-secret-value .secret-toggle {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.secret-toggle:hover,
.secret-toggle:focus {
    background: #eef6fb;
    outline: none;
}

.eye-icon {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 16px;
}

.eye-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.eye-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.alert,
.notice {
    border-radius: 8px;
    padding: 14px 16px;
    line-height: 1.6;
}

.alert {
    color: #8a2d2d;
    background: #fff1f0;
    border: 1px solid #ffd1cd;
}

.notice {
    color: #246247;
    background: #edf8f1;
    border: 1px solid #ccebd8;
}

.notice p,
.alert p {
    margin: 0 0 8px;
}

.notice p:last-child,
.alert p:last-child {
    margin-bottom: 0;
}

.event-create-instructions {
    margin: 18px 0;
}

.event-create-instructions h2 {
    margin: 0 0 8px;
    color: #174f3b;
    font-size: 1.15rem;
}

.event-create-instructions ol {
    margin: 0;
    padding-left: 1.55rem;
}

.event-create-instructions li + li {
    margin-top: 4px;
}

.event-create-instructions-emphasis {
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.demo-box {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    border-radius: 8px;
    padding: 14px;
    color: #4f5d69;
    background: #f1f5f4;
    font-size: 0.94rem;
}

.welcome,
.module-grid {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.welcome {
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(34, 50, 63, 0.08);
}

.welcome h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.module-card {
    padding: 24px;
}

.module-card p {
    color: #596675;
    line-height: 1.7;
}

.module-link {
    display: block;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.module-link:hover {
    border-color: var(--site-primary);
    transform: translateY(-2px);
}

.data-form {
    display: grid;
    gap: 18px;
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 18px;
    background: #f8fbfa;
}

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

.event-type-field {
    display: grid;
    gap: 12px;
    align-content: start;
}

.school-safety-report-field {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

.school-safety-report-field > span {
    font-weight: 700;
}

.school-safety-report-control {
    display: grid;
    gap: 10px;
}

.school-safety-report-number-field input {
    width: min(100%, 420px);
}

.school-safety-report-reminder {
    margin: 0;
    color: #9b4f22;
    font-weight: 700;
}

[data-event-type-other-field][hidden],
[data-school-safety-report-number-field][hidden],
[data-school-safety-report-reminder][hidden] {
    display: none;
}

.forgot-password-card h1 {
    margin-bottom: 18px;
    font-size: 2.1rem;
}

.forgot-password-form label[for="forgot-user-id"] {
    grid-column: 1;
    grid-row: 1;
}

.forgot-password-form .forgot-password-account-input {
    grid-column: 2;
    grid-row: 1;
}

.forgot-password-form label[for="forgot-email"] {
    grid-column: 1;
    grid-row: 2;
}

.forgot-password-form .forgot-password-email-input {
    grid-column: 2;
    grid-row: 2;
}

.forgot-password-form label[for="forgot-tel"] {
    grid-column: 1;
    grid-row: 3;
}

.forgot-password-form .forgot-password-tel-input {
    grid-column: 2;
    grid-row: 3;
}

.form-readonly-field {
    display: grid;
    gap: 8px;
}

.form-readonly-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 32px;
}

.form-readonly-label {
    color: #2d3b49;
    font-size: 1.05rem;
    font-weight: 800;
}

.form-readonly-value {
    color: #243442;
    font-size: 1.05rem;
    line-height: 1.65;
}

.form-readonly-description {
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #cbd8d7;
    border-radius: 8px;
    background: #ffffff;
    overflow-wrap: anywhere;
}

.school-line {
    display: grid;
    grid-template-columns: auto 190px 160px auto 250px 120px;
    gap: 14px;
    align-items: center;
    justify-content: start;
    max-width: 980px;
}

.school-field {
    grid-column: 1 / -1;
}

.event-school-line {
    grid-template-columns: auto 170px 260px 150px;
    max-width: 860px;
}

.school-lookup-panel {
    display: grid;
    gap: 8px;
    max-width: 860px;
}

.school-lookup-control {
    display: flex;
    gap: 14px;
    align-items: center;
}

.data-form .school-lookup-control label {
    display: block;
    min-width: 150px;
    color: #2d3b49;
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
}

.school-search-control {
    position: relative;
}

.school-search-control input {
    width: 520px;
    max-width: 100%;
    min-height: 46px;
}

.school-search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 164px;
    display: grid;
    width: 520px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #9fc3bc;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(28, 66, 59, 0.18);
}

.school-search-results:empty {
    display: none;
}

.school-search-option {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #dce9e6;
    border-radius: 0;
    padding: 11px 13px;
    background: #fff;
    color: #233a36;
    text-align: left;
    cursor: pointer;
}

.school-search-option:last-child {
    border-bottom: 0;
}

.school-search-option:hover,
.school-search-option:focus-visible {
    border-color: var(--site-primary);
    background: #eaf6f2;
}

.school-search-message,
.school-search-selected {
    padding: 11px 13px;
    color: #47615c;
    font-weight: 700;
}

.school-search-selected {
    color: var(--site-primary);
}

.register-profile-line {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 180px 180px 180px;
    gap: 14px;
    align-items: end;
    justify-content: start;
}

.register-secret-line {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 160px 160px 160px auto;
    gap: 14px;
    align-items: start;
    justify-content: start;
}

.full-line {
    grid-column: 1 / -1;
}

.user-email-line {
    max-width: 540px;
}

.users-secret-line {
    grid-template-columns: 180px 180px 180px;
}

.user-account-line {
    max-width: 360px;
}

.password-change-line {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.password-account-field {
    align-self: start;
}

.password-account-field input {
    height: 46px;
    min-height: 46px;
}

.password-change-line input {
    height: 46px;
    min-height: 46px;
}

.password-change-line label {
    align-content: start;
    grid-template-rows: 24px 46px auto;
}

.captcha-field {
    grid-column: 1 / -1;
}

.register-secret-line .captcha-field {
    grid-column: auto;
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.captcha-image {
    border: 1px solid #bfd2d0;
    border-radius: 8px;
    background: #eef5f3;
}

.captcha-input {
    width: 96px;
    max-width: 96px;
    text-transform: uppercase;
}

.school-line input,
.school-line select {
    min-height: 46px;
}

.school-line-label,
.school-line-text {
    color: #2d3b49;
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
}

.data-form label,
.data-form .form-field {
    display: grid;
    gap: 8px;
}

.data-form .radio-field {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
}

.field-label {
    font-weight: 700;
}

.data-form .inline-check {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}

.data-form .inline-check input {
    width: auto;
    min-height: auto;
}

.radio-group {
    display: flex;
    gap: 14px;
    align-items: center;
}

.data-form .radio-option {
    display: inline-flex;
    grid-template-columns: none;
    gap: 3px;
    align-items: center;
    width: auto;
    font-weight: 700;
    line-height: 1;
}

.data-form .radio-option input[type="radio"] {
    appearance: auto;
    width: 14px;
    height: 14px;
    min-height: 0;
    flex: 0 0 14px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
}

.field-hint {
    color: #667481;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;
}

.required-upload-mark {
    margin-left: 6px;
    color: #c62828;
    font-weight: 800;
}

.upload-label-text {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
}

.data-form .inline-file-upload-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.data-form .inline-file-upload-row input[type="file"] {
    flex: 1 1 420px;
    width: auto;
}

#event-data-form input[type="file"] {
    color: #213140;
}

#event-data-form input[type="file"]::file-selector-button {
    color: #213140;
}

.form-actions,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.user-password-form {
    display: block;
}

.user-password-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: end;
}

.data-form .user-password-row label {
    display: grid;
    gap: 8px;
    width: 210px;
}

.user-password-row input {
    width: 210px;
    min-height: 42px;
}

.user-password-submit {
    width: auto;
    min-width: 76px;
    min-height: 42px;
    padding: 8px 18px;
}

.mediator-profile-row,
.mediator-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
}

.data-form .mediator-profile-row label {
    width: 210px;
}

.data-form .mediator-profile-row .mediator-city-field {
    width: 150px;
}

.data-form .mediator-profile-row .mediator-sex-field {
    width: 110px;
}

.mediator-profile-row input,
.mediator-profile-row select {
    width: 100%;
    min-height: 44px;
}

.data-form .mediator-contact-row label {
    width: 300px;
}

.data-form .mediator-contact-row .mediator-email-field {
    width: 480px;
}

.data-form .mediator-contact-row .mediator-identity-field {
    width: 180px;
}

.mediator-contact-row input,
.mediator-contact-row select {
    width: 100%;
    min-height: 44px;
}

.mediator-save-button {
    width: auto;
    min-width: 76px;
    justify-self: start;
    padding: 0 18px;
}

.table-wrap:has(.mediator-table) {
    overflow-x: auto;
}

.event-table.mediator-table {
    width: 100%;
    min-width: 970px;
    table-layout: fixed;
}

.mediator-table th,
.mediator-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mediator-table .action-col {
    width: 70px;
    padding-right: 6px;
    padding-left: 6px;
}

.mediator-table .mediator-login-col {
    width: 80px;
    padding-right: 6px;
    padding-left: 6px;
}

.mediator-table td:nth-child(2) {
    padding-right: 6px;
    padding-left: 6px;
}

.mediator-table .mediator-name-col {
    width: 75px;
}

.mediator-table .mediator-sex-col {
    width: 50px;
}

.mediator-table .mediator-phone-col {
    width: 135px;
}

.mediator-table .mediator-email-col {
    width: 291px;
}

.mediator-table .mediator-institution-col {
    width: 154px;
}

.mediator-table .mediator-position-col {
    width: 115px;
}

.mediator-table .row-actions {
    flex-wrap: nowrap;
}

.mediator-table .icon-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1;
}

.users-table .action-col {
    width: 70px;
    padding-right: 6px;
    padding-left: 6px;
}

.users-table .row-actions {
    flex-wrap: nowrap;
}

.users-table .icon-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1;
}

.announcement-table .action-col {
    width: 70px;
    padding-right: 6px;
    padding-left: 6px;
}

.announcement-table .row-actions {
    flex-wrap: nowrap;
}

.announcement-table .icon-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1;
}

.event-table.announcement-table {
    width: 100%;
    table-layout: fixed;
}

.announcement-table .announcement-publisher-col {
    width: 100px;
}

.announcement-table .announcement-visible-col {
    width: 60px;
}

.announcement-table .announcement-time-col {
    width: 180px;
}

.table-wrap:has(.admin-events-table) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.event-table.admin-events-table {
    width: 1050px;
    min-width: 1050px;
    max-width: 1050px;
    table-layout: fixed;
}

.admin-events-table th,
.admin-events-table td {
    box-sizing: border-box;
    overflow: hidden;
    vertical-align: top;
}

.admin-events-table .action-col {
    width: 7%;
    padding-right: 6px;
    padding-left: 6px;
}

.admin-events-table thead th {
    text-align: center;
    vertical-align: middle;
}

.admin-events-table .event-number-col {
    width: 165px;
    white-space: nowrap;
}

.admin-events-table .event-area-col {
    width: 6%;
    white-space: nowrap;
}

.admin-events-table .event-school-col {
    width: 195px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-events-table .event-school-name {
    min-height: 24px;
}

.admin-events-table .event-stage-col {
    width: 5%;
    white-space: nowrap;
}

.admin-events-table .event-time-col {
    width: 110px;
    white-space: nowrap;
}

.admin-events-table .event-mediation-time {
    margin-top: 8px;
    border: 1px solid #e3bd45;
    border-radius: 5px;
    padding: 5px 6px;
    color: #5e4800;
    background: #fff1a8;
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: normal;
}

.admin-events-table .event-school-safety-number {
    margin-top: 8px;
    border: 1px solid #e3bd45;
    border-radius: 5px;
    padding: 5px 6px;
    color: #5e4800;
    background: #fff1a8;
    font-size: 0.78rem;
    line-height: 1.4;
    white-space: normal;
}

.admin-events-table .event-type-col {
    width: 11%;
    overflow-wrap: anywhere;
}

.admin-events-table .event-status-col {
    width: 8%;
    white-space: nowrap;
}

.admin-events-table .event-mediator-col {
    width: 85px;
}

.admin-events-table .event-mediator-name {
    display: block !important;
    width: 100%;
    white-space: nowrap;
    line-height: 1.75;
}

.admin-events-table .event-unassigned {
    white-space: nowrap;
    color: #6f7f7b;
}

.admin-events-table .event-assign-button {
    display: inline-flex;
    width: auto;
    min-height: 24px;
    margin-top: 0;
    padding: 1px 4px;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

.admin-events-table .event-files-col {
    width: 150px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-events-table .event-files-col .file-link {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-events-table .event-detail-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    font-size: 0.78rem;
}

.event-detail-panel h1 {
    font-size: 2rem;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: #d8e3e0;
}

.event-detail-grid > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    background: #ffffff;
}

.event-detail-grid dt,
.event-detail-grid dd {
    margin: 0;
    padding: 11px 13px;
}

.event-detail-grid dt {
    color: #31514c;
    background: #edf4f2;
    font-weight: 700;
}

.event-reporter-contact {
    display: grid;
    gap: 4px;
}

.event-reporter-contact > span {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
}

.event-reporter-contact strong {
    color: #698078;
    font-weight: 700;
}

.event-detail-grid .event-detail-wide {
    grid-column: 1 / -1;
}

.event-detail-files {
    display: grid;
    gap: 10px;
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 18px;
    background: #f8fbfa;
}

.event-detail-files h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

@media (max-width: 800px) {
    .event-detail-grid {
        grid-template-columns: 1fr;
    }

    .event-detail-grid .event-detail-wide {
        grid-column: auto;
    }
}

.admin-events-table .row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 3px;
    align-items: center;
    width: max-content;
    max-width: none;
    margin-top: 8px;
    margin-bottom: 0;
}

.admin-events-table .row-actions > form {
    display: inline-flex;
    flex: 0 0 24px;
    width: 24px;
    margin: 0;
}

.admin-events-table .row-actions > .icon-button {
    flex: 0 0 24px;
}

.admin-events-table .event-number-value {
    display: block;
    width: 100%;
    white-space: nowrap;
}

.admin-events-table .event-reporter-info {
    display: grid;
    gap: 2px;
    margin-top: 8px;
    padding-top: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: normal;
}

.admin-events-table .event-reporter-info span {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-events-table .event-reporter-primary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-events-table .event-reporter-primary span {
    overflow-wrap: normal;
    word-break: normal;
}

.admin-events-table .event-reporter-info strong {
    color: #526b64;
}

.admin-events-table .icon-button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1;
}

.announcement-visible-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.announcement-visible-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    cursor: pointer;
}

.rich-editor {
    overflow: hidden;
    border: 1px solid #c6d5d3;
    border-radius: 8px;
    background: #ffffff;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border-bottom: 1px solid #dfe7e4;
    padding: 8px;
    background: #edf4f2;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select {
    width: auto;
    min-width: 36px;
    min-height: 34px;
    border: 1px solid #b8cac7;
    border-radius: 6px;
    padding: 4px 9px;
    color: #243040;
    background: #ffffff;
    font: inherit;
    cursor: pointer;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar button:focus {
    border-color: var(--site-primary);
    color: var(--site-primary);
}

.data-form .rich-color-control {
    display: inline-flex;
    width: auto;
    align-items: center;
    gap: 5px;
}

.data-form .rich-color-control input[type="color"] {
    width: 36px;
    min-width: 36px;
    height: 34px;
    min-height: 34px;
    padding: 2px;
}

.rich-editor-content {
    min-height: 380px;
    padding: 14px;
    outline: none;
    line-height: 1.7;
}

.announcement-save-button {
    width: auto;
    min-width: 104px;
    justify-self: start;
    padding-right: 18px;
    padding-left: 18px;
}

.rich-editor-content:focus {
    box-shadow: inset 0 0 0 2px rgba(8, 123, 104, 0.18);
}

.rich-editor-source {
    display: none;
}

.announcement-content {
    line-height: 1.75;
}

.manager-password-panel {
    justify-items: center;
}

.manager-password-panel h1 {
    font-size: 2rem;
    text-align: center;
}

.manager-password-form {
    width: min(420px, 100%);
    justify-self: center;
}

.manager-password-submit {
    width: auto;
    min-width: 104px;
    justify-self: center;
    padding-right: 18px;
    padding-left: 18px;
}

.assignment-panel h1 {
    font-size: 2rem;
}

.assignment-list-table {
    width: 100%;
    table-layout: auto;
    font-size: 0.9rem;
}

.assignment-list-table .assignment-compact-col {
    width: 1%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.assignment-list-table .assignment-current-col {
    width: 100%;
}

.assignment-list-table .assignment-fixed-100-col {
    box-sizing: border-box;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.assignment-current-mediators span {
    display: block;
    white-space: nowrap;
    line-height: 1.7;
}

.assignment-mediator-detail {
    display: grid;
    grid-template-columns: minmax(70px, auto) minmax(110px, auto) minmax(180px, 1fr);
    gap: 8px 14px;
    align-items: baseline;
    padding: 3px 0;
}

.assignment-mediator-detail a {
    color: #315f77;
    white-space: nowrap;
    text-decoration: none;
}

.assignment-mediator-detail a:hover {
    text-decoration: underline;
}

.assignment-button,
.assignment-save-button {
    width: auto;
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.92rem;
}

.assignment-number-action {
    margin-top: 10px;
}

.assignment-number-action .assignment-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.assignment-case {
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 18px;
    background: #f8fbfa;
}

.assignment-case h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
}

.assignment-case-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    background: #d8e3e0;
}

.assignment-case-details > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    background: #ffffff;
}

.assignment-case-details dt,
.assignment-case-details dd {
    margin: 0;
    padding: 10px 12px;
}

.assignment-case-details dt {
    color: #31514c;
    background: #edf4f2;
    font-weight: 700;
}

.assignment-case-details .assignment-description {
    grid-column: 1 / -1;
}

.assignment-form fieldset {
    margin: 0;
    border: 0;
    padding: 0;
}

.assignment-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.assignment-form-heading h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.assignment-form .assignment-fieldset-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.mediator-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #b9ccc7;
    border-radius: 8px;
    background: #ffffff;
}

.mediator-category {
    min-width: 0;
    border-right: 1px solid #b9ccc7;
    padding: 14px;
    background: #f8fbfa;
}

.mediator-category:last-child {
    border-right: 0;
}

.mediator-category h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: -14px -14px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #cfddd9;
    color: #174f46;
    font-size: 1.08rem;
    background: #eaf3f0;
}

.mediator-category h3 span {
    color: #687873;
    font-size: 0.78rem;
    font-weight: 600;
}

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

.data-form .mediator-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d5e3e0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    cursor: pointer;
}

.data-form .mediator-check-item input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
}

.mediator-check-item span {
    display: grid;
    gap: 2px;
}

.mediator-check-item small {
    color: #667481;
}

.assignment-save-button {
    justify-self: start;
}

.assignment-save-button-top {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .mediator-category-grid {
        grid-template-columns: 1fr;
    }

    .mediator-category {
        border-right: 0;
        border-bottom: 1px solid #b9ccc7;
    }

    .mediator-category:last-child {
        border-bottom: 0;
    }
}

.mediation-fields-row {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    gap: 18px;
    align-items: end;
}

.data-form .mediation-fields-row label {
    flex: 0 0 auto;
}

.mediation-date-field {
    width: 270px;
}

.mediation-result-field {
    width: 196px;
}

.mediation-count-field {
    width: 180px;
}

.mediation-status-field {
    width: 280px;
}

.mediation-fields-row input,
.mediation-fields-row select {
    width: 100%;
}

@media (max-width: 800px) {
    .mediation-fields-row {
        flex-wrap: wrap;
    }

    .form-readonly-summary-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.users-table .user-active-col {
    width: 70px;
}

.users-table .user-name-col,
.users-table .user-area-col,
.users-table .user-access-col {
    width: 101px;
}

.users-table .user-date-col {
    width: 201px;
}

.user-active-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.user-active-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    cursor: pointer;
}

.data-form .announcement-visible-field {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
}

.data-form .announcement-visible-field input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}

.mediator-login-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.mediator-login-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    cursor: pointer;
}

.inline-upload-form {
    display: inline-flex;
    margin: 0;
}

.file-import-input {
    display: none;
}

.radio-inline-form {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.radio-inline-form label {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin: 0;
    white-space: nowrap;
}

.radio-inline-form input[type="radio"] {
    width: 14px;
    min-height: 14px;
    margin: 0;
    padding: 0;
}

.settings-fieldset {
    min-width: 0;
    margin: 0;
    border: 1px solid #d9e6e2;
    border-radius: 8px;
    padding: 18px;
    background: #fbfdfc;
}

.settings-fieldset legend {
    padding: 0 8px;
    color: var(--site-primary);
    font-weight: 800;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: #2d3b49;
    font-weight: 700;
}

.checkbox-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.checkbox-options label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    white-space: nowrap;
}

.checkbox-options input[type="checkbox"] {
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}

/* Website settings: grouped card layout matching the teaexam settings page. */
.mediate-site-settings {
    max-width: 1120px;
    margin-inline: auto;
    padding: 26px;
    border: 1px solid #dce8e4;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(25, 72, 64, .08);
}

.site-settings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -26px -26px 24px;
    padding: 24px 26px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(135deg, #edf8f5 0%, #f8fbfa 60%, #ffffff 100%);
    border-bottom: 1px solid #d8e7e2;
}

.site-settings-heading h1 {
    margin: 0 0 6px;
    color: #123f3a;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: .04em;
}

.site-settings-heading p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

.site-settings-form {
    display: grid;
    gap: 22px;
}

.site-settings-card {
    --section-color: #278575;
    min-width: 0;
    margin: 0;
    padding: 22px 24px 24px;
    border: 1px solid #d8e2df;
    border-top: 4px solid var(--section-color);
    border-radius: 8px;
    background: #fbfdfc;
    box-shadow: 0 5px 15px rgba(34, 82, 73, .05);
}

.site-settings-card:nth-of-type(2) {
    --section-color: #3a79a8;
}

.site-settings-card:nth-of-type(3) {
    --section-color: #9a6b25;
}

.site-settings-card:nth-of-type(4) {
    --section-color: #6f5b9d;
}

.site-settings-card legend {
    padding: 0 8px;
    color: var(--section-color);
    font-size: 21px;
    font-weight: 700;
}

.site-settings-card legend span {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border-radius: 50%;
    color: #fff;
    background: var(--section-color);
    font-size: 12px;
    box-shadow: 0 3px 8px color-mix(in srgb, var(--section-color) 30%, transparent);
}

.site-settings-card > p {
    margin: 0 0 20px;
    padding-bottom: 13px;
    border-bottom: 1px dashed #d4e1dd;
    color: #64748b;
    line-height: 1.6;
}

.site-setting-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.site-setting-grid > label {
    display: grid;
    gap: 6px;
    align-content: start;
    font-weight: 700;
    color: #253b38;
}

.site-setting-grid input:not([type="checkbox"]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 9px 11px;
    border: 1px solid #c8d5d1;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.site-setting-grid input:focus {
    outline: 3px solid rgba(39, 133, 117, .15);
    border-color: #278575;
    background: #fff;
}

.site-setting-grid em {
    color: #a32626;
    font-size: 12px;
    font-style: normal;
}

.site-setting-grid small,
.format-setting small {
    color: #64748b;
    font-weight: 400;
}

.site-setting-grid .full-width {
    grid-column: 1 / -1;
}

.format-setting > strong {
    display: block;
    margin-bottom: 10px;
    color: #253b38;
}

.format-setting > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #dae6e2;
    border-radius: 8px;
    background: #fff;
}

.format-setting label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 74px;
    padding: 7px 10px;
    border: 1px solid #d7e4e0;
    border-radius: 999px;
    background: #f7fbfa;
    color: #29423e;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
}

.format-setting label:hover {
    border-color: #278575;
    background: #eef8f5;
}

.format-setting input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}

.site-settings-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid #d8e2df;
    border-radius: 8px;
    background: linear-gradient(90deg, #edf7f4, #f8fbfa);
    box-shadow: inset 0 1px 0 #fff;
}

.site-logo-setting {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    align-items: end;
}

.site-logo-setting > label {
    display: grid;
    gap: 6px;
    min-width: min(420px, 100%);
    color: #172638;
    font-size: 16px;
    font-weight: 700;
}

.site-logo-setting input[type="file"] {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #afbecd;
    border-radius: 2px;
    background: #fff;
    font: inherit;
}

.site-logo-setting small {
    color: #52616d;
    font-size: 12px;
    font-weight: 400;
}

.site-logo-preview {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.site-logo-preview img {
    display: block;
    width: 180px;
    height: 20px;
    border: 1px solid #afbecd;
    object-fit: cover;
}

.site-primary-color-setting {
    display: grid;
    gap: 7px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #d8e2df;
}

.site-primary-color-setting > label {
    color: #172638;
    font-size: 16px;
    font-weight: 700;
}

.site-primary-color-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-primary-color-control input[type="color"] {
    width: 74px;
    height: 48px;
    min-height: 48px;
    padding: 4px;
    border: 1px solid #afbecd;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
}

.site-primary-color-control output {
    color: #172638;
    font-family: Consolas, "Courier New", monospace;
    font-size: 16px;
    font-weight: 700;
}

.site-primary-color-setting small {
    color: #52616d;
    font-size: 12px;
}

.site-settings-actions .btn {
    min-width: 150px;
    box-shadow: 0 5px 12px rgba(39, 133, 117, .18);
}

.site-settings-actions span {
    color: #64748b;
}

@media (max-width: 760px) {
    .mediate-site-settings {
        padding: 18px;
    }

    .site-settings-heading {
        margin: -18px -18px 20px;
        padding: 20px 18px;
    }

    .site-settings-heading,
    .site-settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .site-setting-grid {
        grid-template-columns: 1fr;
    }

    .site-setting-grid .full-width {
        grid-column: auto;
    }

    .site-settings-card {
        padding: 20px 16px;
    }
}

/* Compact settings layout matching the supplied fieldset reference. */
.mediate-site-settings {
    width: min(1080px, 100%);
    max-width: 1080px;
    margin-inline: auto;
    padding: 26px 30px 30px;
    border: 0;
    border-right: 1px solid #cbd9df;
    border-left: 1px solid #cbd9df;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: 16px;
}

.site-settings-heading {
    margin: 0 0 14px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid #d5dfdc;
    border-radius: 0;
    background: transparent;
}

.site-settings-heading h1 {
    margin: 0 0 3px;
    font-size: 34px;
    letter-spacing: 0;
}

.site-settings-heading p {
    font-size: 17px;
}

.site-settings-heading .btn {
    padding: 7px 13px;
    font-size: 16px;
}

.site-settings-form {
    gap: 20px;
}

.site-settings-card,
.site-settings-card:nth-of-type(2),
.site-settings-card:nth-of-type(3),
.site-settings-card:nth-of-type(4) {
    --section-color: var(--site-primary);
    padding: 18px 22px 21px;
    border: 1px solid #cbd9df;
    border-radius: 4px;
    background: #fbfcfd;
    box-shadow: none;
}

.site-settings-card legend {
    padding: 0 7px 0 4px;
    color: var(--site-primary-text);
    font-size: 20px;
    line-height: 1;
}

.site-settings-card legend span {
    width: 26px;
    height: 26px;
    margin-right: 5px;
    background: var(--site-primary);
    font-size: 11px;
    box-shadow: none;
}

.site-settings-card > p {
    margin: 4px 0 16px;
    padding: 0;
    border: 0;
    color: #52616d;
    font-size: 16px;
    line-height: 1.5;
}

.site-setting-grid {
    gap: 15px 22px;
}

.site-setting-grid > label {
    gap: 4px;
    color: #172638;
    font-size: 16px;
}

.site-setting-grid input:not([type="checkbox"]) {
    min-height: 44px;
    padding: 9px 11px;
    border-color: #afbecd;
    border-radius: 2px;
    font-size: 16px;
}

.site-setting-grid em {
    order: 2;
    margin-top: -1px;
    color: #c12c2c;
    font-size: 12px;
}

.site-setting-grid label input {
    order: 3;
}

.site-setting-grid small,
.format-setting small {
    font-size: 12px;
    line-height: 1.45;
}

.format-setting > strong {
    margin-bottom: 9px;
    color: #172638;
    font-size: 16px;
}

.format-setting > div {
    gap: 7px 13px;
    margin-bottom: 5px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.format-setting label {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #172638;
    font-size: 15px;
    font-weight: 400;
}

.format-setting label:hover {
    border-color: transparent;
    background: transparent;
}

.format-setting input[type="checkbox"] {
    width: 13px;
    height: 13px;
    min-height: 13px;
}

.site-status-setting > strong {
    display: block;
    margin-bottom: 9px;
    color: #172638;
    font-size: 16px;
}

.site-status-setting > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
}

.site-status-setting label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
}

.site-status-setting input[type="radio"] {
    appearance: auto;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}

.current-ip-hint {
    color: #52616d;
    font-size: 14px;
    font-weight: 400;
}

.site-setting-grid textarea {
    order: 3;
    width: 100%;
    min-height: 128px;
    padding: 10px 11px;
    resize: vertical;
    border: 1px solid #afbecd;
    border-radius: 2px;
    color: #243040;
    background: #fff;
    font: inherit;
    line-height: 1.6;
}

.site-settings-actions {
    justify-content: flex-start;
    gap: 12px;
    padding: 15px 22px;
    border: 1px solid #cbd9df;
    border-radius: 4px;
    background: #f7faf9;
    box-shadow: none;
}

.site-settings-actions .btn {
    min-width: 118px;
    padding: 8px 16px;
    box-shadow: none;
    font-size: 15px;
}

.site-settings-actions span {
    font-size: 14px;
}

.maintenance-access-panel {
    width: min(1080px, 100%);
    margin-inline: auto;
    padding: 58px 28px;
    border-right: 1px solid #cbd9df;
    border-left: 1px solid #cbd9df;
    border-radius: 0;
    text-align: center;
}

.maintenance-access-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--site-primary);
    font-size: 34px;
}

.maintenance-access-panel h1 {
    margin: 0 0 12px;
    color: #17344a;
    font-size: 34px;
}

.maintenance-access-panel p {
    margin: 0 0 24px;
    color: #52616d;
    font-size: 18px;
}

.mediate-site-settings .notice-error {
    color: #9f1d1d;
    border-color: #efb5b5;
    background: #fff0f0;
    font-weight: 700;
}

@media (max-width: 620px) {
    .mediate-site-settings {
        width: 100%;
        padding: 12px;
    }

    .site-settings-heading {
        margin: 0 0 12px;
        padding-bottom: 12px;
    }

    .site-settings-card {
        padding: 12px;
    }

    .site-settings-actions {
        align-items: stretch;
    }
}

.toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border: 1px solid #dfe7e4;
    border-radius: 8px;
    padding: 14px;
    background: #f8fbfa;
}

.toolbar-form label {
    margin-right: 4px;
}

.toolbar-form select {
    width: auto;
    min-width: 220px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #dfe7e4;
    padding-top: 16px;
    color: #4f5d69;
}

.pagination-top {
    border-top: 0;
    border-bottom: 1px solid #dfe7e4;
    padding-top: 0;
    padding-bottom: 14px;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.small-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--site-primary);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--site-primary);
    background: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.page-number {
    min-width: 36px;
    padding: 0 10px;
}

.active-page {
    color: #ffffff;
    background: var(--site-primary);
}

.page-ellipsis {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    color: #667481;
    font-weight: 700;
}

.danger-button {
    color: #9a2f2f;
    border-color: #e5b7b7;
    background: #fff5f5;
}

.icon-delete-button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5b7b7;
    border-radius: 50%;
    background: #fff5f5;
    color: #9a2f2f;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.icon-delete-button:hover {
    border-color: #c44a4a;
    background: #ffe8e8;
}

select,
textarea {
    width: 100%;
    border: 1px solid #cbd8d7;
    border-radius: 8px;
    padding: 10px 12px;
    color: #213140;
    font-family: inherit;
    font-size: 1rem;
    background: #ffffff;
}

select {
    min-height: 46px;
}

textarea {
    resize: vertical;
}

select:focus,
textarea:focus {
    border-color: var(--site-primary);
    outline: 3px solid color-mix(in srgb, var(--site-primary) 16%, transparent);
}

@media (max-width: 760px) {
    .site-shell {
        padding: 16px;
    }

    .site-logo {
        height: 120px;
    }

    .guide-button {
        position: static;
        width: 100%;
        margin-bottom: 10px;
        color: var(--site-primary);
        border-color: #c6d5d3;
        background: #ffffff;
    }

    .site-nav {
        justify-content: center;
    }

    .nav-button {
        flex: 1 1 50%;
        min-height: 38px;
    }

    .duties-panel {
        padding: 22px 16px;
    }

    .duties-heading {
        margin-bottom: 20px;
    }

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

    .duty-card-header {
        padding: 18px;
    }

    .duty-list {
        padding-right: 18px;
        padding-left: 18px;
    }

    .event-section {
        padding: 16px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .password-change-line {
        grid-template-columns: 1fr;
    }

    .case-card-top {
        align-items: flex-start;
    }

    .case-actions {
        width: 100%;
    }

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

    .case-summary,
    .case-mediation-info {
        border-right: 0;
    }

    .case-description,
    .case-mediation-info,
    .case-mediation-description {
        border-top: 1px solid #d5e4e1;
    }

    .my-event-card-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .my-event-card-grid {
        grid-template-columns: 1fr;
    }

    .my-event-card-info {
        border-right: 0;
        border-bottom: 1px solid #d9e9e5;
    }

    .school-line {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .school-lookup-panel {
        max-width: none;
    }

    .school-lookup-control {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .data-form .school-lookup-control label {
        min-width: 0;
    }

    .school-lookup-control input {
        width: 100%;
    }

    .school-search-results {
        top: calc(100% + 4px);
        left: 0;
        width: 100%;
    }

    .school-line .city-select,
    .school-line .school-name-input,
    .school-line .stage-select {
        grid-column: 1 / -1;
    }

    .bar-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .bar-value {
        text-align: left;
    }

    .home-shell,
    .dashboard-shell {
        padding: 18px;
    }

    .hero,
    .module-grid {
        grid-template-columns: 1fr;
    }

    .hero__content,
    .info-panel,
    .auth-card {
        padding: 24px;
    }

    .compact-login-form {
        grid-template-columns: 1fr;
    }

    .compact-login-form label[for="user_id"],
    .forgot-password-form label[for="forgot-user-id"],
    .forgot-password-form label[for="forgot-email"],
    .forgot-password-form label[for="forgot-tel"],
    .forgot-password-form .forgot-password-account-input,
    .forgot-password-form .forgot-password-email-input,
    .forgot-password-form .forgot-password-tel-input,
    .compact-login-form .plain-secret-input,
    .compact-login-form label[for="passwd"],
    .compact-login-form .secret-input:not(.plain-secret-input),
    .compact-login-form label[for="captcha"],
    .compact-login-form .captcha-row,
    .compact-login-form label[for="email"],
    .compact-login-form label[for="cellphone"],
    .compact-login-form .mediator-phone-input {
        grid-column: 1;
        grid-row: auto;
    }
}
/* Registration contact fields share one row on desktop. */
.registration-contact-row,
.registration-credential-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;
    align-items: center;
    margin-bottom: 16px;
}

.registration-contact-row label,
.registration-credential-row label {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}

.registration-contact-row input,
.registration-credential-row input {
    width: auto;
    min-width: 0;
}

.registration-name-field input {
    width: 190px;
}

.registration-position-field input {
    width: 170px;
}

.registration-phone-field input {
    width: 230px;
}

.registration-account-field input {
    width: 190px;
}

.registration-password-field input {
    width: 190px;
}

.registration-confirm-field input {
    width: 190px;
}

.registration-password-help {
    margin: -8px 0 16px;
    color: #5b4332;
    font-size: 0.92rem;
    line-height: 1.5;
}

.registration-section-title {
    margin: 0 0 18px;
    padding-left: 10px;
    border-left: 4px solid var(--brand-orange-accent);
    color: var(--brand-coffee);
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.4;
}

.registration-applicant-section {
    margin: 6px 0 20px;
    padding: 18px 20px 4px;
    border: 1px solid #e5c6aa;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 3px 10px rgba(116, 59, 38, 0.06);
}

.user-access-field select {
    width: 170px;
}

.user-active-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.registration-credential-row .user-active-field input[type="checkbox"] {
    appearance: auto;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}

.registration-email-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.registration-email-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}

.registration-email-row input {
    width: 520px;
}

.registration-heading-row {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-bottom: 18px;
}

.registration-heading-row h1 {
    flex: 0 0 auto;
    margin: 0;
}

.registration-guidance {
    flex: 1 1 auto;
    margin: 0;
    padding: 18px 22px;
    color: #14343d;
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.8;
    background: var(--brand-orange-soft);
    border-left: 5px solid var(--brand-orange-accent);
    border-radius: 6px;
}

.registration-form {
    border-color: #f0dac5;
    background: var(--brand-orange-soft);
}

.registration-guidance a {
    color: #0d594d;
    font-weight: 800;
    text-decoration: underline;
}

.registration-success-notice {
    color: #c62828;
    font-size: 1.3rem;
    font-weight: 800;
}

.registration-captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.registration-captcha-row .registration-inline-label {
    font-weight: 600;
    white-space: nowrap;
}

.registration-captcha-row input {
    width: 220px;
}

@media (max-width: 800px) {
    .registration-heading-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .registration-contact-row,
    .registration-credential-row {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .registration-contact-row label,
    .registration-credential-row label {
        width: 100%;
    }

    .registration-contact-row input,
    .registration-credential-row input {
        flex: 1 1 auto;
        width: auto;
    }

    .registration-email-row label {
        width: 100%;
    }

    .registration-email-row input {
        flex: 1 1 auto;
        width: auto;
    }

    .registration-captcha-row {
        flex-wrap: wrap;
    }

    .registration-captcha-row input {
        flex: 1 1 180px;
        width: auto;
    }
}

