/* A single theme for administration and user editors. */
body.app-edit-page {
    --editor-border: #e0e9f3;
    --editor-ink: #152a49;
    --editor-muted: #607693;
    --editor-blue: #0866f9;
}
body.app-edit-page .sidebar-content { container-type: inline-size; }
body.app-edit-page .sidebar-content > .container,
body.app-edit-page .sidebar-content > .container-fluid,
body.app-edit-page .form-preview-workspace__content > .container {
    max-width: none;
    padding: 0;
}
body.app-edit-page .contents { margin: 0; padding: 0; }
body.app-edit-page:not(:has(.project-form-workspace)):has(:is(#administrator-sidebar,#user-sidebar)) .registration-box {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 28px;
    padding: 28px;
    container-type: inline-size;
}
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) .registration-box {
    background: #fff;
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-ink);
    box-shadow: none !important;
}
body.app-edit-page .registration-box .main-heading {
    margin: 0 0 24px;
    padding: 0 0 18px;
    color: #102542;
    font-weight: 700;
    border-bottom: 1px solid #e8eff7;
}
body.app-edit-page .registration-box :is(.section-title,.section-heading) {
    color: #183451;
    padding: 0 0 12px;
    margin: 0 0 20px;
    font-weight: 600;
    border-bottom: 1px solid #e8eff7;
}
body.app-edit-page .section-title span { color: var(--editor-muted); }
body.app-edit-page .admin-editor-form .form-settings-section-heading {
    --section-accent: #0866f9;
    --section-background: #f3f8ff;
    --section-border: #dbe8fb;
    --section-icon-background: #e1ecff;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    background: var(--section-background);
    border: 1px solid var(--section-border);
    border-radius: 8px;
}
body.app-edit-page .admin-editor-form .form-settings-section-heading--mail {
    --section-accent: #187d67;
    --section-background: #f0faf7;
    --section-border: #d5ebe5;
    --section-icon-background: #def1ea;
}
body.app-edit-page .admin-editor-form .form-settings-section-heading__icon {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: var(--section-accent);
    background: var(--section-icon-background);
    border-radius: 8px;
    font-size: 18px;
}
body.app-edit-page .admin-editor-form .form-settings-section-heading__content { flex: 1; min-width: 0; }
body.app-edit-page .admin-editor-form .form-settings-section-heading h3 {
    margin: 0;
    color: #183451;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}
body.app-edit-page .admin-editor-form .form-settings-section-heading p {
    margin: 6px 0 0;
    color: #526a86;
    font-size: 14px;
    line-height: 1.7;
}
body.app-edit-page .registration-box .form-section { margin-bottom: 28px; }
body.app-edit-page .registration-box .form-row { margin-bottom: 24px; }
body.app-edit-page .registration-box .form-section > .form-row:last-child { margin-bottom: 0; }
body.app-edit-page .registration-box .form-section:last-child { margin-bottom: 0; }
body.app-edit-page .registration-box :is(.form-label,.form-group>label,.item-title) {
    color: #304868;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 8px;
}
body.app-edit-page .registration-box :is(.field-label-en,.field-help,.form-text,.section-text,.radio-desc) {
    color: var(--editor-muted);
    line-height: 1.7;
}
body.app-edit-page .registration-box :is(.form-control,.form-select):not(.is-invalid):not(.is-valid),
body.app-edit-page .registration-box .select2-selection {
    border-color: #dce5f0;
    border-radius: 7px;
    color: var(--editor-ink);
}
body.app-edit-page .registration-box :is(input.form-control:not(.select2-hidden-accessible),select,textarea) {
    max-width: 100%;
    min-width: 0;
}
body.app-edit-page .registration-box input.form-control:not(.select2-hidden-accessible) { min-height: 44px; }
body.app-edit-page .registration-box :is(.form-control,.form-select):not(.is-invalid):not(.is-valid):focus {
    border-color: #86b4fb;
    box-shadow: 0 0 0 3px #0866f91a;
}
body.app-edit-page .registration-box .select2-container { max-width: 100%; }
body.app-edit-page .registration-box .select2-container--focus .select2-selection { border-color: #86b4fb; }
body.app-edit-page .registration-box :is(input[type=checkbox],input[type=radio]) { accent-color: var(--editor-blue); }
body.app-edit-page .registration-box .form-check-input:checked { background-color: var(--editor-blue); border-color: var(--editor-blue); }
body.app-edit-page .registration-box :is(.form-control:disabled,.form-control[readonly],.display-field) {
    background: #f6f9fc;
    border: 1px solid #dce5f0;
    color: #607693;
}
body.app-edit-page .registration-box .display-field {
    display: flex;
    align-items: center;
    height: auto;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 7px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}
body.app-edit-page .registration-box textarea::placeholder { color: #8a9bb2; }
body.app-edit-page .registration-box .required-badge { background: #fff0f2; color: #cf3751; border-radius: 4px; white-space: nowrap; }
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) .registration-box .description-box {
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #f3f8ff;
    border: 1px solid #dbe8fb;
    color: #466084;
    border-radius: 7px;
    line-height: 1.8;
}
body.app-edit-page .registration-box .item-description { color: var(--editor-muted); line-height: 1.7; }
body.app-edit-page .registration-box :is(.radio-group,.participation-registration-cards) { gap: 12px; flex-wrap: wrap; }
body.app-edit-page .registration-box .radio-card {
    flex: 1 1 260px;
    width: auto;
    min-height: 88px;
    padding: 16px 20px;
    background: #f6f9fc;
    border: 1px solid var(--editor-border);
    border-radius: 8px;
}
body.app-edit-page .registration-box .radio-card:has(input:checked),
body.app-edit-page .participation-registration-cards .form-check:has(input:checked) { background: #f3f8ff; border-color: #abcafa; }
body.app-edit-page .registration-box .radio-title { color: #183451; }
body.app-edit-page .registration-box .radio-card input[type=radio] { width: 24px; height: 24px; }
body.app-edit-page .registration-box .submit-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8eff7;
}
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.admin-save-button,.admin-back-button,.user-primary-submit-button,.user-secondary-submit-button,.btn) {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 7px;
    line-height: 1.5;
    font-weight: 500;
}
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.admin-save-button,.user-primary-submit-button,.user-secondary-submit-button,.admin-button--fill-primary,.admin-button--fill-secondary,.btn-primary) {
    color: #fff;
    background: var(--editor-blue) !important;
    border: 1px solid var(--editor-blue) !important;
}
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.admin-save-button,.user-primary-submit-button,.user-secondary-submit-button,.admin-button--fill-primary,.admin-button--fill-secondary,.btn-primary):hover:not(:disabled) { background: #0756d1 !important; border-color: #0756d1 !important; }
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.admin-back-button,.admin-button--outline-secondary,.btn-outline-secondary) {
    margin-right: 0;
    color: #466084;
    background: #fff;
    border: 1px solid #dbe5f1;
}
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.admin-back-button,.admin-button--outline-secondary,.btn-outline-secondary):hover:not(:disabled) { background: #f3f8ff; border-color: #abcafa; }
body.app-edit-page:has(:is(#administrator-sidebar,#user-sidebar)) :is(.btn,.admin-save-button,.admin-back-button,.user-primary-submit-button,.user-secondary-submit-button):disabled { opacity: .65; cursor: not-allowed; }
body.app-edit-page .registration-box .ql-toolbar { border-color: #dce5f0; background: #f6f9fc; border-radius: 7px 7px 0 0; }
body.app-edit-page .registration-box .ql-container { border-color: #dce5f0; border-radius: 0 0 7px 7px; }
body.app-edit-page .registration-box .ql-editor { color: var(--editor-ink); line-height: 1.75; }

/* Form information editors use the same preview card as field editors. */
body.app-edit-page .form-preview-workspace { height: auto; gap: 18px; overflow: visible; }
body.app-edit-page .form-preview-workspace__content { height: auto; overflow: visible; }
body.app-edit-page .form-preview-workspace .form-preview-drawer {
    position: sticky;
    top: 84px;
    height: calc(100vh - 106px);
    width: 44px;
    max-width: 44px;
    flex: 0 0 44px;
}
body.app-edit-page .form-preview-workspace .form-preview-drawer.is-open { width: 320px; max-width: 320px; flex-basis: 320px; }
body.app-edit-page .form-preview-workspace .form-preview-drawer__panel { position: relative; top: auto; right: auto; width: 100%; height: 100%; border: 1px solid var(--editor-border); border-radius: 8px; transform: none; overflow: hidden; }
body.app-edit-page .form-preview-workspace .form-preview-drawer:not(.is-open) .form-preview-drawer__panel { border: 0; background: transparent; }
body.app-edit-page .form-preview-workspace .form-preview-drawer:not(.is-open) :is(.form-preview-drawer__header,.form-preview-drawer__body) { display: none; }
body.app-edit-page .form-preview-workspace .form-preview-drawer__toggle { display: none; }
body.app-edit-page .form-preview-workspace .form-preview-drawer:not(.is-open) .form-preview-drawer__toggle { display: flex; position: static; width: 44px; min-height: 132px; border-radius: 7px; box-shadow: none; background: var(--editor-blue); }
body.app-edit-page .form-preview-workspace .form-preview-drawer__header { min-height: 56px; padding: 8px 12px; gap: 8px; border-color: var(--editor-border); }
body.app-edit-page .form-preview-workspace .form-preview-drawer__title { color: #183451; font-size: 16px; font-weight: 600; }
body.app-edit-page .form-preview-workspace .form-preview-drawer__action { width: 34px; height: 34px; min-height: 34px; font-size: 16px; border-color: #dce6f3; }
body.app-edit-page .form-preview-workspace .form-preview-drawer__qr svg { width: 34px; height: 34px; }
@container (max-width:1050px) {
    body.app-edit-page .form-preview-workspace { flex-wrap: wrap; }
    body.app-edit-page .form-preview-workspace__content { flex: 0 0 100%; width: 100%; }
    body.app-edit-page .form-preview-workspace .form-preview-drawer { position: relative; top: auto; width: 100%; max-width: 100%; height: 44px; flex-basis: 100%; }
    body.app-edit-page .form-preview-workspace .form-preview-drawer.is-open { width: 100%; max-width: 100%; height: 620px; flex-basis: 100%; }
    body.app-edit-page .form-preview-workspace .form-preview-drawer:not(.is-open) .form-preview-drawer__toggle { width: auto; min-height: 44px; padding: 10px 16px; writing-mode: horizontal-tb; }
}
@container (max-width:600px) {
    body.app-edit-page .registration-box .date-range-row { flex-direction: column; align-items: stretch !important; }
    body.app-edit-page .registration-box .range-separator { align-self: center; line-height: 1; }
    body.app-edit-page .registration-box .form-row-2 { flex-wrap: wrap; }
    body.app-edit-page .registration-box .form-row-2:not(.item-metadata-row) > .form-group { flex-basis: 100%; }
    body.app-edit-page .registration-box .d-flex:has(> .post_screen-search_address_button),
    body.app-edit-page .registration-box .d-flex:has(> .post_screen-search_postal_code_button) { flex-wrap: wrap; gap: 8px; }
    body.app-edit-page .registration-box :is(.post_screen-search_address_button,.post_screen-search_postal_code_button) { flex: 0 0 100%; height: auto; margin-left: 0 !important; white-space: normal; }
}
@media (max-width:767px) {
    body.app-edit-page:not(:has(.project-form-workspace)):has(:is(#administrator-sidebar,#user-sidebar)) .registration-box { padding: 20px 16px; }
    body.app-edit-page .registration-box .submit-area > :is(button,a) { flex: 1 1 120px; text-align: center; }
}

body.app-edit-page .editor-page-heading { padding: 0; margin: 0 0 24px; }
body.app-edit-page .editor-page-heading p { margin: 8px 0 0; color: var(--editor-muted); }
body.app-edit-page .report-setting,
body.app-edit-page .editor-report-summary { padding: 20px; margin-bottom: 24px; border: 1px solid var(--editor-border); border-radius: 8px; background: #fff; }
body.app-edit-page .editor-report-summary { padding: 0; overflow: auto; }
body.app-edit-page .editor-report-summary .table { margin: 0; min-width: 650px; }
body.app-edit-page .editor-report-workspace .table { --bs-table-border-color: #e9eff7; color: var(--editor-ink); }
body.app-edit-page .editor-report-summary th { background: #f6f9fc; color: var(--editor-muted); font-weight: 500; }
body.app-edit-page .editor-report-summary :is(th,td) { padding: 12px 16px; }
body.app-edit-page .editor-report-workspace .nav-tabs { gap: 6px; padding: 0; border-color: #e4ecf6; overflow-x: auto; flex-wrap: nowrap; }
body.app-edit-page .editor-report-workspace .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--editor-muted); white-space: nowrap; }
body.app-edit-page .editor-report-workspace .nav-link.active { background: transparent; color: var(--editor-blue); border-bottom-color: var(--editor-blue); }
body.app-edit-page .editor-report-workspace .card { border-color: var(--editor-border); border-radius: 8px; box-shadow: none !important; }
/* Icon actions keep their compact shape in the field workspace. */
body.app-edit-page:has(.project-form-workspace) #item_table .btn { min-height: 36px; padding: 7px; line-height: 1.3; }
body.app-edit-page .required-badge { background: #fff0f2; color: #cf3751; border-radius: 4px; white-space: nowrap; }
body.app-edit-page .pane-header { border-bottom-color: #e8eff7; border-bottom-width: 1px; }
body.app-edit-page .editor-report-workspace :is(.form-control,.form-select) { border-color: #dce5f0; border-radius: 7px; color: var(--editor-ink); }
body.app-edit-page .editor-report-workspace :is(.form-control,.form-select):focus { border-color: #86b4fb; box-shadow: 0 0 0 3px #0866f91a; }
body.app-edit-page .editor-report-workspace .report-setting { overflow-x: auto; }
body.app-edit-page .editor-report-workspace .report-setting .table th { white-space: nowrap; }

/* Geometry only for administrator registration and edit forms. */
body.app-edit-page:has(#administrator-sidebar) .registration-box.admin-editor-form {
    max-width: 1040px;
    padding: 24px;
}
body.app-edit-page .admin-editor-form .main-heading { margin-bottom: 20px; padding-bottom: 14px; }
body.app-edit-page .admin-editor-form .form-section { margin-bottom: 24px; }
body.app-edit-page .admin-editor-form :is(.form-row,.form-row-2) { margin-bottom: 20px; }
body.app-edit-page .admin-editor-form .form-section > :is(.form-row,.form-row-2):last-child,
body.app-edit-page .admin-editor-form .form-section:last-child { margin-bottom: 0; }
body.app-edit-page .admin-editor-form .form-group { min-width: 0; }
body.app-edit-page .admin-editor-form :is(.form-label,.form-group > label) { margin-bottom: 6px; }
body.app-edit-page .admin-editor-form .form-row-2 {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start;
    gap: 16px;
}
body.app-edit-page .admin-editor-form .row.g-3 {
    --bs-gutter-x: 16px;
    --bs-gutter-y: 16px;
}
body.app-edit-page .admin-editor-form .row.g-3.mb-3 { margin-bottom: 20px !important; }
body.app-edit-page .admin-editor-form .form-section > .d-flex.flex-wrap { gap: 20px !important; }
body.app-edit-page .admin-editor-form .form-section > .d-flex.flex-wrap > div { min-width: 0; }
body.app-edit-page .admin-editor-form :is(input.form-control:not(.select2-hidden-accessible):not([name="postal_code"]),textarea.form-control) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 14px;
}
body.app-edit-page .admin-editor-form :is(select.form-control,select.form-select):not(.select2-hidden-accessible),
body.app-edit-page .admin-editor-form .select2-container { width: 100% !important; min-width: 0; max-width: 100%; }
body.app-edit-page .admin-editor-form select:not(.select2-hidden-accessible) { padding: 8px 14px; }
body.app-edit-page .registration-box.admin-editor-form .input-group > input.form-control { width: 1%; flex: 1 1 auto; }
body.app-edit-page .admin-editor-form textarea.form-control { min-height: 144px; line-height: 1.6; resize: vertical; }
body.app-edit-page .admin-editor-form textarea.form-control[rows="16"] { height: 240px; }
body.app-edit-page .admin-editor-form textarea.form-control[rows="6"] { height: 160px; }
body.app-edit-page .admin-editor-form .date-range-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: 12px !important;
    line-height: normal;
}
body.app-edit-page .admin-editor-form .form-group > :is(.mb-2,.mb-3) { margin-bottom: 16px !important; }
body.app-edit-page .admin-editor-form .form-group > :is(.mb-2,.mb-3):last-child { margin-bottom: 0 !important; }
body.app-edit-page .admin-editor-form .d-flex:has(> :is(.post_screen-search_address_button,.post_screen-search_postal_code_button)) {
    gap: 10px;
    flex-wrap: wrap;
}
body.app-edit-page .admin-editor-form :is(.post_screen-search_address_button,.post_screen-search_postal_code_button) { margin-left: 0 !important; }
body.app-edit-page .admin-editor-form input[name="address3"] { flex: 1 1 240px; }
body.app-edit-page .admin-editor-form .submit-area { margin-top: 24px; padding-top: 16px; gap: 12px; }
@container (max-width:660px) {
    body.app-edit-page .admin-editor-form .form-row-2,
    body.app-edit-page .admin-editor-form .date-range-row { grid-template-columns: minmax(0,1fr); }
    body.app-edit-page .admin-editor-form .date-range-row .range-separator { justify-self: center; }
    body.app-edit-page .admin-editor-form .row > :is(.col-md-4,.col-md-6) { width: 100%; flex-basis: 100%; }
}
@media (max-width:767px) {
    body.app-edit-page:has(#administrator-sidebar) .registration-box.admin-editor-form { padding: 20px 16px; }
    body.app-edit-page .admin-editor-form .form-section { margin-bottom: 20px; }
}

/* Shared type and label layout for the same registration and edit forms. */
body.app-edit-page .admin-editor-form .main-heading {
    font-family: inherit;
    font-size: 24px !important;
    font-weight: 700;
    line-height: 1.4;
}
body.app-edit-page .admin-editor-form :is(.section-title,.section-heading) {
    font-family: inherit;
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 16px;
    padding-bottom: 10px;
}
body.app-edit-page .admin-editor-form :is(.section-title,.section-heading) > label {
    font-size: inherit !important;
    font-weight: inherit;
    line-height: inherit;
    margin-bottom: 0;
}
body.app-edit-page .admin-editor-form :is(.form-label,.editor-field-label,.form-group > label:not(.radio-card):not(.form-check-label)) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 6px !important;
}
body.app-edit-page .admin-editor-form .field-label-ja {
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.5;
}
body.app-edit-page .admin-editor-form .field-label-en,
body.app-edit-page .admin-editor-form :is(.section-title,.section-heading) > span {
    font-size: 12px !important;
    font-weight: 400;
    line-height: 1.5;
    margin-left: 0;
}
body.app-edit-page .admin-editor-form :is(.section-title,.section-heading) > span { margin-left: 8px; }
body.app-edit-page .admin-editor-form :is(.required-badge,.readonly-badge),
body.app-edit-page:has(.admin-editor-form) #save-form :is(.required-badge,.readonly-badge) {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 6px;
    margin: 0;
    border-radius: 4px;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.25;
    vertical-align: middle;
    white-space: nowrap;
}
@media (max-width:767px) {
    body.app-edit-page .admin-editor-form .main-heading { font-size: 22px !important; }
}

/* Keep disabled, read-only and display-only fields visually consistent. */
body.app-edit-page .registration-box.admin-editor-form :is(.form-control:disabled,.form-control[readonly],.form-select:disabled,.select2-container--disabled .select2-selection,.display-field),
body.app-edit-page:has(.admin-editor-form) #save-form :is(.form-control:disabled,.form-control[readonly],.form-select:disabled,.select2-container--disabled .select2-selection,.display-field) {
    background-color: #f6f9fc;
    border: 1px solid #dce5f0;
    border-radius: 7px;
    color: var(--editor-muted);
    -webkit-text-fill-color: var(--editor-muted);
    opacity: 1;
    box-shadow: none;
}
body.app-edit-page .registration-box.admin-editor-form :is(.form-control:disabled,.form-control[readonly],.form-select:disabled,.display-field) {
    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.5;
}
body.app-edit-page .registration-box.admin-editor-form :is(.form-control:disabled,.form-control[readonly],.form-select:disabled) { padding: 10px 14px; }
body.app-edit-page .registration-box.admin-editor-form .display-field { min-height: 44px; padding: 9px 14px; }
body.app-edit-page .admin-editor-form .select2-container--disabled .select2-selection__rendered {
    color: var(--editor-muted);
    -webkit-text-fill-color: var(--editor-muted);
    font-weight: 400;
}
body.app-edit-page .admin-editor-form :is(.form-control:disabled,.form-select:disabled,.select2-container--disabled .select2-selection) { cursor: not-allowed; }
body.app-edit-page .admin-editor-form :is(.form-control[readonly],.display-field) { cursor: default; }

.project-login-banner-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.project-login-banner-controls { min-width: 0; }
.project-login-banner-preview { min-width: 0; padding: 16px; border: 1px solid #e0e9f3; border-radius: 8px; background: #f6f9fc; }
.project-login-banner-preview-title { margin: 0 0 12px; font-weight: 600; }
.project-login-banner-preview-stage { display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 12px; background: #fff; border: 1px dashed #cad7e5; border-radius: 7px; }
.project-login-banner-preview img { display: block; width: 100%; height: auto; border-radius: 7px; }
.project-login-banner-preview [hidden] { display: none; }
.project-login-banner-preview-stage p { margin: 0; color: #647b9a; text-align: center; }
@media (max-width: 767px) { .project-login-banner-layout { grid-template-columns: minmax(0, 1fr); } }
