/* Base Styles */
:root {
  --primary-color: #4a6bff;
  --secondary-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

.mlm-container {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Dashboard Layout */
.mlm-dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .mlm-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.mlm-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.mlm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mlm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.mlm-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--dark-color);
}

/* Buttons */
.mlm-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.mlm-btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.mlm-btn-primary:hover {
  background-color: #3a5bef;
  color: white;
}

.mlm-btn-secondary {
  background-color: var(--secondary-color);
  color: var(--dark-color);
}

.mlm-btn-secondary:hover {
  background-color: #e9ecef;
}

/* Forms */
.mlm-form-group {
  margin-bottom: 15px;
}

.mlm-form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.mlm-form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.mlm-form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

/* Tables */
.mlm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.mlm-table th, 
.mlm-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.mlm-table th {
  background-color: var(--secondary-color);
  font-weight: 600;
}

.mlm-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Navigation */
.mlm-sidebar {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
}

.mlm-nav-item {
  display: block;
  padding: 10px 15px;
  color: var(--dark-color);
  text-decoration: none;
  border-radius: var(--border-radius);
  margin-bottom: 5px;
  transition: var(--transition);
}

.mlm-nav-item:hover {
  background-color: rgba(74, 107, 255, 0.1);
  color: var(--primary-color);
}

.mlm-nav-item.active {
  background-color: rgba(74, 107, 255, 0.2);
  color: var(--primary-color);
  font-weight: 500;
}

.mlm-nav-icon {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Wallet Cards */
.wallet-card {
  border-radius: var(--border-radius);
  padding: 20px;
  color: white;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.wallet-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.wallet-card.roi {
  background: linear-gradient(135deg, #4a6bff, #6a8bff);
}

.wallet-card.referral {
  background: linear-gradient(135deg, #28a745, #48c764);
}

.wallet-card.level {
  background: linear-gradient(135deg, #ffc107, #ffd54f);
}

.wallet-card.reward {
  background: linear-gradient(135deg, #17a2b8, #37c2d8);
}

.wallet-card h4 {
  margin-top: 0;
  font-size: 1rem;
  font-weight: 500;
}

.wallet-card .amount {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 10px 0;
}

.wallet-card i {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 2.5rem;
  opacity: 0.3;
}

/* Responsive Grid */
.mlm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mlm-animate {
  animation: fadeIn 0.5s ease forwards;
}

/* Mobile Menu */
.mlm-mobile-menu-toggle {
  display: none;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  width: 100%;
  font-weight: 500;
}

@media (max-width: 768px) {
  .mlm-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mlm-sidebar {
    display: none;
  }
  
  .mlm-sidebar.active {
    display: block;
  }
}

/* Loading Spinner */
.mlm-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alert Messages */
.mlm-alert {
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.mlm-alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.mlm-alert-error {
  background-color: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

/* Progress Bars */
.mlm-progress {
  height: 10px;
  background-color: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 15px;
}

.mlm-progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.6s ease;
}

/* Tooltips */
.mlm-tooltip {
  position: relative;
  display: inline-block;
}

.mlm-tooltip .mlm-tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

.mlm-tooltip:hover .mlm-tooltip-text {
  visibility: visible;
  opacity: 1;
}
