.user-dashboard {
  min-height: 100vh;
  padding: 100px 0 60px;
  background: var(--darker-bg, #0a0a0f);
}

.dashboard-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.dashboard-header {
  margin-bottom: 40px;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin: 0 0 8px;
}

.dashboard-subtitle {
  font-size: 1rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s;
}

.dashboard-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--accent-color, #27ff64);
  font-size: 0.9em;
}

/* Profile Card */
.profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-color, #27ff64);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 4px;
}

.profile-email {
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 0 0 8px;
}

.profile-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(39, 255, 100, 0.12);
  color: var(--accent-color, #27ff64);
  border: 1px solid rgba(39, 255, 100, 0.2);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-label {
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.meta-value {
  font-size: 0.85rem;
  color: var(--text-primary, #fff);
  font-weight: 500;
}

.meta-active {
  color: var(--accent-color, #27ff64);
}

/* Credits Card */
.credits-display {
  text-align: center;
  padding: 20px;
  background: rgba(39, 255, 100, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(39, 255, 100, 0.1);
  margin-bottom: 20px;
}

.credits-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color, #27ff64);
  line-height: 1;
}

.credits-label {
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 8px 0 0;
}

.credits-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
}

.breakdown-item span:last-child {
  color: var(--text-primary, #fff);
  font-weight: 500;
}

.subscription-section {
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  padding-top: 16px;
}

.sub-status {
  font-size: 0.9rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 0 0 12px;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-color, #27ff64);
  color: #000;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-upgrade:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.sub-plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
}

.sub-plan-status {
  font-size: 0.85rem;
  color: var(--accent-color, #27ff64);
  margin-bottom: 12px;
}

.btn-cancel-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-cancel-sub:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary, rgba(255, 255, 255, 0.82));
}

.btn-cancel-sub:disabled {
  cursor: wait;
  opacity: 0.65;
}

/* Daily Check-in Card */
.checkin-content {
  text-align: center;
}

.checkin-streak {
  margin-bottom: 16px;
}

.streak-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color, #27ff64);
  line-height: 1;
}

.streak-label {
  font-size: 0.85rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 6px 0 0;
}

.checkin-reward {
  margin-bottom: 16px;
}

.reward-text {
  font-size: 0.9rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  margin: 0;
}

.reward-text strong {
  color: var(--accent-color, #27ff64);
}

.btn-checkin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent-color, #27ff64);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn-checkin:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.btn-checkin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.checkin-done {
  font-size: 0.95rem;
  color: var(--accent-color, #27ff64);
  margin: 8px 0 0;
}

.checkin-done i {
  margin-right: 4px;
}

/* History Card */
.history-card {
  grid-column: 1 / -1;
}

.history-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 4px;
}

.history-tab {
  flex: 1;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.6));
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.history-tab.active {
  background: rgba(39, 255, 100, 0.12);
  color: var(--accent-color, #27ff64);
}

.history-tab:hover:not(.active) {
  color: var(--text-primary, #fff);
}

.history-list {
  min-height: 120px;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.history-empty i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.history-empty p {
  margin: 0 0 16px;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--accent-color, #27ff64);
  color: #000;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color, #27ff64);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.history-item-content {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary, #fff);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
}

.history-item-status {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.history-item-status.completed {
  background: rgba(39, 255, 100, 0.1);
  color: #27ff64;
}

.history-item-status.failed {
  background: rgba(255, 100, 100, 0.1);
  color: #ff6464;
}

.history-item-status.processing {
  background: rgba(100, 200, 255, 0.1);
  color: #64c8ff;
}

/* Danger Zone */
.danger-zone {
  border-color: rgba(255, 100, 100, 0.15);
}

.danger-zone .card-title i {
  color: #ff6464;
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.danger-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 4px;
}

.danger-item p {
  font-size: 0.8rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.5));
  margin: 0;
}

.btn-danger-secondary {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  color: var(--text-primary, #fff);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.btn-danger-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
  padding: 8px 18px;
  background: rgba(255, 100, 100, 0.1);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff6464;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-danger:hover {
  background: rgba(255, 100, 100, 0.18);
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-title {
    font-size: 1.6rem;
  }

  .danger-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
