.registration-page {
    background: #e8e4dc;
    padding: 1.5rem 0 3rem;
}

@media (max-width: 1023px) {
    .registration-page {
        padding-bottom: 6rem;
    }
}

.paper-form {
    max-width: 920px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #1f2937;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 1.75rem 2rem 2rem;
    color: #111827;
}

.paper-form .form-letterhead {
    display: grid;
    grid-template-columns: 90px 1fr 130px;
    gap: 1rem;
    align-items: start;
    border-bottom: 2px solid #111827;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.paper-form .logo-circle {
    width: 78px;
    height: 78px;
    border: 2px solid #111827;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.paper-form .org-title {
    text-align: center;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
}

.paper-form .org-subtitle,
.paper-form .org-address,
.paper-form .legal-ref {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.paper-form .photo-box {
    border: none;
    min-height: 0;
    padding: 0;
    background: transparent;
}

.paper-form .photo-box .dropzone-wrap,
.paper-form .photo-box .dropzone {
    height: 100%;
    min-height: 130px;
}

.paper-form .dropzone-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.paper-form .dropzone-inner {
    position: relative;
}

.paper-form .dropzone-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.paper-form .dropzone {
    border: 2px dashed #9ca3af;
    border-radius: 0.5rem;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}

.paper-form .dropzone:hover,
.paper-form .dropzone.dragover {
    border-color: #1a4478;
    background: #f5f3ff;
    box-shadow: inset 0 0 0 1px rgba(91, 33, 182, 0.15);
}

.paper-form .dropzone.has-file {
    border-color: #059669;
    background: #ecfdf5;
}

.paper-form .dropzone-inner {
    padding: 0.85rem;
    text-align: center;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.paper-form .dropzone-photo .dropzone-inner {
    min-height: 130px;
}

.paper-form .dropzone-compact .dropzone-inner {
    min-height: 120px;
}

.paper-form .dropzone-preview {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 0.35rem;
    margin-bottom: 0.35rem;
}

.paper-form .dropzone-photo .dropzone-preview {
    max-height: 95px;
}

.paper-form .dropzone-icon {
    width: 2rem;
    height: 2rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.paper-form .dropzone-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
}

.paper-form .dropzone-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.paper-form .dropzone-hint {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.paper-form .dropzone-filename {
    font-size: 0.75rem;
    color: #047857;
    font-weight: 600;
    margin-top: 0.35rem;
    word-break: break-all;
}

.paper-form .dropzone-remove {
    margin-top: 0.45rem;
    font-size: 0.72rem;
    color: #b91c1c;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    position: relative;
    z-index: 3;
}

.paper-form .dropzone.has-file .dropzone-remove {
    display: inline-block;
}

.paper-form .photo-box input[type="file"] {
    display: block;
}

.paper-form .form-validation-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.paper-form .form-validation-error.show {
    display: block;
}

.paper-form .meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.paper-form .meta-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paper-form .meta-field label {
    white-space: nowrap;
    font-weight: 600;
}

.paper-form .meta-field input {
    flex: 1;
    border: none;
    border-bottom: 1px dotted #374151;
    padding: 0.25rem 0.35rem;
    background: transparent;
    outline: none;
}

.paper-form .form-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: underline;
    margin: 1rem 0;
}

.paper-form .letter-block {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.paper-form .section-title {
    font-size: 1rem;
    font-weight: 700;
    text-decoration: underline;
    margin: 1.25rem 0 0.75rem;
}

.paper-form .form-row {
    display: grid;
    grid-template-columns: minmax(180px, 34%) 1fr;
    gap: 0.75rem;
    align-items: center;
    border-bottom: 1px dotted #9ca3af;
    padding: 0.55rem 0;
    font-size: 0.92rem;
}

.paper-form .form-row label {
    font-weight: 600;
}

.paper-form .form-row input,
.paper-form .form-row select,
.paper-form .form-row textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #d1d5db;
    padding: 0.35rem 0.25rem;
    background: #fefefe;
    outline: none;
}

.paper-form .form-row input:focus,
.paper-form .form-row select:focus,
.paper-form .form-row textarea:focus {
    border-bottom-color: #12325c;
    background: #faf5ff;
}

.paper-form .address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.paper-form .address-box {
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    background: #fcfcfc;
}

.paper-form .address-box h4 {
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.paper-form .nominee-block {
    border: 1px solid #d1d5db;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    background: #fcfcfc;
}

.paper-form .nominee-block h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.paper-form .attachment-list {
    list-style: decimal;
    padding-left: 1.25rem;
    line-height: 1.8;
    font-size: 0.92rem;
}

.paper-form .upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.paper-form .upload-item label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.paper-form .upload-item input[type="file"] {
    width: 100%;
    font-size: 0.78rem;
}

.paper-form .declaration-box {
    border: 1px solid #d1d5db;
    padding: 1rem;
    background: #f9fafb;
    margin-top: 1rem;
}

.paper-form .page-break-block {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 3px double #111827;
}

.paper-form .share-section {
    border: 1px solid #d1d5db;
    padding: 1rem;
    background: #fcfcfc;
    margin-bottom: 1.5rem;
}

.paper-form .readonly-field {
    background: #f3f4f6 !important;
    color: #374151;
    cursor: not-allowed;
}

.paper-form #permanent_address_fields.hidden {
    display: none;
}

.paper-form .share-category-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px dotted #9ca3af;
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.paper-form .terms-list {
    list-style: decimal;
    padding-left: 1.5rem;
    line-height: 1.75;
    font-size: 0.9rem;
}

.paper-form .terms-list li {
    margin-bottom: 0.65rem;
    text-align: justify;
}

.paper-form .page1-signatures {
    margin-top: 2rem;
}

.paper-form .signature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1rem;
}

.paper-form .signature-line {
    border-top: 1px solid #111827;
    padding-top: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.paper-form .office-section-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px dashed #6ee7a8;
    background: #faf5ff;
    padding: 1.25rem;
    border-radius: 0.5rem;
}

.paper-form .office-fields-grid {
    margin-bottom: 0.5rem;
}

.paper-form .office-group-leader-wrap select,
.paper-form .office-group-leader-wrap input {
    width: 100%;
    max-width: 100%;
}

.paper-form .office-group-leader-new {
    margin-top: 0.5rem;
}

.paper-form .office-group-leader-new.hidden {
    display: none;
}

.paper-form .office-number-note {
    margin: 0.25rem 0 0.75rem;
    padding-left: 0.25rem;
}

.paper-form .office-auto-number[readonly] {
    background: #f3f4f6;
    color: #374151;
}

.paper-form .admin-status-row .admin-status-select {
    width: 100%;
    max-width: 280px;
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    padding: 0.45rem 0.65rem;
}

.admin-registration-wrap .registration-page {
    background: transparent;
    padding: 0;
}

.admin-registration-wrap .paper-form {
    box-shadow: none;
}

.admin-registration-wrap.admin-member-view {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-registration-wrap.admin-member-view .paper-form.paper-form-view {
    max-width: none;
    width: 100%;
    padding: 1.75rem 2.5rem 2.25rem;
}

.admin-registration-wrap.admin-member-view .paper-form.paper-form-view .form-row {
    grid-template-columns: minmax(220px, 26%) 1fr;
    gap: 1rem 1.25rem;
}

.admin-registration-wrap.admin-member-view .paper-form.paper-form-view .meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-registration-wrap.admin-member-view .paper-form.paper-form-view .view-file-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-registration-wrap.admin-member-view .paper-form.paper-form-view .admin-status-row .admin-status-select {
    max-width: 360px;
}

.member-view-main > .alert-success,
.member-view-main > .alert-error {
    max-width: 1200px;
}

.paper-form .form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    clear: both;
}

.paper-form .btn-primary,
.paper-form .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s;
}

