* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #20242a;
    background: #f6f8fb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px max(20px, calc((100vw - 1180px) / 2));
    color: #fff;
    background: #193b5a;
}

.site-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: 0;
}

.site-header p {
    margin: 0;
    color: #d7e3ed;
}

.admin-link {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 6px;
    text-decoration: none;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-header {
    align-items: flex-start;
}

.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.system-management-panel {
    margin-top: 20px;
}

.role-editor {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr);
    gap: 16px;
    align-items: stretch;
}

.role-help-card {
    padding: 16px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #f7fafc;
}

.role-help-card h3 {
    margin: 0 0 8px;
    color: #193b5a;
    font-size: 16px;
}

.role-help-card p {
    margin: 0;
    color: #44566c;
}

.logout-form {
    margin: 0;
}

.logout-button {
    font: inherit;
    background: transparent;
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.home-page {
    padding: 32px 0 56px;
}

.home-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.service-section {
    margin-bottom: 32px;
}

.service-section > h2 {
    margin: 0 0 16px;
    color: #173a5a;
    font-size: 24px;
}

.service-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.service-card {
    padding: 22px;
    border: 1px solid #d7e3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .05);
}

.service-card h3 {
    margin: 0 0 8px;
    color: #174363;
    font-size: 18px;
}

.service-card p,
.service-note {
    margin: 0;
    color: #607187;
}

.service-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef4f9;
}

.entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: stretch;
    margin-top: 32px;
}

.entry-primary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 320px;
    padding: 36px;
    color: #0f3a5f;
    border: 3px solid #1f6fa5;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #f1f8fd 100%);
    box-shadow: 0 16px 36px rgba(23, 67, 99, .12);
}

.entry-title-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 18px;
}

.entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #1f6fa5;
    background: #e7f2fb;
}

.entry-icon svg {
    width: 24px;
    height: 24px;
}

.entry-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.entry-primary-card h2 {
    margin: 0;
    color: #0f3a5f;
    font-size: 2.35rem;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0;
}

.entry-primary-card p {
    max-width: 680px;
    margin: 0;
    color: #24465f;
}

.entry-primary-lead {
    font-size: 1.12rem;
    line-height: 1.75;
}

.entry-feature-list {
    display: grid;
    gap: .75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.entry-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    color: #143a56;
    font-size: 1.08rem;
    line-height: 1.65;
}

.entry-feature-list li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: .12rem;
    border-radius: 999px;
    color: #1f6fa5;
    background: #e7f2fb;
    font-weight: 800;
}

.entry-primary-actions {
    display: flex;
    gap: .85rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.entry-primary-card .button {
    border-color: #1f6fa5;
    color: #1f6fa5;
    background: #fff;
}

.entry-primary-card .button.primary {
    border-color: #1f6fa5;
    color: #fff;
    background: #1f6fa5;
}

.entry-primary-action-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    padding: 1rem 1.7rem;
    border-radius: 12px;
    font-size: 2.35rem;
    line-height: 1.2;
    font-weight: 900;
    white-space: nowrap;
}

.entry-primary-action-secondary {
    min-height: 50px;
    padding: .9rem 1.25rem;
    border-radius: 10px;
    font-size: 1rem;
}

.entry-secondary-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
}

.entry-secondary-stack-single {
    grid-template-rows: 1fr;
}

.entry-secondary-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid #d7e3ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .05);
}

.entry-secondary-card h2 {
    margin: 0;
    color: #174363;
    font-size: 21px;
}

.entry-secondary-card p {
    margin: 0 0 18px;
    color: #607187;
}

.status-query-section {
    margin-top: 48px;
}

.status-query-section > h2 {
    margin: 0 0 16px;
    color: #173a5a;
}

.home-version-note-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 1.75rem;
    padding: 0 1rem;
    box-sizing: border-box;
}

.home-version-note {
    display: inline-block;
    width: auto;
    max-width: 100%;
    padding: .75rem 1.25rem;
    text-align: center;
    font-size: .98rem;
    line-height: 1.55;
    font-weight: 600;
    color: #9f2424;
    background-color: #fff7f7;
    border: 2px solid #d85a5a;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(159, 36, 36, .08);
    box-sizing: border-box;
}

.home-version-note strong {
    color: #8f1f1f;
    font-weight: 800;
}

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

.home-shell {
    display: grid;
    gap: 28px;
}

.home-requirement {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .65fr);
    gap: 18px;
    align-items: start;
    padding: 18px 20px;
    border: 1px solid #dbe5ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .05);
}

