.cmc-account-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

.cmc-welcome-section {
  background: linear-gradient(135deg, #6a63ff 0%, #7a27ff 100%);
  border-radius: 16px;
  padding: 20px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(122, 39, 255, 0.2);
  box-sizing: border-box;
  width: 100%;
}

.cmc-welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  box-sizing: border-box;
  width: 100%;
}

.cmc-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}

.cmc-user-avatar-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.cmc-user-avatar {
  position: relative;
}

.cmc-user-avatar img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.cmc-photo-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #7a27ff;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

.cmc-photo-edit-btn:hover {
  background: #6a20e5;
}

.cmc-photo-edit-btn svg {
  width: 14px;
  height: 14px;
  fill: white;
}

.cmc-user-details {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.cmc-user-details h1 {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: 700;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.cmc-user-details p {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.3;
}

.cmc-welcome-stats {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  width: 100%;
  justify-content: space-between;
}

.cmc-stat-card {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.cmc-stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3px;
  word-wrap: break-word;
}

.cmc-stat-label {
  font-size: 12px;
  opacity: 0.9;
  word-wrap: break-word;
}

.cmc-account-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 20px;
  box-sizing: border-box;
  width: 100%;
}

.cmc-account-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    margin: 10px 0;
}

.cmc-account-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.cmc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
}

.cmc-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.cmc-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cmc-card-icon.orders {
  background: #e3f2fd;
  color: #2196f3;
}

.cmc-card-icon.downloads {
  background: #e8f5e9;
  color: #4caf50;
}

.cmc-card-icon.addresses {
  background: #fff3e0;
  color: #ff9800;
}

.cmc-card-icon.account {
  background: #f3e5f5;
  color: #9c27b0;
}

.cmc-card-icon.logout {
  background: #ffebee;
  color: #f44336;
}

.cmc-edit-btn {
  background: none;
  border: none;
  color: #7a27ff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.cmc-edit-btn:hover {
  background: #f5f5f5;
}

.cmc-card-content {
  color: #666;
  line-height: 1.5;
  flex: 1;
  overflow: auto;
  font-size: 14px;
}

.cmc-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 5px;
  box-sizing: border-box;
  width: 100%;
}

.cmc-info-row:last-child {
  border-bottom: none;
}

.cmc-info-label {
  font-weight: 500;
  color: #555;
  flex-shrink: 0;
  min-width: 100px;
  font-size: 13px;
}

.cmc-info-value {
  color: #333;
  text-align: right;
  word-break: break-word;
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.cmc-navigation {
  background: white;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 20px;
}

.cmc-nav-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.cmc-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cmc-nav-item {
  margin-bottom: 0;
}

.cmc-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
  font-size: 14px;
}

.cmc-nav-link:hover {
  background: #f5f5f5;
  color: #333;
}

.cmc-nav-link.active {
  background: #f0f0ff;
  color: #7a27ff;
}

.cmc-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cmc-recent-orders {
    background: white;
    border-radius: 16px;
    /* padding: 5px; */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
    margin-bottom: 10px;
}

.cmc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 15px; */
    flex-wrap: wrap;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    padding: 15px;
}

.cmc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.cmc-view-all {
  color: #7a27ff;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
}

.cmc-view-all:hover {
  text-decoration: underline;
}

.cmc-order-table {
  width: 100%;
  border-collapse: collapse;
  box-sizing: border-box;
  font-size: 13px;
}

.cmc-order-table th {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 2px solid #f0f0f0;
  color: #555;
  font-weight: 600;
  font-size: 12px;
  background: #f9f9f9;
}

.cmc-order-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  word-wrap: break-word;
  font-size: 12px;
}

.cmc-order-table tr:last-child td {
  border-bottom: none;
}

.cmc-order-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.cmc-status-processing {
  background: #e3f2fd;
  color: #2196f3;
}

.cmc-status-completed {
  background: #e8f5e9;
  color: #4caf50;
}

.cmc-status-on-hold {
  background: #fff3e0;
  color: #ff9800;
}

.cmc-status-cancelled {
  background: #ffebee;
  color: #f44336;
}

.cmc-order-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cmc-order-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.cmc-btn-view {
  background: #f0f0ff;
  color: #7a27ff;
}

.cmc-btn-view:hover {
  background: #e0e0ff;
}

.cmc-btn-pay {
  background: #7a27ff;
  color: white;
}

.cmc-btn-pay:hover {
  background: #6a20e5;
}

/* Larger screens */
@media (min-width: 768px) {
  .cmc-account-dashboard {
    padding: 15px;
  }
  
  .cmc-welcome-section {
    padding: 25px;
  }
  
  .cmc-welcome-header {
    flex-direction: row;
  }
  
  .cmc-user-info {
    flex-direction: row;
  }
  
  .cmc-user-avatar img {
    width: 80px;
    height: 80px;
  }
  
  .cmc-photo-edit-btn {
    width: 32px;
    height: 32px;
  }
  
  .cmc-photo-edit-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .cmc-user-details h1 {
    font-size: 24px;
  }
  
  .cmc-account-sections {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  
  .cmc-account-card {
    /* padding: 20px; */
  }
  
  .cmc-card-title {
    font-size: 18px;
  }
  
  .cmc-card-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .cmc-nav-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .cmc-navigation {
    padding: 20px;
  }
  
  .cmc-recent-orders {
    padding: 20px;
  }
  
  .cmc-section-title {
    font-size: 20px;
  }
  
  .cmc-order-table {
    font-size: 14px;
  }
  
  .cmc-order-table th,
  .cmc-order-table td {
    padding: 12px 10px;
  }
  
  .cmc-order-status {
    font-size: 12px;
    padding: 4px 10px;
  }
  
  .cmc-order-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (min-width: 992px) {
  .cmc-account-dashboard {
    padding: 20px;
  }
  
  .cmc-account-sections {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

.woocommerce-account .woocommerce-MyAccount-content {
    float: none;
    width: 100%;
}