.paper-form .btn-primary {
    background: linear-gradient(to right, #0a1f3d, #1a4478);
    color: #fff !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(76, 29, 149, 0.25);
}

.paper-form .btn-primary:hover {
    background: linear-gradient(to right, #12325c, #2563eb);
    box-shadow: 0 4px 10px rgba(76, 29, 149, 0.3);
}

.paper-form .btn-secondary {
    background: #e5e7eb;
    color: #374151 !important;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
}

.paper-form .btn-secondary:hover {
    background: #d1d5db;
}

.alert-success,
.alert-error {
    max-width: 920px;
    margin: 0 auto 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

@media (max-width: 768px) {
    .paper-form {
        padding: 1rem;
    }

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

    .paper-form .photo-box {
        min-height: 110px;
    }

    .paper-form .form-row,
    .paper-form .address-grid,
    .paper-form .upload-grid,
    .paper-form .meta-row,
    .paper-form .signature-row {
        grid-template-columns: 1fr;
    }

    .paper-form .form-row {
        gap: 0.35rem;
    }
}

.paper-form .meta-field .view-value {
    flex: 1;
    border-bottom: 1px dotted #374151;
    padding: 0.25rem 0.35rem;
    min-height: 1.5rem;
}

.paper-form.paper-form-view .view-value {
    min-height: 1.75rem;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fefefe;
    color: #111827;
    word-break: break-word;
}
    min-height: 1.75rem;
    padding: 0.35rem 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fefefe;
    color: #111827;
    word-break: break-word;
}

.paper-form.paper-form-view .view-row label {
    color: #374151;
}

.paper-form.paper-form-view .view-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.paper-form.paper-form-view .view-status-active { background: #dcfce7; color: #166534; }
.paper-form.paper-form-view .view-status-pending { background: #fef9c3; color: #854d0e; }
.paper-form.paper-form-view .view-status-closed { background: #fee2e2; color: #991b1b; }

.paper-form.paper-form-view .view-check-yes {
    color: #15803d;
    font-weight: 700;
    font-size: 1.1rem;
}

.paper-form.paper-form-view .view-check-no {
    color: #9ca3af;
}

.paper-form.paper-form-view .view-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.paper-form.paper-form-view .view-file-box {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.65rem;
    background: #fcfcfc;
    text-align: center;
}

.paper-form.paper-form-view .view-file-label {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #374151;
}

.paper-form.paper-form-view .view-file-preview {
    max-width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 0.35rem;
    border: 1px solid #e5e7eb;
}

.paper-form.paper-form-view .view-file-link {
    color: #12325c;
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-all;
}

.paper-form.paper-form-view .view-file-missing {
    color: #9ca3af;
    font-size: 0.9rem;
}

.paper-form.paper-form-view .view-photo-slot {
    border: 2px solid #111827;
    border-radius: 0.35rem;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9fafb;
}

.paper-form.paper-form-view .view-photo-slot img {
    width: 100%;
    height: 100%;
    min-height: 130px;
    object-fit: cover;
}

.paper-form.paper-form-view .view-photo-slot .view-file-missing {
    padding: 1rem;
}

.paper-form.paper-form-view .view-share-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    font-weight: 600;
}

.paper-form.paper-form-view .view-share-choice.is-selected {
    color: #12325c;
}

.paper-form.paper-form-view .view-share-choice .choice-mark {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border: 1px solid #6b7280;
    border-radius: 9999px;
    font-size: 0.7rem;
}

.paper-form.paper-form-view .view-share-choice.is-selected .choice-mark {
    background: #12325c;
    border-color: #12325c;
    color: #fff;
}

.paper-form.paper-form-view .view-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.paper-form.paper-form-view .office-edit-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #cbd5e1;
}
