* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgba(141, 132, 132, 0.281);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hero-section {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.041);
    background-color: #ffffff;
    max-width: 365px;
    width: 100%;
    height: 99vh;
    margin: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navigation */
.navigation-bar {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.back-btn {
    background: none;
    border: none;
    outline: none;
    padding: 6px 10px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
}

.back-btn:hover {
    background: #f5f5f5;
    border-radius: 8px;
}

/* Hamburger Menu Button */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.menu-toggle:hover {
    opacity: 0.7;
}

.menu-toggle:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hide hamburger button when menu is active */
.menu-toggle.active {
    opacity: 0;
    pointer-events: none;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #25ac25;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle:hover .hamburger-line {
    background: #229922;
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.dropdown-menu.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.dropdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.dropdown-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80%;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dropdown-menu.active .dropdown-content {
    transform: translateX(0);
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.dropdown-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.dropdown-close:hover {
    color: #333;
}

.dropdown-close:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
    border-radius: 4px;
}

.dropdown-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    font-size: 15px;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:active {
    background: #e8e8e8;
}

.dropdown-item:focus {
    outline: 2px solid #25ac25;
    outline-offset: -2px;
}

.dropdown-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.dropdown-text {
    font-size: 15px;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 8px 0;
}

.logout-btn {
    color: #e74c3c;
}

.logout-btn:hover {
    background: #ffebee;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Main Content */
.content-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    overflow-y: auto;
}

.page-title {
    color: #666;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 25px;
}

/* Loan Form Card */
.loan-form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px 20px;
    margin-bottom: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    color: #333;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-bottom-color: #25ac25;
    box-shadow: 0 1px 0 0 #25ac25;
}

.form-input::placeholder {
    color: #999;
}

/* Input with arrows */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
}

.input-wrapper .form-input {
    flex: 1;
    padding-right: 40px;
}

/* Phone input with country code prefix */
.phone-input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.country-code {
    color: #333;
    font-size: 15px;
    margin-right: 5px;
    padding: 10px 0;
    flex-shrink: 0;
}

.phone-input-group .form-input {
    flex: 1;
    width: auto !important;
    min-width: 0;
}

.input-arrows {
    position: absolute;
    right: 0;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.arrow-btn:hover {
    opacity: 0.6;
}

.arrow-btn:focus {
    outline: 2px solid #25ac25;
    outline-offset: 1px;
    border-radius: 2px;
}

/* Form Hint */
.form-hint {
    color: #999;
    font-size: 12px;
    margin-top: 6px;
}

/* Error Messages */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Checkbox Group */
.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #25ac25;
    border-color: #25ac25;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus ~ .checkbox-custom {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
}