.home-requirement h2,
.home-section-heading h2 {
    margin: 0 0 6px;
    color: #173a5a;
}

.home-requirement p,
.home-section-heading p {
    margin: 0;
    color: #607187;
}

.home-requirement details {
    padding: 12px 14px;
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #f8fbfe;
}

.home-requirement summary {
    color: #1d5f8f;
    cursor: pointer;
    font-weight: 700;
}

.home-requirement .rich-text {
    max-height: 220px;
    margin-top: 12px;
    overflow: auto;
    color: #4b5c70;
    font-size: 14px;
}

.home-entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr);
    gap: 20px;
    align-items: stretch;
}

.home-primary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
    padding: 34px;
    color: #fff;
    border-radius: 8px;
    background: #193b5a;
    box-shadow: 0 16px 34px rgba(20, 45, 75, .16);
}

.entry-label {
    width: fit-content;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #dceaf6;
    font-size: 13px;
    font-weight: 700;
}

.home-primary-card h2 {
    margin: 18px 0 12px;
    font-size: 34px;
    letter-spacing: 0;
}

.home-primary-card p {
    max-width: 620px;
    margin: 0 0 24px;
    color: #e6eef6;
    font-size: 17px;
}

.home-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.home-primary-card .button {
    border-color: rgba(255, 255, 255, .72);
    color: #fff;
    background: transparent;
}

.home-primary-card .button.primary {
    border-color: #fff;
    color: #193b5a;
    background: #fff;
}

.home-secondary-stack {
    display: grid;
    gap: 16px;
}

.secondary-entry-card {
    box-shadow: none;
}

.secondary-entry-card h2 {
    color: #193b5a;
}

.secondary-entry-card p {
    color: #607187;
}

.compact-template-list {
    max-height: 116px;
    overflow: auto;
}

.mode-card,
.entry-form section,
.login-box,
.success,
.alert,
.info-panel {
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .06);
}

.mode-card {
    padding: 24px;
}

.mode-card-note {
    margin: 14px 0 8px;
    color: #607187;
    font-size: 14px;
}

.mode-card h2,
.entry-form h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.entry-form section > h2,
.entry-form .section-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e9f1;
    color: #173a5a;
    font-size: 22px;
    font-weight: 700;
}

.entry-form section > h2::before,
.entry-form .section-title h2::before {
    content: "";
    width: 4px;
    height: 22px;
    border-radius: 99px;
    background: #1d5f8f;
}

.mode-card.disabled {
    color: #6d7480;
    background: #f7f8fa;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid #9fb1c5;
    border-radius: 6px;
    color: #193b5a;
    background: #fff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.button.primary {
    color: #fff;
    border-color: #1d5f8f;
    background: #1d5f8f;
}

.button.muted {
    color: #7b8491;
    border-color: #d0d8e2;
    background: #eef2f6;
}

.button.small {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 14px;
}

.upload-submit {
    gap: .5rem;
}

.upload-submit:disabled {
    cursor: wait;
    opacity: .85;
}

.upload-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: upload-spin .8s linear infinite;
}

.upload-submit.is-loading .upload-spinner {
    display: inline-block;
}

.hint {
    color: #64748b;
    font-size: 14px;
}

@keyframes upload-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-shell {
    max-width: 980px;
}

.wizard-shell {
    max-width: 1040px;
}

.wizard-top-card,
.wizard-card,
.upload-card {
    background: #fff;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .06);
}

.wizard-top-card {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.wizard-kicker {
    display: block;
    margin-bottom: 4px;
    color: #55708a;
    font-size: 13px;
    font-weight: 700;
}

.wizard-top-card h2 {
    margin: 0;
    color: #173a5a;
    font-size: 24px;
}

.wizard-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    margin: 0;
}

.wizard-meta div {
    padding: 10px 12px;
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #f7f9fc;
}

.wizard-meta dt {
    margin: 0 0 3px;
    color: #667587;
    font-size: 12px;
}

.wizard-meta dd {
    margin: 0;
    color: #173a5a;
    font-weight: 700;
}

.wizard-card {
    padding: 24px;
    margin-bottom: 18px;
}

.wizard-card h2,
.upload-card h2 {
    margin: 0 0 16px;
    color: #173a5a;
    font-size: 22px;
}

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

.workbench-card {
    padding: 24px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .06);
}

.workbench-card h2 {
    margin: 6px 0 10px;
    color: #173a5a;
}

