/* JDFCU Online Services Form */
#jdfcu-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 32px 36px;
    position: relative;
}

/* Step indicator */
.jdfcu-page::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #1a3a5c, #2e86de);
    border-radius: 2px;
    margin-bottom: 20px;
}

/* Pages */
.jdfcu-page {
    display: none;
    animation: jdfcuFadeIn 0.35s ease-out;
}
.jdfcu-page-active {
    display: block;
}
@keyframes jdfcuFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Section headers */
.jdfcu-section-header h3 {
    font-size: 1.5em;
    color: #1a3a5c;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #1a3a5c, #2e86de) 1;
    padding-bottom: 10px;
    margin: 28px 0 18px;
    letter-spacing: -0.3px;
}
.jdfcu-section-header h4 {
    font-size: 1.1em;
    color: #555;
    margin: 22px 0 12px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
}

/* Validation errors */
.jdfcu-field-error input,
.jdfcu-field-error select,
.jdfcu-field-error textarea {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}
.jdfcu-field-error label,
.jdfcu-field-error legend {
    color: #dc3545 !important;
}
.jdfcu-error-msg {
    color: #dc3545;
    font-size: 0.82em;
    margin-top: 4px;
    font-weight: 500;
    animation: jdfcuFadeIn 0.25s ease-out;
}
/* Shake animation for the Next button on validation failure */
@keyframes jdfcuShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}
.jdfcu-btn-shake {
    animation: jdfcuShake 0.5s ease-in-out;
}

/* Fields */
.jdfcu-field {
    margin-bottom: 18px;
}
.jdfcu-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92em;
    color: #444;
    letter-spacing: 0.01em;
}
.jdfcu-field input[type="text"],
.jdfcu-field input[type="email"],
.jdfcu-field input[type="tel"],
.jdfcu-field input[type="number"],
.jdfcu-field input[type="date"],
.jdfcu-field input[type="time"],
.jdfcu-field select,
.jdfcu-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    font-size: 0.98em;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfc;
}
.jdfcu-field input:focus,
.jdfcu-field select:focus,
.jdfcu-field textarea:focus {
    border-color: #2e86de;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.12);
    background: #fff;
}
.jdfcu-field input[type="file"] {
    padding: 10px 0;
    background: transparent;
    border: none;
}

/* Required */
.jdfcu-required {
    color: #d32f2f;
}

/* Fieldsets / Name groups */
.jdfcu-name-group,
.jdfcu-address-group {
    border: none;
    padding: 0;
    margin: 0 0 16px;
}
.jdfcu-name-group legend,
.jdfcu-address-group legend {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 8px;
}

/* Layout */
.jdfcu-row {
    display: flex;
    gap: 12px;
}
.jdfcu-col {
    flex: 1;
}

/* Radio / Checkbox labels */
.jdfcu-radio-label {
    display: block;
    font-weight: 400;
    padding: 6px 0;
    cursor: pointer;
}
.jdfcu-radio-label input {
    margin-right: 8px;
}

/* Navigation */
.jdfcu-nav {
    display: flex !important;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    align-items: center;
}
#jdfcu-services-form .jdfcu-btn {
    padding: 12px 30px;
    font-size: 0.98em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    line-height: 1.4;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}
