/* Global Tradesx — Dashboard Shell (sidebar + content layout)
   Shared by [gtx_user_dashboard] and [gtx_admin_dashboard]. Pure layout/chrome —
   no business logic lives here, only reusable structure + a couple of
   generic components (tables, badges, cards) reused across feature panels. */

.gtx-dash-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: #0a0e18;
    min-height: 60vh;
}

.gtx-dash-shell {
    width: 100%;
    max-width: none; /* full width — locked/denied states override this inline with a small max-width */
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ---------- Sidebar ---------- */

.gtx-dash-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #0d1220;
    border: 1px solid rgba(240, 185, 11, 0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gtx-dash-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gtx-dash-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 4px;
    color: #c7cddb;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.gtx-dash-menu-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gtx-dash-menu-item:hover {
    background: rgba(240, 185, 11, 0.08);
    color: #ffffff;
}

.gtx-dash-menu-item.active {
    background: linear-gradient(135deg, #f7cd46, #e5a90f);
    color: #1a1300;
}

/* ---------- Content ---------- */

.gtx-dash-content {
    flex: 1;
    min-width: 0;
    background: #0d1220;
    border: 1px solid rgba(240, 185, 11, 0.15);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gtx-dash-panel {
    display: none;
}

.gtx-dash-panel.active {
    display: block;
}

.gtx-dash-panel-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
}

.gtx-dash-alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
}

.gtx-dash-alert.gtx-alert-error {
    background: rgba(229, 72, 77, 0.12);
    border: 1px solid rgba(229, 72, 77, 0.4);
    color: #ff9fa2;
}

.gtx-dash-alert.gtx-alert-success {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #7fe3a5;
}

.gtx-dash-alert.gtx-alert-info {
    background: rgba(240, 185, 11, 0.1);
    border: 1px solid rgba(240, 185, 11, 0.35);
    color: #f0b90b;
}

/* ---------- Access denied / logged-out state ---------- */

.gtx-dash-locked-card {
    text-align: center;
    color: #c7cddb;
    font-size: 14px;
}

.gtx-dash-locked-card a {
    color: #f0b90b;
    text-decoration: none;
}

.gtx-dash-locked-card a:hover {
    text-decoration: underline;
}

/* ---------- Referral link box (Overview panel) ---------- */

.gtx-referral-link-box {
    margin-top: 20px;
    background: #131a2b;
    border: 1px solid #262f45;
    border-radius: 10px;
    padding: 16px;
}

.gtx-referral-link-box label {
    display: block;
    color: #8b93a7;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.gtx-referral-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gtx-referral-link {
    flex: 1;
    min-width: 0;
    color: #f0b90b;
    font-size: 13px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gtx-referral-link:hover {
    text-decoration: underline;
}

.gtx-referral-hint {
    color: #5b647a;
    font-size: 12px;
    margin: 10px 0 0;
}

.gtx-copy-btn {
    flex-shrink: 0;
    background: rgba(240, 185, 11, 0.15);
    color: #f0b90b;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.gtx-copy-btn:hover {
    background: rgba(240, 185, 11, 0.28);
}

/* ---------- Generic table (reused by Users + Package Requests) ---------- */

.gtx-dash-table-wrap {
    overflow-x: auto;
}

.gtx-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gtx-dash-table th,
.gtx-dash-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #262f45;
    color: #c7cddb;
    white-space: nowrap;
}

.gtx-dash-table th {
    color: #8b93a7;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.gtx-dash-table td.gtx-emptycell {
    text-align: center;
    color: #5b647a;
    padding: 24px 12px;
    white-space: normal;
}

.gtx-dash-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.gtx-dash-badge.gtx-badge-pending {
    background: rgba(240, 185, 11, 0.15);
    color: #f0b90b;
}

.gtx-dash-badge.gtx-badge-approved {
    background: rgba(46, 204, 113, 0.15);
    color: #7fe3a5;
}

.gtx-dash-badge.gtx-badge-rejected {
    background: rgba(229, 72, 77, 0.15);
    color: #ff9fa2;
}

.gtx-dash-badge.gtx-badge-hold {
    background: rgba(139, 147, 167, 0.18);
    color: #c7cddb;
}

.gtx-dash-pagination {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    justify-content: flex-end;
}

.gtx-dash-pagination a {
    color: #c7cddb;
    border: 1px solid #262f45;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    text-decoration: none;
}

.gtx-dash-pagination a.gtx-page-current {
    background: #f0b90b;
    color: #1a1300;
    border-color: #f0b90b;
}

/* ---------- Buttons & form fields (generic, reused by any panel: Packages'
   Buy Now, Withdrawal's request form, future modules, etc.) ---------- */

.gtx-btn-primary {
    background: linear-gradient(135deg, #f7cd46, #e5a90f);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    color: #1a1300;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.05s ease;
}

.gtx-btn-primary:hover:not(:disabled) {
    opacity: 0.92;
}

.gtx-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

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

.gtx-field-group {
    margin-bottom: 16px;
    max-width: 320px;
}

.gtx-field-group label {
    display: block;
    color: #c7cddb;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.gtx-field-group input {
    width: 100%;
    box-sizing: border-box;
    background: #131a2b;
    border: 1px solid #262f45;
    border-radius: 10px;
    padding: 11px 14px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gtx-field-group input::placeholder {
    color: #5b647a;
}

.gtx-field-group input:focus {
    outline: none;
    border-color: #f0b90b;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.15);
}

.gtx-field-hint {
    color: #5b647a;
    font-size: 12px;
    margin: 6px 0 0;
}

/* ---------- Generic stat grid (Overview-style boxes, reused by
   Daily Earning + Withdrawal panels) ---------- */

.gtx-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.gtx-stat-box {
    background: #131a2b;
    border: 1px solid #262f45;
    border-radius: 10px;
    padding: 14px 16px;
}

.gtx-stat-label {
    display: block;
    color: #8b93a7;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.gtx-stat-value {
    display: block;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.gtx-stat-value.gtx-stat-highlight {
    color: #7fe3a5;
}

/* ---------- Users tab: inline edit row (Manage Users — Edit/Delete) ---------- */

.gtx-user-edit-row td {
    background: #0f1524;
    white-space: normal;
}

.gtx-user-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 18px;
}

.gtx-user-edit-grid .gtx-field-group {
    max-width: none;
    margin-bottom: 0;
}

.gtx-user-edit-grid input:disabled {
    color: #5b647a;
    cursor: not-allowed;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
    .gtx-dash-shell {
        flex-direction: column;
    }
    .gtx-dash-sidebar {
        width: 100%;
    }
    .gtx-dash-menu {
        display: flex;
        overflow-x: auto;
        gap: 4px;
    }
    .gtx-dash-menu-item {
        white-space: nowrap;
        margin-bottom: 0;
    }
}
