.ach-verification-page {
    height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
    overflow-x: hidden;
}

/* Hide loader on ACH verification page */
.ach-verification-page .loader-container {
    display: none !important;
}

/* Main Container */
.ach-verification-container {
    height: 100vh;
    display: flex;
    position: relative;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.1);
}

/* Left Panel */
.ach-left-panel {
    background: white;
    width: 40%;
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.ach-left-content {
    width: 100%;
    max-width: 420px;
    animation: ach-slideInLeft 0.8s ease-out;
}

@keyframes ach-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo */
.ach-logo-section-top {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.ach-logo-section-top img {
    max-height: 70px;
}

/* Typography */
.ach-main-title {
    font-size: 2rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.ach-subtitle {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Step Indicator */
.ach-step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
    padding: 1rem 0;
}

.ach-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ach-step-dot.active {
    background: #3b82f6;
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.ach-step-dot.completed {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ach-step-dot.completed::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 8px;
    font-weight: 700;
}

/* Action Button */
.ach-verification-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.025em;
}

.ach-verification-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.5s;
}

.ach-verification-btn:hover::before {
    left: 100%;
}

.ach-verification-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.ach-verification-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ach-verification-btn:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

.ach-loading-spinner {
    display: none;
    margin-right: 0.5rem;
}

/* Right Panel */
.ach-right-panel {
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #f5576c 75%,
        #4facfe 100%
    );
    width: 60%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ach-right-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(102, 126, 234, 0.2) 0%,
        rgba(118, 75, 162, 0.2) 25%,
        rgba(240, 147, 251, 0.2) 50%,
        rgba(245, 87, 108, 0.2) 75%,
        rgba(79, 172, 254, 0.2) 100%
    );
    background-size: 400% 400%;
    animation: ach-gradientShift 12s ease infinite;
    opacity: 0.8;
}

@keyframes ach-gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.ach-right-panel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
            circle at 20% 80%,
            rgba(102, 126, 234, 0.3) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(240, 147, 251, 0.3) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 50% 50%,
            rgba(245, 87, 108, 0.2) 0%,
            transparent 50%
        );
    background-size: 50% 50%;
    animation: ach-backgroundMove 18s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes ach-backgroundMove {
    0%,
    100% {
        background-position: 0% 0%, 100% 100%;
    }
    50% {
        background-position: 100% 100%, 0% 0%;
    }
}

.ach-right-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 3rem;
    max-width: 680px;
    animation: ach-slideInRight 0.8s ease-out;
}

@keyframes ach-slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ach-right-title {
    font-size: 2.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    margin-top: 10rem;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ach-right-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Stripe Image */
.ach-stripe-image {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ach-stripe-image img {
    max-height: 600px;
    max-width: 100%;
    transition: all 0.3s ease;
}

/* Alert Styles */
.ach-alert-container {
    margin-bottom: 2rem;
}

.ach-alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: ach-slideIn 0.3s ease-out;
}

@keyframes ach-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ach-alert-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.ach-alert-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    border-left: 4px solid #10b981;
}

