.cx-dashboard { max-width: 900px; }
.cx-dashboard h2 { margin: 0 0 5px; font-size: 1.5em; }
.cx-dashboard h3 { margin: 20px 0 10px; font-size: 1.1em; color: #333; }

.cx-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0;
}
.cx-balance-card {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff; padding: 12px 24px; border-radius: 12px; text-align: center;
}
.cx-balance-label { display: block; font-size: 0.75em; opacity: 0.8; margin-bottom: 2px; }
.cx-balance-amount { font-size: 1.5em; font-weight: 800; }

.cx-team-info { color: #666; margin-bottom: 15px; }

.cx-table {
    width: 100%; border-collapse: collapse; font-size: 0.9em;
}
.cx-table th {
    background: #f9fafb; text-align: left; padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb; font-weight: 600; color: #374151;
}
.cx-table td {
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.cx-table tr:hover td { background: #faf5ff; }

.cx-transfer-form {
    display: flex; gap: 6px; align-items: center;
}
.cx-transfer-form input {
    padding: 5px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 0.85em;
}
.cx-btn-transfer {
    background: #7c3aed; color: #fff; border: none; padding: 6px 14px;
    border-radius: 6px; cursor: pointer; font-size: 0.85em; font-weight: 600;
    transition: background 0.2s;
}
.cx-btn-transfer:hover { background: #5b21b6; }
.cx-btn-transfer:disabled { opacity: 0.6; cursor: wait; }

/* History button */
.cx-btn-history {
    background: #f3f4f6; color: #374151; border: 1px solid #ddd; padding: 5px 12px;
    border-radius: 6px; cursor: pointer; font-size: 0.8em; font-weight: 500;
    transition: all 0.2s;
}
.cx-btn-history:hover { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }

/* Debit/Credit colors */
.cx-debit { color: #dc2626; }
.cx-credit { color: #16a34a; }

/* Modal */
.cx-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.cx-modal-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
}
.cx-modal-content {
    position: relative; background: #fff; border-radius: 12px;
    width: 90%; max-width: 700px; max-height: 80vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cx-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.cx-modal-header h3 { margin: 0; font-size: 1.1em; }
.cx-modal-close {
    background: none; border: none; font-size: 1.5em; cursor: pointer;
    color: #9ca3af; line-height: 1; padding: 0 4px;
}
.cx-modal-close:hover { color: #374151; }
.cx-modal-body {
    padding: 20px; overflow-y: auto; flex: 1;
}
.cx-history-balance {
    background: #f9fafb; padding: 10px 16px; border-radius: 8px;
    margin-bottom: 15px; font-size: 0.95em;
}

@media (max-width: 768px) {
    .cx-header { flex-direction: column; gap: 10px; }
    .cx-transfer-form { flex-wrap: wrap; }
    .cx-transfer-form input { width: 100% !important; }
    .cx-modal-content { width: 95%; max-height: 90vh; }
}
