/* ================= RESET ================= */
* {
    box-sizing: border-box;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #1f2937;
}
/* ================= LOGIN PAGE ================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    font-family: Inter, system-ui, sans-serif;
}

.login-card {
    width: 380px;
    background: #ffffff;
    border-radius: 22px;
    padding: 34px 32px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* HEADER */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    font-size: 14px;
    color: #6b7280;
}

/* FORM */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.input-group input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.input-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* BUTTON */
.primary-btn.full {
    width: 100%;
    margin-top: 6px;
}

/* ERROR */
.login-error {
    margin-top: 14px;
    padding: 10px 12px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    border-radius: 10px;
    text-align: center;
}

/* FOOTER */
.login-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* MOBILE */
@media (max-width: 480px) {
    .login-card {
        width: 92%;
        padding: 30px 24px;
    }
}

/* ================= NAVBAR ================= */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
}

.navbar a {
    font-size: 14px;
    text-decoration: none;
    color: #6b7280;
}

.navbar a:hover {
    color: #2563eb;
}

/* ================= TABS ================= */
.tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.tabs button {
    flex: 1;
    padding: 14px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.tabs button:hover {
    color: #111827;
}

.tabs button.active {
    color: #2563eb;
    font-weight: 600;
    border-bottom: 2px solid #2563eb;
}

/* ================= CONTAINER ================= */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 28px;
}

/* ================= WALLET ================= */
.wallet-box {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 28px;
}

.wallet-box p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.balance {
    font-size: 30px;
    font-weight: 700;
    margin-top: 6px;
}

/* ================= SEARCH ================= */
.game-search {
    margin-bottom: 18px;
}

.game-search input {
    width: 100%;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #111827;
    outline: none;
    transition: all 0.2s ease;
}

.game-search input::placeholder {
    color: #9ca3af;
}

.game-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ================= GAME PANEL ================= */
.game-panel {
    background: #ffffff;
    border-radius: 18px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.game-panel:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.game-panel.active {
    border-color: #2563eb;
}

/* HEADER */
.game-panel-header {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.game-left {
    display: flex;
    gap: 14px;
    align-items: center;
}

.game-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
}

.game-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.game-meta {
    font-size: 12px;
    color: #6b7280;
}

/* ================= GAME BODY ================= */
.game-panel-body {
    display: none;
    padding: 18px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

/* ================= ITEMS ================= */
.item-header,
.item-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    gap: 12px;
    align-items: center;
}

.item-header {
    font-size: 12px;
    color: #6b7280;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.item-row {
    padding: 12px 0;
    font-size: 13px;
}

.item-row:not(:last-child) {
    border-bottom: 1px dashed #e5e7eb;
}

/* ================= BADGES ================= */
.badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.badge.instock {
    background: #dcfce7;
    color: #166534;
}

.badge.outofstock {
    background: #fee2e2;
    color: #991b1b;
}

/* ================= TABLE ================= */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 6px;
}

table td {
    padding: 12px 6px;
    font-size: 13px;
    border-bottom: 1px dashed #e5e7eb;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .tabs button {
        flex: 50%;
    }

    .item-header,
    .item-row {
        grid-template-columns: 1fr 90px;
    }
}


/* ================= WALLET (MODERN) ================= */

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #111827;
}

.wallet-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 26px;
    border: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

/* LEFT */
.wallet-label {
    font-size: 13px;
    color: #6b7280;
}

.wallet-amount {
    font-size: 34px;
    font-weight: 700;
    margin-top: 6px;
    color: #111827;
}

.wallet-amount span {
    font-size: 16px;
    font-weight: 500;
    margin-left: 6px;
    color: #6b7280;
}

/* RIGHT */
.wallet-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wallet-actions input {
    width: 200px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
}

.wallet-actions input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* BUTTON */
.primary-btn {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
}

/* Game Image Thumbnail */
.game-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
    margin-right: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}