.ach-alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.ach-alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Responsive Design */
@media (max-width: 992px) {
    .ach-verification-container {
        flex-direction: column;
    }

    .ach-left-panel {
        width: 100%;
        padding: 2rem;
        order: 2; /* Content comes after image on mobile */
        min-height: auto;
        justify-content: center; /* Center the content */
        align-items: center;
        text-align: center;
        padding-top: 2rem;
    }

    .ach-right-panel {
        width: 100%;
        min-height: 50vh;
        order: 1; /* Image section comes first */
        position: relative;
    }

    .ach-right-content {
        padding: 3rem 2rem 1rem;
        max-width: 100%;
    }

    .ach-right-title {
        font-size: 2rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .ach-right-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .ach-main-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .ach-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .ach-left-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .ach-step-indicator {
        margin-bottom: 2rem;
        padding: 0.5rem 0;
        justify-content: center;
    }

    .ach-verification-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.975rem;
        max-width: 320px;
        width: 100%;
    }

    .ach-stripe-image img {
        max-height: 300px;
    }

    /* Logo stays in top left even on mobile */
    .ach-logo-section-top {
        position: fixed;
        top: 1.5rem;
        left: 1.5rem;
        z-index: 20;
    }

    .ach-logo-section-top img {
        max-height: 40px;
    }

    .ach-alert-container {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .ach-left-panel {
        padding: 1.5rem;
        padding-top: 1.5rem;
    }

    .ach-right-panel {
        min-height: 45vh;
    }

    .ach-right-content {
        padding: 5rem 1.5rem 0.5rem;
    }

    .ach-right-title {
        font-size: 1.75rem;
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .ach-right-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .ach-main-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .ach-subtitle {
        font-size: 0.975rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .ach-step-indicator {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .ach-step-dot.active {
        width: 28px;
    }

    .ach-verification-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        max-width: 280px;
    }

    .ach-alert {
        padding: 0.875rem 1rem;
        font-size: 0.825rem;
    }

    .ach-stripe-image {
        margin-top: 1rem;
    }

    .ach-stripe-image img {
        max-height: 250px;
    }

    /* Fixed logo positioning for mobile */
    .ach-logo-section-top {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 20;
    }

    .ach-logo-section-top img {
        max-height: 35px;
    }

    /* Improve mobile touch targets */
    .ach-verification-btn {
        min-height: 48px;
    }

    .ach-alert-container {
        max-width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .ach-left-panel {
        padding: 1rem;
        padding-top: 1rem;
    }

    .ach-right-content {
        padding: 1.5rem 1rem 0.5rem;
    }

    .ach-main-title {
        font-size: 1.5rem;
    }

    .ach-right-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .ach-right-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .ach-stripe-image img {
        max-height: 200px;
    }

    .ach-logo-section-top img {
        max-height: 30px;
    }

    .ach-verification-btn {
        font-size: 0.9rem;
        max-width: 260px;
    }
}

/* Modal Styles for ACH Verification */
/* Clean Form Modal */
.ach-modern-modal .modal-content {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
}

.ach-modern-header {
    background: #ffffff;
    color: #333;
    padding: 24px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.ach-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ach-icon-wrapper {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 20px;
}

.ach-header-text h4 {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    color: #2c3e50;
}

.ach-header-text .ach-subtitle {
    margin: 4px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

.ach-modern-close {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    color: #6c757d;
    font-size: 14px;
}

.ach-modern-close:hover {
    background: #e9ecef;
    color: #495057;
}

.ach-modern-body {
    padding: 0;
    max-height: 90vh;
    overflow-y: auto;
}

.ach-content-wrapper {
    padding: 32px;
}

/* Form Title */
.ach-form-title {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.ach-form-title h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.ach-loan-info {
    margin: 0;
    font-size: 16px;
    color: #495057;
}

/* Authorization Text */
.ach-authorization-text {
    margin-bottom: 32px;
    line-height: 1.6;
}

.ach-authorization-text p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #495057;
    text-align: justify;
}

.ach-authorization-text p:last-child {
    margin-bottom: 0;
}

.ach-contact-number {
    color: #007bff;
    font-weight: 600;
}

/* Bank Section */
.ach-bank-section {
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ach-bank-section h5 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ach-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.ach-form-group {
    margin-bottom: 16px;
}

.ach-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.ach-required {
    color: #dc3545;
    margin-left: 2px;
}

.ach-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ach-form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.ach-form-control.ach-is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Additional Terms */
.ach-additional-terms {
    margin-bottom: 32px;
}

.ach-additional-terms p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
    text-align: justify;
}

.ach-additional-terms p:last-child {
    margin-bottom: 0;
}

.ach-notice-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
}

.ach-notice-box p {
    margin: 0;
    font-size: 13px;
    color: #856404;
    text-align: center;
}

/* Signature Section */
.ach-signature-section {
    margin-bottom: 24px;
}

.ach-signature-area {
    position: relative;
}

.ach-signature-area label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.ach-signature-pad {
    position: relative;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

#signatureCanvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
    background: white;
    border-radius: 6px;
}

.ach-signature-clear-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ach-signature-clear-btn:hover {
    background: rgba(248, 249, 250, 1);
    color: #495057;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.ach-signature-clear-btn:active {
    transform: scale(0.95);
}

.ach-signature-error {
    color: #dc3545;
    margin-top: 12px;
    font-size: 13px;
    display: none;
    text-align: center;
}

.ach-signature-error i {
    margin-right: 6px;
}

/* Footer */
.ach-modern-footer {
    padding: 24px 32px;
    border-top: 1px solid #e9ecef;
}

.ach-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.ach-btn-secondary-modern,
.ach-btn-primary-modern {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-width: 200px;
}

.ach-btn-secondary-modern {
    background: transparent;
    color: #6c757d;
    border-color: #ced4da;
}

.ach-btn-secondary-modern:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.ach-btn-primary-modern {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 400;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.025em;
    min-width: 120px;
}

.ach-btn-primary-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.5s;
}

.ach-btn-primary-modern:hover::before {
    left: 100%;
}

.ach-btn-primary-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.ach-btn-primary-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ach-btn-primary-modern:disabled {
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    .modal-xl {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .ach-modern-header {
        padding: 20px 24px;
    }

    .ach-content-wrapper {
        padding: 24px 20px;
    }

    .ach-form-title {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .ach-form-title h4 {
        font-size: 20px;
    }

    .ach-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ach-form-group.ach-half-width {
        margin-bottom: 16px;
    }

    .ach-bank-section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .ach-footer-actions {
        flex-direction: column;
    }

    .ach-btn-secondary-modern,
    .ach-btn-primary-modern {
        width: 100%;
        margin-bottom: 8px;
    }

    #signatureCanvas {
        width: 100%;
        max-width: 400px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .ach-modern-header {
        padding: 16px 20px;
    }

    .ach-content-wrapper {
        padding: 20px 16px;
    }

    .ach-form-title h4 {
        font-size: 18px;
    }

    .ach-bank-section {
        padding: 16px;
    }

    .ach-modern-footer {
        padding: 20px 16px;
    }

    #signatureCanvas {
        width: 100%;
        max-width: 350px;
        height: 120px;
    }
}