.workbench-card p {
    color: #516174;
    line-height: 1.7;
}

.workbench-count {
    color: #1d5f8f !important;
    font-size: 28px;
    font-weight: 800;
}

.workbench-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.workbench-metrics div {
    padding: 12px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.workbench-metrics dt {
    margin-bottom: 4px;
    color: #607187;
    font-size: 13px;
}

.workbench-metrics dd {
    color: #173a5a;
    font-size: 22px;
    font-weight: 800;
}

.page-intro-card h2 {
    margin-bottom: 6px;
}

.page-intro-card p {
    margin: 0;
    color: #5f6f82;
}

.entry-form section {
    padding: 22px;
    margin-bottom: 18px;
}

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

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.input-with-unit span {
    color: #445365;
    font-weight: 700;
    white-space: nowrap;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #fff;
    color: #1f2730;
    font: inherit;
}

textarea {
    resize: vertical;
}

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

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.section-title h2 {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.qualification-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    margin-bottom: 10px;
}

.remove-row {
    border: 1px solid #d9a5a5;
    border-radius: 6px;
    color: #9a2e2e;
    background: #fff;
    cursor: pointer;
}

.notice {
    padding: 12px;
    border-left: 4px solid #1d5f8f;
    background: #eef6fb;
}

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

.qr-grid > div {
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
}

.qr-grid img {
    max-width: 180px;
    width: 100%;
    height: auto;
}

.empty {
    color: #7a828c;
}

.info-panel {
    padding: 20px 22px;
    margin-bottom: 18px;
}

.home-status-entry {
    margin-top: 18px;
}

.home-section-heading {
    margin-bottom: 16px;
}

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

.status-query-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.status-query-card h3 {
    margin: 0;
    color: #173a5a;
    font-size: 16px;
}

.process-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 0 0 20px;
    padding: 18px 20px;
    overflow-x: auto;
    list-style: none;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .06);
}

.process-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 118px;
    flex: 1 0 118px;
    color: #7a8491;
    text-align: center;
}

.process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: #d7e0ea;
}

.process-step.done:not(:last-child)::after,
.process-step.active:not(:last-child)::after {
    background: #1d5f8f;
}

.process-step-number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid #c9d5e2;
    border-radius: 50%;
    color: #6d7885;
    background: #f4f7fa;
    font-weight: 700;
}

.process-step.done .process-step-number,
.process-step.active .process-step-number {
    color: #fff;
    border-color: #1d5f8f;
    background: #1d5f8f;
}

.process-step.active .process-step-number {
    box-shadow: 0 0 0 4px rgba(29, 95, 143, .14);
}

