body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    text-align: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.edc-container {
    border-radius: 15px;
    padding: 30px;
    margin: 20px;
    width: 350px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    html, body {
        padding: 0;
        margin: 0;
        width: 100vw;
        /* allow page to scroll on mobile; previously set to hidden which prevented scrolling */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    body {
        /* align-items: flex-start; */
        justify-content: flex-start;
    }

    .edc-container {
        /* width: 100vw;
        min-height: 100vh; */
        padding: 20px;
        /* margin: 0; */
        border-radius: 15px;
        max-width: none;
        box-sizing: border-box;
        position: relative;
        overflow-y: visible;
        background: #ffffff;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .display {
        font-size: 24px;
        padding: 12px;
        margin-bottom: 15px;
        min-height: 35px;
    }

    .prod-desc, .customer-fields input {
        font-size: 16px;
        padding: 14px;
        -webkit-appearance: none;
        appearance: none;
    }

    .customer-details summary {
        padding: 14px;
        font-size: 16px;
        -webkit-tap-highlight-color: transparent;
    }

    .customer-fields {
        padding: 15px 10px;
    }

    .buttons {
        gap: 8px;
    }

    button {
        padding: 14px;
        font-size: 16px;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .submit-btn {
        padding: 18px;
        font-size: 16px;
        min-height: 50px;
    }

    #qrcode {
        /* width: 200px !important;
        height: 200px !important; */
        margin: 20px auto !important;
    }

    /* Improve touch targets for mobile */
    .buttons button {
        min-width: 44px;
        min-height: 44px;
    }

    /* Better spacing for mobile */
    .edc-container > * + * {
        margin-top: 15px;
    }

    /* Ensure form elements don't zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"] {
        font-size: 16px !important;
    }
}

h2 {
    color: #4a4a4a;
    margin-bottom: 20px;
    font-weight: 600;
}

.display {
    background-color: #f8f9fa;
    color: #333;
    font-size: 28px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #007bff;
    border-radius: 8px;
    min-height: 40px;
    font-weight: bold;
}

.prod-desc {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    color: #333;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.prod-desc:focus {
    outline: none;
    border-color: #007bff;
}

.customer-details {
    margin-bottom: 20px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.customer-details summary {
    padding: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.customer-details summary:hover {
    background-color: #e9ecef;
}

.customer-fields {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.customer-fields input {
    width: 100%;
    padding: 12px;
    background-color: #fff;
    color: #333;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.customer-fields input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.submit-btn {
    grid-column: span 3;
    background-color: #28a745;
    font-size: 18px;
    padding: 20px;
}

.submit-btn:hover {
    background-color: #218838;
}

#qrcode {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

    .loading-container {
      text-align: center;
      font-size: 24px;
      color: #007bff;
      letter-spacing: 2px;
    }

    .dots {
      display: inline-block;
      width: 30px;
      text-align: left;
    }

/* Withdraw Page Styles */
.withdraw-page-container {
    width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.withdraw-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.withdraw-page-header h2 {
    color: #0045ac;
    margin-bottom: 10px;
}

.withdraw-page-saldo-info {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.withdraw-page-saldo-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.withdraw-page-saldo-info .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.withdraw-page-withdraw-form {
    margin-bottom: 30px;
}

.withdraw-page-form-group {
    margin-bottom: 20px;
}

.withdraw-page-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.withdraw-page-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    text-align: center;
}

.withdraw-page-form-group input[type="text"]:focus {
    outline: none;
    border-color: #0045ac;
    box-shadow: 0 0 0 3px rgba(0, 74, 172, 0.1);
}

.withdraw-page-withdraw-btn {
    background: linear-gradient(135deg, #0045ac 0%, #3272d3 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.withdraw-page-withdraw-btn:hover {
    background: linear-gradient(135deg, #003d99 0%, #2a5cb8 100%);
}

.withdraw-page-withdraw-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.withdraw-page-back-btn {
    background: #919191;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.withdraw-page-back-btn:hover {
    background: #5a6268;
}

.withdraw-page-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.withdraw-page-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.withdraw-page-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.withdraw-page-withdraw-notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #0045ac;
    text-align: left;
}

.withdraw-page-withdraw-notes h4 {
    margin: 0 0 10px 0;
    color: #0045ac;
    font-size: 14px;
}

.withdraw-page-withdraw-notes ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #6c757d;
}

.withdraw-page-withdraw-notes li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .withdraw-page-container {
        margin: 20px;
        padding: 20px;
    }
}
/* Withdraw History Page Styles */
.withdraw-history-container {
    width: 95%;
    margin: 0 auto;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.withdraw-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.withdraw-history-saldo-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.withdraw-history-saldo-total {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #0045ac 0%, #3272d3 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.withdraw-history-saldo-total h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.withdraw-history-saldo-total .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.withdraw-history-saldo-pending {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.withdraw-history-saldo-pending h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.withdraw-history-saldo-pending .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.withdraw-history-saldo-diproses {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.withdraw-history-saldo-diproses h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.withdraw-history-saldo-diproses .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.withdraw-history-saldo-tersedia {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.withdraw-history-saldo-tersedia h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.withdraw-history-saldo-tersedia .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.withdraw-history-transactions-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 40px;
}

.withdraw-history-transactions-table table {
    width: 100%;
    border-collapse: collapse;
}

.withdraw-history-transactions-table th,
.withdraw-history-transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.withdraw-history-transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.withdraw-history-transactions-table tbody tr:hover {
    background: #f8f9fa;
}

.withdraw-history-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.withdraw-history-status-pending {
    background: #fff3cd;
    color: #856404;
}

.withdraw-history-status-processed {
    background: #d1ecf1;
    color: #0c5460;
}

.withdraw-history-status-completed {
    background: #d4edda;
    color: #155724;
}

.withdraw-history-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.withdraw-history-amount-cell {
    font-weight: 600;
    color: #28a745;
}

.withdraw-history-back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.withdraw-history-back-btn:hover {
    background: #5a6268;
}

.withdraw-history-withdraw-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
}

.withdraw-history-withdraw-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #17a2b8 100%);
}

@media (max-width: 768px) {
    .withdraw-history-container {
        padding: 10px;
    }

    .withdraw-history-header {
        flex-direction: column;
        align-items: stretch;
    }

    .withdraw-history-transactions-table {
        overflow-x: auto;
    }

    .withdraw-history-transactions-table table {
        min-width: 800px;
    }

    .withdraw-history-saldo-total {
        padding: 15px;
    }

.withdraw-history-saldo-total .amount {
    font-size: 24px;
}
}
/* Dashboard Page Styles */
body.dashboard-page {
    min-height: 0;
}
.dashboard-container {
    width: 95%;
    margin: 0 auto;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.saldo-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.saldo-total {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #0045ac 0%, #3272d3 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.saldo-total h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.saldo-total .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.saldo-pending {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #b48700 0%, #dfa700 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.saldo-pending h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.saldo-pending .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.saldo-tersedia {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.saldo-tersedia h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.saldo-tersedia .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.total-saldo h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.total-saldo .amount {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.transactions-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 40px;
}

.transactions-table table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.transactions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.transactions-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.amount-cell {
    font-weight: 600;
    color: #28a745;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.back-btn:hover {
    background: #5a6268;
}

.withdraw-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
}

.withdraw-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #17a2b8 100%);
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .transactions-table {
        overflow-x: auto;
    }

    .transactions-table table {
        min-width: 800px;
    }

    .total-saldo {
        padding: 15px;
    }

    .total-saldo .amount {
        font-size: 24px;
    }
}

