/* ========================================
   ADMIN WALLET - BEAUTIFUL PURPLE THEME
   ======================================== */

.admin-wallet {
  padding: 1.5rem;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  background: transparent;
}

/* ==================
   WALLET SECTION
   ================== */
.wallet-section {
  position: relative;
}

.wallet-section .section-badge.wallet-badge {
  background: linear-gradient(135deg, #d946ef, #c026d3);
  color: white;
}

/* ==================
   WALLET BALANCE CARDS
   ================== */
.wallet-cards-grid {
  grid-template-columns: 1.5fr 1fr 1fr;
  margin-bottom: 2rem;
}

.wallet-balance-card {
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%) !important;
  border: 3px solid #8b5cf6 !important;
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3) !important;
  position: relative;
  overflow: hidden;
}

.wallet-balance-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: pulse-glow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.badge-purple-bright {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd) !important;
  color: #000 !important;
  font-weight: 900 !important;
}

.icon-gradient-purple-bright {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
  color: white !important;
  animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.icon-gradient-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
}

.card-value-wallet {
  font-size: 2rem !important;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 3s ease-in-out infinite;
}

@keyframes shimmer-text {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.card-value-action {
  font-size: 1rem !important;
  color: #10b981 !important;
  font-weight: 700 !important;
}

.wallet-action-card {
  cursor: pointer;
  border-color: #10b981 !important;
}

.wallet-action-card:hover {
  border-color: #059669 !important;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3) !important;
}

.balance-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: live-dot-pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

@keyframes live-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* ==================
   SEARCH INPUT
   ================== */
.wallet-search-container {
  margin-bottom: 1.5rem;
}

.wallet-search-input {
  width: 100%;
  max-width: 500px;
  padding: 0.9rem 1.15rem;
  font-size: 0.95rem;
  border: 2px solid rgba(167, 139, 250, 0.3);
  border-radius: 10px;
  transition: all 0.3s ease;
  background: white;
  color: #1a1a2e;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wallet-search-input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background: #ffffff;
}

.wallet-search-input::placeholder {
  color: #999;
  font-weight: 500;
}

/* ==================
   TRANSACTIONS CONTAINER
   ================== */
.wallet-transactions-container {
  background: white;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(167, 139, 250, 0.2);
}

.wallet-transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(167, 139, 250, 0.15);
}