#jdfcu-services-form .jdfcu-btn-prev {
    background: #f0f2f5 !important;
    color: #444 !important;
    border: 1px solid #d0d5dd !important;
}
#jdfcu-services-form .jdfcu-btn-prev:hover {
    background: #e4e7eb !important;
    border-color: #bbb !important;
}
.jdfcu-btn-next,
.jdfcu-btn-submit {
    background: linear-gradient(135deg, #1a3a5c, #2e6da4) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.2);
}
.jdfcu-btn-next:hover,
.jdfcu-btn-submit:hover {
    background: linear-gradient(135deg, #14304d, #245a8a) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.3);
    transform: translateY(-1px);
}
.jdfcu-btn-prev {
    display: inline-block;
}
.jdfcu-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Summary Banner */
.jdfcu-error-summary {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 14px 18px;
    margin-top: 16px;
    margin-bottom: 4px;
    color: #991b1b;
    font-size: 0.92em;
    line-height: 1.5;
    animation: jdfcuFadeIn 0.3s ease;
}

/* Progress bar */
.jdfcu-progress {
    margin-top: 18px;
    background: #e8ecf0;
    border-radius: 6px;
    height: 7px;
    overflow: hidden;
}
.jdfcu-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1a3a5c, #2e86de);
    width: 0;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

/* Messages */
#jdfcu-form-message {
    margin-top: 16px;
    padding: 0;
    border-radius: 4px;
    font-weight: 600;
}
.jdfcu-msg-success {
    padding: 24px 20px !important;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 10px;
    text-align: center;
}
.jdfcu-success-icon {
    width: 48px;
    height: 48px;
    line-height: 48px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    margin: 0 auto 12px;
}
.jdfcu-success-ref {
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
}
.jdfcu-msg-error {
    padding: 16px 20px !important;
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 10px;
}

/* Signature Pad */
.jdfcu-signature-field {
    margin-bottom: 16px;
}
.jdfcu-sig-wrapper {
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #fafafa;
    cursor: crosshair;
    position: relative;
}
.jdfcu-sig-canvas {
    display: block;
    width: 100%;
    height: 150px;
    touch-action: none;
}
.jdfcu-btn-clear-sig {
    margin-top: 6px;
    padding: 6px 14px;
    font-size: 0.85em;
    background: #e0e0e0;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.jdfcu-btn-clear-sig:hover {
    background: #ccc;
}

/* ===== ID Upload — Drop Zone ===== */
.jdfcu-id-upload {
    margin-bottom: 20px;
}
.jdfcu-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.jdfcu-dropzone:hover {
    border-color: #2e86de;
    background: #f0f7ff;
}
.jdfcu-dropzone-hover {
    border-color: #2e86de !important;
    background: #e8f2fd !important;
    box-shadow: 0 0 0 4px rgba(46, 134, 222, 0.12);
}
.jdfcu-drop-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.jdfcu-drop-icon {
    margin-bottom: 10px;
    opacity: 0.5;
}
.jdfcu-dropzone:hover .jdfcu-drop-icon,
.jdfcu-dropzone-hover .jdfcu-drop-icon {
    opacity: 1;
}
.jdfcu-drop-text {
    font-size: 1em;
    color: #334155;
    margin: 0 0 4px;
}
.jdfcu-drop-subtext {
    font-size: 0.82em;
    color: #64748b;
    margin: 0;
}
.jdfcu-drop-hover .jdfcu-drop-text {
    color: #2e86de;
    font-weight: 700;
    font-size: 1.1em;
}

/* ===== ID Upload — Preview Card ===== */
.jdfcu-id-preview-card,
.jdfcu-id-pdf-preview {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Circle preview */
.jdfcu-id-circle-preview {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #1a3a5c;
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.15);
    flex-shrink: 0;
}
.jdfcu-id-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Full image preview */
.jdfcu-id-full-preview {
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.jdfcu-id-full-img {
    max-width: 100%;
    max-height: 220px;
    display: block;
    object-fit: contain;
}

/* Meta line */
.jdfcu-id-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.85em;
}
.jdfcu-id-filename {
    color: #334155;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jdfcu-id-filesize {
    color: #94a3b8;
}

/* Action buttons */
.jdfcu-id-actions {
    display: flex;
    gap: 8px;
}
.jdfcu-btn-crop,
.jdfcu-crop-apply {
    background: #2e86de !important;
    color: #fff !important;
    font-size: 0.88em;
    padding: 8px 18px;
    border-radius: 8px;
}
.jdfcu-btn-crop:hover,
.jdfcu-crop-apply:hover {
    background: #2574c2 !important;
}
.jdfcu-crop-cancel {
    background: #f0f2f5 !important;
    color: #444 !important;
    border: 1px solid #d0d5dd !important;
}
.jdfcu-btn-change {
    background: #f0f2f5;
    color: #475569;
    font-size: 0.88em;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
}
.jdfcu-btn-change:hover {
    background: #e2e8f0;
}

/* PDF preview */
.jdfcu-pdf-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: #fef2f2;
    border-radius: 10px;
}
.jdfcu-pdf-badge span {
    font-weight: 700;
    font-size: 14px;
    color: #c62828;
    letter-spacing: 1px;
}

/* Error */
.jdfcu-upload-error {
    color: #c62828;
    font-size: 0.88em;
    font-weight: 600;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    margin-top: 8px;
    text-align: center;
    animation: jdfcuFadeIn 0.3s ease;
}

/* ===== Crop Modal ===== */
.jdfcu-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jdfcu-crop-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.jdfcu-crop-dialog {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: jdfcuFadeIn 0.25s ease;
}
.jdfcu-crop-dialog h4 {
    margin: 0 0 4px;
    font-size: 1.15em;
    color: #1a3a5c;
}
.jdfcu-crop-hint {
    font-size: 0.85em;
    color: #64748b;
    margin: 0 0 14px;
}
.jdfcu-crop-stage {
    position: relative;
    width: 100%;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}