/* MOBILE */
@media (max-width: 768px) {
    .wallet-card {
        flex-direction: column;
        align-items: stretch;
    }

    .wallet-actions {
        width: 100%;
    }

    .wallet-actions input {
        flex: 1;
    }
}



/* ===== Merchant Grid Layout ===== */

.merchant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.merchant-card-item {
    background: #ffffff;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    transition: 0.2s ease;
}

.merchant-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

.merchant-card-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.merchant-card-value {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.merchant-card-value.code {
    font-family: monospace;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-block;
}

.merchant-card-value.api-key {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Copy button */
.copy-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s ease;
}

.copy-btn:hover {
    background: #1d4ed8;
}

/* Status badge */
.status-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge.suspended {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* ================= TOP-UP MODAL ================= */

/* ================= FIXED CENTERED MODAL ================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;

    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);

    /* Center horizontally only */
    display: none;
    justify-content: center;
    align-items: flex-start;

    padding: 60px 20px;
    overflow-y: auto;   /* Scroll entire overlay if needed */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #ffffff;
    width: 450px;
    max-width: 100%;
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    position: relative;
}


@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h3 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.modal-content p {
    font-size: 14px;
    color: #6b7280;
    margin: 12px 0;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    transition: 0.2s;
}

.close-btn:hover {
    color: #111827;
}

/* Topup Amount Display */
.topup-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 16px;
}

/* Wallet Address Box */
.wallet-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f3f4f6;
    padding: 12px 14px;
    border-radius: 12px;
    margin: 14px 0;
    word-break: break-all;
}

.wallet-address code {
    font-family: monospace;
    font-size: 13px;
    color: #111827;
}

.wallet-address button {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s ease;
}

.wallet-address button:hover {
    background: #1d4ed8;
}

/* Confirm Button */
.modal-content .primary-btn {
    width: 100%;
    margin-top: 18px;
}

/* Amount Breakdown */
.amount-breakdown {
    text-align: left;
    margin-bottom: 18px;
}

.amount-breakdown p {
    margin: 6px 0 2px;
    font-size: 13px;
    color: #6b7280;
}

.amount-breakdown strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
    color: #111827;
}

.highlight-total {
    font-size: 20px !important;
    color: #2563eb;
    font-weight: 700;
}

/* Acknowledgement Message */
.ack-message {
    background: #fff7ed;
    color: #9a3412;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Upload Section */
.upload-section {
    margin: 15px 0;
    text-align: left;
}

.upload-section label {
    font-size: 13px;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.upload-section input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    background: #f9fafb;
}
/* Image Preview */
.preview-container {
    position: relative;
    margin-top: 12px;
    display: none;
    width: 140px;
}

.preview-container img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.preview-container button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.preview-container button:hover {
    background: #dc2626;
}

.remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #111827;
    color: white;
    width: 22px;
    height: 22px;
    font-size: 14px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    transition: 0.2s ease;
}

.remove-preview:hover {
    background: #ef4444;
}


/* ================= TOP UP HISTORY ================= */

.history-table {
    margin-top: 20px;
    overflow-x: auto;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.history-table th {
    background: #f9fafb;
    text-align: left;
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.history-table td {
    padding: 14px;
    font-size: 14px;
    border-top: 1px solid #f1f5f9;
    color: #111827;
}

.history-table tr:hover {
    background: #f8fafc;
}

/* Status Badges */

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.approved {
    background: #dcfce7;
    color: #166534;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}



/* Using 'tp-' prefix to avoid conflicts */
.tp-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0; /* Shorthand for top, right, bottom, left: 0 */
    background: rgba(15, 23, 42, 0.8); /* Darker, modern slate overlay */
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.tp-modal-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.tp-status-icon {
    width: 70px;
    height: 70px;
    background: #10b981; /* Success Green */
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.tp-modal-title {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-family: sans-serif;
}

.tp-modal-text {
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.tp-action-btn {
    background: #1f2937;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tp-action-btn:hover {
    opacity: 0.9;
}