.wallet-transactions-title {
  font-size: 1.3rem;
  color: #8b5cf6;
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-icon {
  font-size: 1.5rem;
}

.wallet-send-btn {
  font-size: 0.9rem !important;
  padding: 0.65rem 1.25rem !important;
}

/* ==================
   TRANSACTION TABLE
   ================== */
.wallet-table-wrapper {
  overflow-x: auto;
  border-radius: 10px;
}

.wallet-transaction-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.wallet-transaction-table thead {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.wallet-transaction-table th {
  padding: 1rem 0.85rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wallet-transaction-table th.text-right {
  text-align: right;
}

.wallet-transaction-table th.text-center {
  text-align: center;
}

.wallet-transaction-table tbody tr {
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  transition: all 0.2s ease;
}

.wallet-transaction-table tbody tr:hover {
  background-color: rgba(139, 92, 246, 0.05);
  transform: scale(1.001);
}

.wallet-transaction-table td {
  padding: 0.9rem 0.85rem;
  font-size: 0.875rem;
  color: #333;
  vertical-align: middle;
}

/* Table Cell Styles */
.transaction-type-badge {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: white;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.transaction-description {
  color: #4b5563;
  font-weight: 500;
  max-width: 250px;
  line-height: 1.3;
}

.transaction-amount {
  font-weight: 800;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
}

.transaction-amount.amount-credit {
  color: #10b981;
}

.transaction-amount.amount-debit {
  color: #ef4444;
}

.transaction-user {
  color: #666;
  font-weight: 600;
  font-size: 0.85rem;
}

.transaction-date {
  font-size: 0.8rem;
  color: #666;
  white-space: nowrap;
  font-weight: 500;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* Status Badges */
.status-badge-wallet {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.status-badge-wallet.completed {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.status-badge-wallet.pending {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.status-badge-wallet.failed {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* ==================
   EMPTY STATE
   ================== */
.wallet-empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border-radius: 14px;
  border: 2px dashed #a78bfa;
  margin-top: 1rem;
}

.empty-icon-wallet {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: grayscale(20%);
}

.wallet-empty-state h3 {
  font-size: 1.4rem;
  color: #8b5cf6;
  margin: 0 0 0.5rem 0;
  font-weight: 800;
}

.wallet-empty-state p {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

/* ==================
   PAGINATION
   ================== */
.wallet-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 10px;
}

.wallet-pagination-btn {
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  border: 2px solid #a78bfa;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: #8b5cf6;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallet-pagination-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border-color: #8b5cf6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.wallet-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.wallet-pagination-info {
  font-weight: 700;
  color: #8b5cf6;
  font-size: 0.95rem;
}

/* ==================
   TRANSFER MODAL
   ================== */
.wallet-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 15, 46, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.wallet-modal-content {
  background: white;
  border-radius: 16px;
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 3px solid #a78bfa;
  box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-radius: 13px 13px 0 0;
  position: relative;
}

.wallet-modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
}

.wallet-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: white;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title-icon {
  font-size: 1.75rem;
}

.wallet-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.wallet-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==================
   TRANSFER FORM
   ================== */
.wallet-transfer-form {
  padding: 1.5rem;
}

.wallet-form-group {
  margin-bottom: 1.5rem;
}

.wallet-form-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.label-icon {
  font-size: 1.1rem;
}

.wallet-form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: white;
  transition: all 0.3s ease;
  font-weight: 500;
  box-sizing: border-box;
}

.wallet-form-control:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background: #ffffff;
}

.wallet-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.amount-preview {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(167, 139, 250, 0.08));
  border-radius: 8px;
  border-left: 4px solid #8b5cf6;
  font-size: 0.95rem;
  color: #4b5563;
  font-weight: 600;
}

.amount-preview strong {
  color: #8b5cf6;
  font-weight: 900;
  font-size: 1.1rem;
  font-family: 'Courier New', monospace;
}

/* ==================
   MODAL FOOTER
   ================== */
.wallet-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  padding: 1.5rem;
  border-top: 2px solid rgba(167, 139, 250, 0.2);
  background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
  border-radius: 0 0 13px 13px;
}

.wallet-cancel-btn {
  flex: 1;
  max-width: 150px;
}

.wallet-submit-btn {
  flex: 1.5;
  max-width: 200px;
}

.wallet-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================
   RESPONSIVE DESIGN
   ================== */
@media (max-width: 1200px) {
  .wallet-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-wallet {
    padding: 1rem;
  }

  .wallet-cards-grid {
    grid-template-columns: 1fr;
  }

  .wallet-search-input {
    max-width: 100%;
  }

  .wallet-transactions-header {
    flex-direction: column;
    align-items: stretch;
  gap: 1rem;
  }

  .wallet-send-btn {
    width: 100%;
  }

  .wallet-transaction-table {
    font-size: 0.75rem;
  }

  .wallet-transaction-table th,
  .wallet-transaction-table td {
    padding: 0.6rem 0.5rem;
  }

  .wallet-pagination {
    flex-direction: column;
    gap: 0.5rem;
  }

  .wallet-pagination-btn {
    width: 100%;
  }

  .wallet-modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
  }

  .wallet-modal-footer {
    flex-direction: column;
  }

  .wallet-cancel-btn,
  .wallet-submit-btn {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .admin-wallet {
    padding: 0.75rem;
  }

  .wallet-section .section-header h2 {
    font-size: 1.5rem;
  }

  .wallet-transaction-table {
    font-size: 0.7rem;
    min-width: 700px;
  }

  .wallet-transaction-table th,
  .wallet-transaction-table td {
    padding: 0.5rem 0.4rem;
  }

  .wallet-transactions-title {
    font-size: 1.1rem;
  }
  }