.jdfcu-crop-source {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}
.jdfcu-crop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.jdfcu-crop-box {
    position: absolute;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255,255,255,0.3);
    cursor: move;
    touch-action: none;
}
.jdfcu-crop-handle-se {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #2e86de;
    cursor: se-resize;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.jdfcu-crop-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* Toggle Mode Button */
.jdfcu-btn-toggle-mode {
    margin-bottom: 16px;
    background: transparent;
    color: #1a3a5c;
    border: 1px solid #1a3a5c;
    font-size: 0.9em;
    padding: 8px 18px;
}
.jdfcu-btn-toggle-mode:hover {
    background: #1a3a5c;
    color: #fff;
}

/* Chat / Conversational Mode */
.jdfcu-chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f7fa;
}
.jdfcu-chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.jdfcu-chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 0.95em;
    animation: jdfcuFadeIn 0.3s ease;
    word-wrap: break-word;
}
.jdfcu-chat-bot {
    background: #1a3a5c;
    color: #fff;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    margin-right: auto;
}
.jdfcu-chat-user {
    background: #e3eaf2;
    color: #333;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    text-align: right;
}

/* Typing animation */
.jdfcu-typing span {
    animation: jdfcuBlink 1.4s infinite;
    font-size: 1.5em;
    line-height: 0.5;
}
.jdfcu-typing span:nth-child(2) { animation-delay: 0.2s; }
.jdfcu-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes jdfcuBlink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Chat input area */
.jdfcu-chat-input-area {
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid #ddd;
}
.jdfcu-chat-text-input {
    display: flex;
    gap: 8px;
}
.jdfcu-chat-text {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 1em;
    outline: none;
}
.jdfcu-chat-text:focus {
    border-color: #1a3a5c;
}
.jdfcu-chat-input-error {
    border-color: #d32f2f !important;
}
.jdfcu-chat-send {
    border-radius: 20px;
    padding: 10px 20px;
}
.jdfcu-chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.jdfcu-chat-option-btn {
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 20px;
    background: #e3eaf2;
    color: #1a3a5c;
    border: 1px solid #1a3a5c;
    cursor: pointer;
    transition: all 0.2s;
}
.jdfcu-chat-option-btn:hover {
    background: #1a3a5c;
    color: #fff;
}
.jdfcu-chat-note {
    font-size: 0.9em;
    color: #777;
    padding: 8px 0;
}
.jdfcu-chat-skip {
    font-size: 0.85em;
    padding: 6px 14px;
    background: #e0e0e0;
    color: #555;
    border-radius: 14px;
    margin-top: 6px;
}
.jdfcu-chat-file-input {
    margin-bottom: 8px;
}
.jdfcu-chat-name-row {
    display: flex;
    gap: 8px;
    flex: 1;
}
.jdfcu-chat-name-row .jdfcu-chat-text {
    flex: 1;
}
.jdfcu-chat-addr-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.jdfcu-chat-addr-col .jdfcu-chat-text {
    width: 100%;
}
.jdfcu-chat-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.jdfcu-chat-sig-area {
    margin-bottom: 8px;
}
.jdfcu-chat-sig-canvas {
    display: block;
    width: 100%;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
}
/* Money fields */
.jdfcu-money {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.jdfcu-calc-field input {
    background: #f0f4f8;
    font-weight: 600;
    color: #1a3a5c;
}

/* ===== Step Progress Indicator (Stepper) ===== */
.jdfcu-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 0 28px;
    margin-bottom: 8px;
}
.jdfcu-stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    min-width: 80px;
}
.jdfcu-stepper-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d0d5dd;
    background: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1;
}
.jdfcu-stepper-circle.active {
    background: linear-gradient(135deg, #1a3a5c, #2e86de);
    border-color: #1a3a5c;
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.3);
}
.jdfcu-stepper-circle.completed {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}
.jdfcu-stepper-circle.completed::after {
    content: "\2713";
}
.jdfcu-stepper-label {
    font-size: 0.72em;
    color: #888;
    margin-top: 6px;
    text-align: center;
    max-width: 90px;
    line-height: 1.2;
}
.jdfcu-stepper-label.active {
    color: #1a3a5c;
    font-weight: 600;
}
.jdfcu-stepper-line {
    height: 2px;
    background: #d0d5dd;
    flex: 1;
    margin-top: 18px;
    min-width: 20px;
}
.jdfcu-stepper-line.completed {
    background: #2e7d32;
}

/* ===== Review / Summary Page ===== */
.jdfcu-review-page {
    display: none;
    animation: jdfcuFadeIn 0.35s ease-out;
}
.jdfcu-review-section {
    background: #f7f9fc;
    border: 1px solid #e5eaf0;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 16px;
}
.jdfcu-review-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jdfcu-review-section-title h4 {
    color: #1a3a5c;
    margin: 0 0 12px;
    font-size: 1em;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #1a3a5c, #2e86de) 1;
    padding-bottom: 6px;
}
.jdfcu-review-edit-link {
    font-size: 0.82em;
    color: #2e86de;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}
.jdfcu-review-edit-link:hover {
    text-decoration: underline;
}
.jdfcu-review-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #eef1f5;
}
.jdfcu-review-row:last-child {
    border-bottom: none;
}
.jdfcu-review-label {
    width: 40%;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}