.process-step-label {
    max-width: 112px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.process-step.done,
.process-step.active {
    color: #173a5a;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.captcha-row img {
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    background: #eef4f8;
}

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

.material-group {
    margin-bottom: 24px;
}

.material-group-heading {
    margin-bottom: 12px;
}

.material-group-heading h2 {
    margin: 0 0 6px;
    color: #173a5a;
    font-size: 22px;
}

.material-group-heading p {
    margin: 0;
    color: #607187;
}

.upload-card {
    padding: 20px;
}

.upload-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.upload-card p {
    margin: 0 0 12px;
    color: #657386;
}

.material-badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.material-badge.required {
    color: #9a2e2e;
    border: 1px solid #efc2c2;
    background: #fff4f4;
}

.material-badge.optional {
    color: #5f6f82;
    border: 1px solid #d7e0ea;
    background: #f4f7fa;
}

.upload-card form {
    display: grid;
    gap: 10px;
}

.auto-upload-control {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.attachment-upload-status {
    margin: 0;
    color: #657386;
    font-size: 14px;
    font-weight: 700;
}

.attachment-upload-status.is-uploading {
    color: #1d5f8f;
}

.attachment-upload-status.is-success {
    color: #1f6f48;
}

.attachment-upload-status.is-error {
    color: #9a2e2e;
}

.attachment-page-upload-message {
    min-height: 1.5em;
    margin: 4px 0 0;
    font-weight: 700;
}

.attachment-page-upload-message.is-uploading {
    color: #1d5f8f;
}

.attachment-page-upload-message.is-error {
    color: #9a2e2e;
}

.attachment-file-button {
    position: relative;
    overflow: hidden;
    gap: 8px;
}

.attachment-file-button::before {
    content: "";
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: upload-spin .8s linear infinite;
}

.attachment-file-button.is-loading {
    cursor: wait;
    opacity: .85;
}

.attachment-file-button.is-loading::before {
    display: inline-block;
}

.attachment-file-button input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.attachment-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e9f1;
    border-radius: 6px;
    background: #f8fafc;
}

.payment-attachment-field {
    display: grid;
    gap: 8px;
}

.payment-attachment-label {
    color: #1f2730;
    font-weight: 600;
}

.link-button {
    padding: 0;
    border: 0;
    color: #1d5f8f;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.link-button.danger {
    color: #9a2e4f;
}

.summary-card dl,
.success-summary {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px 16px;
    margin: 0;
    text-align: left;
}

.summary-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

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

.payment-method-card {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
}

.payment-method-card.selected {
    border-color: #1d5f8f;
    background: #eef6fb;
    box-shadow: inset 0 0 0 1px #1d5f8f;
}

.payment-method-card input {
    width: auto;
    min-height: auto;
    margin-top: 4px;
}

.payment-method-card strong,
.payment-method-card small {
    display: block;
}

.payment-method-card strong {
    color: #173a5a;
    font-size: 17px;
}

.payment-method-card small {
    margin-top: 4px;
    color: #63758a;
}

.payment-panel {
    margin: 14px 0;
    padding: 18px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.payment-panel h3 {
    margin: 0 0 8px;
    color: #173a5a;
    font-size: 18px;
}

.payment-panel p {
    margin: 0 0 12px;
}

.service-qr-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    border: 1px solid #e2e9f1;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.service-qr-card img {
    width: min(220px, 80vw);
    height: auto;
}

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

.payment-info-grid .summary-card {
    padding: 18px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.payment-info-grid h3 {
    margin: 0 0 12px;
    color: #173a5a;
}

.payment-method-static-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.payment-method-static-card p {
    margin: 0;
    color: #516174;
    line-height: 1.7;
}

.payment-method-static-card dl {
    margin: 0;
}

.payment-warning-card {
    border-color: #b8cce0 !important;
    background: #f3f8fd !important;
}

.payment-warning-card p {
    margin: 0;
    color: #173a5a;
    font-weight: 700;
    line-height: 1.7;
}

.payment-amount-display {
    margin: 0;
    color: #173a5a;
    font-size: 22px;
    font-weight: 800;
}

.payment-qr-layout {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.payment-qr-card {
    flex: 0 0 280px;
}

.payment-qr-rant {
    flex: 1 1 320px;
    padding: 16px 18px;
    border: 1px solid #e4b5b5;
    border-radius: 8px;
    color: #4c2b2b;
    background: #fff5f5;
    font-size: 14px;
    line-height: 1.6;
}

.payment-qr-rant h4 {
    margin: 0 0 10px;
    color: #8a2525;
    font-size: 16px;
}

.payment-qr-rant p {
    margin: 0 0 8px;
}

.payment-qr-rant p:last-child {
    margin-bottom: 0;
}

.payment-registration,
.invoice-fields {
    margin-top: 14px;
}

.invoice-fields.is-hidden,
.invoice-fields[hidden] {
    display: none !important;
}

.invoice-toggle-line {
    margin: 8px 0 14px;
}

.invoice-toggle-line p {
    margin: 6px 0 0;
    color: #607187;
    font-size: 14px;
}

.agreement-shell {
    max-width: 920px;
}

.agreement-card {
    padding: 26px 30px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 45, 75, .06);
}

.agreement-card section + section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e7edf4;
}

.agreement-card h2 {
    margin: 0 0 8px;
    font-size: 19px;
    color: #173a5a;
}

.agreement-card p,
.agreement-card ul,
.agreement-card ol {
    margin: 0;
}

.agreement-card ul,
.agreement-card ol {
    padding-left: 20px;
}

.agreement-document {
    font-size: 15px;
}

.agreement-scroll-box {
    max-height: min(520px, 60vh);
    overflow-y: auto;
    padding: 22px 24px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fbfcfe;
}

.agreement-document-title {
    margin: 0 0 24px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.45;
    color: #0f3a5f;
}

.agreement-document h3 {
    margin: 14px 0 8px;
    font-size: 16px;
    color: #2d506d;
}

.agreement-document p + p,
.agreement-document p + ol,
.agreement-document ol + p {
    margin-top: 10px;
}

.agreement-document li + li {
    margin-top: 8px;
}

.agreement-document a {
    color: #1d5f8f;
}

.agreement-confirm {
    margin: 18px 0 42px;
    padding: 18px 20px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
}

.agreement-checkbox {
    display: flex;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.55;
}

.agreement-checkbox input {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
    flex: 0 0 auto;
}

.agreement-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.agreement-actions .button.primary:disabled {
    color: #7b8491;
    border-color: #d0d8e2;
    background: #eef2f6;
    cursor: not-allowed;
}

.button.cancel {
    color: #9a2e4f;
    border-color: #efb8c7;
    background: #fff0f4;
}

.rich-text :first-child {
    margin-top: 0;
}

.rich-text :last-child {
    margin-bottom: 0;
}

.template-list {
    padding-left: 18px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.draft-status {
    margin: 0 0 12px;
    color: #5e6a78;
}

.token-box {
    overflow-wrap: anywhere;
    margin: 18px 0;
    padding: 14px;
    border: 1px dashed #1d5f8f;
    border-radius: 8px;
    color: #143b5d;
    background: #eef6fb;
    font-family: Consolas, Monaco, monospace;
}

.actions {
    margin: 20px 0 42px;
}

.alert {
    padding: 14px 18px;
    margin-bottom: 18px;
}

.alert.error {
    color: #8a2525;
    border-color: #efc2c2;
    background: #fff7f7;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    gap: 10px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid #e7edf4;
    text-align: left;
    vertical-align: top;
}

th {
    color: #445365;
    background: #f3f6fa;
    font-weight: 700;
}

td a {
    margin-right: 10px;
    color: #1d5f8f;
}

.table-actions {
    white-space: nowrap;
}

.muted-text {
    margin-right: 10px;
    color: #7a828c;
}

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

.detail-section {
    padding: 22px;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    background: #fff;
}

.wide-section {
    grid-column: 1 / -1;
}

dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px 14px;
}

dt {
    color: #5c6876;
    font-weight: 700;
}

dd {
    margin: 0;
}

.success {
    max-width: 680px;
    padding: 34px;
    text-align: center;
}

@media (max-width: 900px) {
    .service-card-grid,
    .entry-layout,
    .status-query-grid {
        grid-template-columns: 1fr;
    }

    .entry-secondary-stack {
        grid-template-rows: auto;
    }
}

@media (max-width: 700px) {
    .entry-primary-action-main {
        width: 100%;
        min-height: 64px;
        padding: .9rem 1rem;
        font-size: 1.55rem;
        text-align: center;
        white-space: normal;
    }

    .home-version-note-wrap {
        margin-top: 2rem;
    }

    .home-version-note {
        width: 100%;
        padding: .7rem .9rem;
        font-size: .92rem;
    }
}

@media (max-width: 760px) {
    .site-header {
        display: block;
    }

    .admin-link {
        display: inline-flex;
        margin-top: 14px;
    }

    .mode-grid,
    .home-requirement,
    .home-entry-layout,
    .workbench-grid,
    .workbench-metrics,
    .form-grid,
    .role-editor,
    .qr-grid,
    .qualification-row,
    .filter-bar,
    .detail-grid,
    .status-query-grid,
    .inline-form,
    .upload-card-grid,
    .payment-info-grid,
    .payment-method-grid,
    .wizard-meta,
    .captcha-row,
    .attachment-item,
    .summary-card dl,
    .success-summary {
        grid-template-columns: 1fr;
    }

    .wizard-top-card {
        display: block;
    }

    .wizard-meta {
        margin-top: 14px;
    }

    .wide-section {
        grid-column: auto;
    }

    dl {
        grid-template-columns: 1fr;
    }

    .agreement-card {
        padding: 20px 18px;
    }

    .home-primary-card {
        min-height: auto;
        padding: 26px 22px;
    }

    .home-primary-card h2 {
        font-size: 28px;
    }

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

    .entry-primary-card,
    .entry-secondary-card {
        padding: 24px 20px;
    }

    .entry-primary-card {
        min-height: auto;
    }

    .entry-primary-card h2 {
        font-size: 2rem;
    }

    .entry-primary-actions .button {
        width: 100%;
    }

    .agreement-document {
        font-size: 14px;
    }

    .agreement-scroll-box {
        max-height: 55vh;
        padding: 18px 16px;
    }

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

    .process-steps {
        padding: 16px 14px;
    }

    .process-step {
        min-width: 104px;
        flex-basis: 104px;
    }

    .entry-form section > h2,
    .entry-form .section-title h2 {
        font-size: 20px;
    }

    .payment-qr-layout {
        flex-direction: column;
    }

    .payment-qr-card,
    .payment-qr-rant {
        flex-basis: auto;
    }
}