/* Mobile-friendly nav tweaks for dashboard header (moved from inline in dashboard.php) */
.dashboard-header { padding: 12px 16px; }
.dashboard-header-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nav-toggle { display:none; background:#0056b3; border:0; font-size:22px; cursor:pointer; }
.dashboard-nav { display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.dashboard-nav .nav-link { padding:8px 12px; border-radius:6px; text-decoration:none; color:#fff; background:#0079e3; font-size:14px; }
.dashboard-nav .nav-primary { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); }
.dashboard-nav .nav-logout { background:#dc3545; }

@media (max-width: 640px) {
    .nav-toggle { display:block; }
    .dashboard-nav { display:none; flex-direction:column; align-items:stretch; gap:8px; }
    .dashboard-nav.open { display:flex; }
    .dashboard-nav .nav-link { display:block; text-align:center; }
}

/* Account Settings Page Styles */
.account-settings-container {
    width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.account-settings-header {
    text-align: center;
    margin-bottom: 30px;
}

.account-settings-header h2 {
    color: #0045ac;
    margin-bottom: 10px;
    font-weight: 600;
}

.account-settings-header p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

.account-settings-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.account-settings-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.account-settings-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.account-settings-form {
    margin-bottom: 30px;
}

.account-settings-form-group {
    margin-bottom: 20px;
}

.account-settings-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.account-settings-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.account-settings-form-group input[type="password"]:focus {
    outline: none;
    border-color: #0045ac;
    box-shadow: 0 0 0 3px rgba(0, 74, 172, 0.1);
}

.account-settings-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.account-settings-submit-btn {
    background: linear-gradient(135deg, #0045ac 0%, #3272d3 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.account-settings-submit-btn:hover {
    background: linear-gradient(135deg, #003d99 0%, #2a5cb8 100%);
}

.account-settings-actions {
    text-align: center;
}

.account-settings-back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
    width:100%;
}

.account-settings-back-btn:hover {
    background: #5a6268;
}

@media (max-width: 768px) {
    .account-settings-container {
        width: 100vw;
        /* min-height: 100vh; */
        padding: 20px;
        margin: 20px;
        border-radius: 15px;
        max-width: none;
        box-sizing: border-box;
        position: relative;
        overflow-y: visible;
        background: #ffffff;
    }

    .account-settings-form {
        margin-top: 20px;
    }

    .account-settings-form-group {
        margin-bottom: 20px;
    }

    .account-settings-form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .account-settings-form-group input[type="password"] {
        width: 100%;
        font-size: 16px !important;
        padding: 12px;
        -webkit-appearance: none;
        appearance: none;
        box-sizing: border-box;
    }

    .account-settings-help-text {
        font-size: 12px;
    }

    .account-settings-submit-btn,
    .account-settings-back-btn {
        font-size: 16px;
        padding: 14px;
        min-height: 44px;
        width: 100%;
        box-sizing: border-box;
    }

    .account-settings-actions {
        margin-top: 15px;
    }
}

/* EDC action buttons (Dashboard / Logout) placed below the EDC section */
.edc-actions {
    text-align: center;
    margin-top: 12px;
    color: #6c757d;
    font-size: 14px;
}
.edc-actions .edc-btn {
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 6px 10px;
    margin: 0 6px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: underline;
}
.edc-actions .edc-btn:hover {
    color: #343a40;
    text-decoration: none;
}
.edc-actions .edc-btn-logout {
    color: #dc3545;
}
.edc-actions .edc-btn-logout:hover {
    color: #a71d2a;
}