.jdfcu-review-value {
    flex: 1;
    color: #222;
    font-size: 0.9em;
}
.jdfcu-review-files {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.jdfcu-review-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
.jdfcu-review-sig {
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

/* ===== Enhanced Success Card ===== */
.jdfcu-success-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    animation: jdfcuFadeIn 0.5s;
}
.jdfcu-success-checkmark {
    width: 72px;
    height: 72px;
    background: #2e7d32;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: jdfcuPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.jdfcu-success-checkmark svg {
    stroke: #fff;
    width: 36px;
    height: 36px;
}
@keyframes jdfcuPop {
    0% { transform: scale(0); }
    70% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.jdfcu-success-title {
    font-size: 1.5em;
    color: #1a3a5c;
    margin-bottom: 8px;
    font-weight: 700;
}
.jdfcu-success-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: 0.95em;
}
.jdfcu-ref-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f0f7ff;
    border: 2px solid #2e86de;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 24px;
}
.jdfcu-ref-number {
    font-size: 1.3em;
    font-weight: 700;
    color: #1a3a5c;
    font-variant-numeric: tabular-nums;
}
.jdfcu-btn-copy {
    background: #2e86de;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}
.jdfcu-btn-copy:hover {
    background: #2574c2;
}
.jdfcu-btn-copy.copied {
    background: #2e7d32;
}
.jdfcu-copy-tooltip {
    font-size: 0.8em;
    color: #2e7d32;
    margin-top: 6px;
    animation: jdfcuFadeIn 0.3s;
}
.jdfcu-btn-new-request {
    margin-top: 16px;
    display: inline-block;
}

/* ===== Accessibility: Focus-Visible ===== */
.jdfcu-btn:focus-visible,
.jdfcu-btn-crop:focus-visible,
.jdfcu-btn-change:focus-visible,
.jdfcu-btn-clear-sig:focus-visible,
.jdfcu-btn-toggle-mode:focus-visible,
.jdfcu-btn-copy:focus-visible,
.jdfcu-btn-new-request:focus-visible,
.jdfcu-chat-option-btn:focus-visible,
.jdfcu-chat-send:focus-visible,
.jdfcu-chat-skip:focus-visible,
.jdfcu-chat-text:focus-visible,
.jdfcu-radio-label input:focus-visible,
.jdfcu-stepper-step:focus-visible,
.jdfcu-review-edit-link:focus-visible,
.jdfcu-dropzone:focus-visible,
.jdfcu-field input:focus-visible,
.jdfcu-field select:focus-visible,
.jdfcu-field textarea:focus-visible {
    outline: 2px solid #2e86de;
    outline-offset: 2px;
}

/* ===== ARIA Live Region & Screen Reader Only ===== */
.jdfcu-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.jdfcu-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .jdfcu-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    /* Form wrapper padding reduction */
    #jdfcu-form-wrapper {
        padding: 20px 16px;
    }

    /* Signature canvas taller on mobile */
    .jdfcu-sig-canvas {
        height: 200px;
    }

    /* Crop handle bigger on mobile */
    .jdfcu-crop-handle-se {
        width: 24px;
        height: 24px;
        bottom: -8px;
        right: -8px;
    }

    /* Stepper mobile adjustments */
    .jdfcu-stepper {
        padding: 16px 0 20px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .jdfcu-stepper-step {
        min-width: 56px;
    }
    .jdfcu-stepper-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .jdfcu-stepper-label {
        font-size: 0.65em;
        max-width: 64px;
    }
    .jdfcu-stepper-line {
        margin-top: 14px;
        min-width: 12px;
    }

    /* Review page stacked layout on mobile */
    .jdfcu-review-row {
        flex-direction: column;
        gap: 2px;
    }
    .jdfcu-review-label {
        width: 100%;
    }
    .jdfcu-review-value {
        width: 100%;
    }
    .jdfcu-review-section {
        padding: 14px 16px;
    }

    /* Success card mobile */
    .jdfcu-success-card {
        padding: 32px 20px;
    }
    .jdfcu-ref-box {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
}

/* ===== Consent Field (radio Yes/No with details) ===== */
.jdfcu-consent-field {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 18px;
    background: #fafafa;
}
.jdfcu-consent-field legend {
    font-weight: 600;
    padding: 0 6px;
}
.jdfcu-consent-text {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    white-space: pre-wrap;
}
.jdfcu-consent-prompt {
    font-weight: 500;
    margin: 6px 0 8px;
}
.jdfcu-consent-option {
    display: block;
    padding: 6px 0;
    cursor: pointer;
}
.jdfcu-consent-option input[type="radio"] {
    margin-right: 8px;
}