.checkbox-text {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-text a.terms-link {
    color: #25ac25;
    text-decoration: underline;
}

.checkbox-text a.terms-link:hover {
    color: #1e8c1e;
}

/* Submit Button */
.button-container {
    position: relative;
    width: 150px;
    height: 70px;
    margin: 0 auto 20px;
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.btn-primary {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 55px;
    background: #25ac25;
    border: 2px solid rgba(9, 255, 9, 0.247);
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s, opacity 0.2s;
}

.btn-primary:hover {
    background: #229922;
}

.btn-primary:focus {
    outline: 2px solid #25ac25;
    outline-offset: 2px;
}

.btn-primary:active {
    transform: translateY(3px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.loading {
    background: linear-gradient(90deg, #25ac25 0%, #25ac25 40%, #5cdb5c 50%, #25ac25 60%, #25ac25 100%);
    background-size: 200% 100%;
    animation: btn-shimmer 1.5s infinite;
}

@keyframes btn-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.btn-shadow {
    position: absolute;
    top: 3px;
    left: 0;
    width: 150px;
    height: 57px;
    background: #25ac25;
    opacity: 0.88;
    border-radius: 50px;
    border: 2px solid rgba(9, 255, 9, 0.247);
    z-index: 2;
    pointer-events: none;
}

/* Footer */
.footer {
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    box-sizing: border-box;
    margin-top: auto;
}

/* Logo in footer - bottom left */
.logo-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: fit-content;
    align-self: flex-end;
}

.logo-container img {
    width: auto;
    margin-bottom: 4px;
}

.footer-text {
    color: #999;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 400;
}

.balls {
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}

.balls img {
    width: auto;
    height: 50px;
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(180, 180, 180, 0.5);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 150, 150, 0.65);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 180, 180, 0.5) transparent;
}

/* ==================== PROGRESSIVE FORM REVEAL STYLES ==================== */

/* Hidden state for progressive reveal */
.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
}

.visible {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
}

/* Bank Verification Section */
.bank-verification-section {
    transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
    padding-top: 20px;
    margin-top: 20px;
}


/* Mobile Money Section */
.mobile-money-section {
    transition: max-height 0.4s ease 0.1s, opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
    padding-top: 20px;
    margin-top: 20px;
}

.mobile-money-section.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.verify-prompt {
    font-size: 13px;
    color: #e67e22;
    margin-bottom: 10px;
}

.mobile-money-section:not(.disabled) .verify-prompt {
    display: none;
}

/* Verify Account Button */
.btn-verify-account {
    width: 100%;
    padding: 12px 16px;
    background: #25ac25;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 12px;
    margin-bottom: 16px;
}

.btn-verify-account:hover:not(:disabled) {
    background: #1e8a1e;
    transform: translateY(-2px);
}

.btn-verify-account:active:not(:disabled) {
    transform: translateY(0);
}

.btn-verify-account:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Verification Status Banner */
.verification-status {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.verification-status.visible {
    max-height: 200px;
    opacity: 1;
}

.verification-status.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding: 0 14px;
}

/* Status Variants */
.verification-status.loading {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.verification-status.success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 4px solid #388e3c;
}

.verification-status.review {
    background: #fff3e0;
    color: #f57c00;
    border-left: 4px solid #f57c00;
}

.verification-status.error {
    background: #ffebee;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

/* Status Icon */
.status-icon {
    min-width: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Account Confirmation Card */
.account-confirmation {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.confirmation-header {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* ==================== END PROGRESSIVE FORM REVEAL STYLES ==================== */

/* ==================== RECEIPT MODAL STYLES ==================== */

.receipt-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.receipt-modal-backdrop.show {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.receipt-modal-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
}

/* Output Header (Gradient Bar) */
.output-header {
    width: 350px;
    height: 72px;
    background: linear-gradient(180deg,
        #ACACAC 0%,
        #EDE7E7 41%,
        #979797 63%,
        #a1a1a1 100%);
    border-radius: 15px;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: fadeDown 0.6s ease-out 0s forwards;
}

/* Machine Slot */
.machine-slot {
    width: 320px;
    height: 10px;
    background: #FFFFFF;
    border: 4px solid #000000;
    border-radius: 15px;
    position: relative;
    z-index: 10;
    margin-top: -1px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    opacity: 0;
    animation: fadeDown 0.6s ease-out 0.7s forwards;
}

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

@keyframes receiptSlide {
    from {
        transform: translateY(-90%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Receipt */
.receipt {
    width: 300px;
    background: #fff;
    padding: 24px 28px 50px 28px;
    position: relative;
    z-index: 8;
    margin-top: -5px;
    opacity: 0;
    transform: translateY(-90%);
    animation: receiptSlide 1.5s ease-out 1.4s forwards;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: 'Geist Mono', monospace;
}

/* Logo */
.logo {
    margin-bottom: 22px;
    text-align: center;
}

.logo img {
    height: 28px;
    width: auto;
}

/* Success Header */
.success-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.success-info {
    flex: 1;
}

.success-title {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-bottom: 1px;
    line-height: 1.3;
}

.timestamp {
    font-size: 15px;
    color: #000;
    line-height: 1.3;
}

.checkmark {
    flex-shrink: 0;
    margin-left: 12px;
}

/* Divider */
.divider {
    border: none;
    border-top: 2.5px dashed #a0a0a0;
    margin: 10px 0;
}

/* Transaction Details */
.details {
    margin: 10px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 15px;
    line-height: 1.4;
}

.label {
    color: #000;
    flex-shrink: 0;
    margin-right: 20px;
}

.value {
    color: #000;
    text-align: right;
    flex-grow: 1;
}

/* Thank You Message */
.thank-you {
    text-align: center;
    font-size: 15px;
    color: #000;
    margin: 14px 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Bottom Cuts (Perforated Edge) */
.bottom-cuts {
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

.cut {
    width: 16px;
    height: 16px;
    background: black;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Close Button */
.receipt-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background-color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.receipt-close-btn:hover {
    background-color: #f0f0f0;
}

.receipt-close-btn:active {
    background-color: #e0e0e0;
}

/* Responsive - receipt modal */
@media (max-width: 400px) {
    .output-header {
        width: 90%;
        max-width: 350px;
    }

    .machine-slot {
        width: calc(90% - 30px);
        max-width: 320px;
    }

    .receipt {
        width: calc(90% - 50px);
        max-width: 300px;
        padding: 20px 20px 40px 20px;
    }

    .receipt-close-btn {
        top: -12px;
        right: -8px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

/* ==================== END RECEIPT MODAL STYLES ==================== */

.confirmation-name {
    color: #666;
}

/* Mobile responsiveness */
@media (max-width: 380px) {
    .hero-section {
        margin: 0;
        height: 100vh;
    }

    .navigation-bar,
    .content-container,
    .footer {
        padding: 15px 20px;
    }

    .loan-form-card {
        padding: 20px 16px;
    }
}